Make Skia cache size channel respond with a value (flutter/engine#11550)

This commit is contained in:
Dan Field
2019-08-27 17:52:35 -07:00
committed by GitHub
parent 0ecb9b3cd8
commit 114337a53c
2 changed files with 6 additions and 1 deletions

View File

@@ -63,6 +63,9 @@ void testCanLaunchSecondaryIsolate() {
@pragma('vm:entry-point')
void testSkiaResourceCacheSendsResponse() {
final PlatformMessageResponseCallback callback = (ByteData data) {
if (data == null) {
throw 'Response must not be null.';
}
notifyNative();
};
const String json = '''{

View File

@@ -959,7 +959,9 @@ void Shell::HandleEngineSkiaMessage(fml::RefPtr<PlatformMessage> message) {
true);
}
if (response) {
response->CompleteEmpty();
std::vector<uint8_t> data = {1};
response->Complete(
std::make_unique<fml::DataMapping>(std::move(data)));
}
});
}