From 4ceaafc0a829d00b0294ff0ea0b6ea836e97ab89 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 27 Aug 2019 17:52:35 -0700 Subject: [PATCH] Make Skia cache size channel respond with a value (#11550) --- shell/common/fixtures/shell_test.dart | 3 +++ shell/common/shell.cc | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/shell/common/fixtures/shell_test.dart b/shell/common/fixtures/shell_test.dart index 5deaa51c796b4..2893419fe4038 100644 --- a/shell/common/fixtures/shell_test.dart +++ b/shell/common/fixtures/shell_test.dart @@ -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 = '''{ diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 0fd2315e6d7fe..7e5926f074408 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -959,7 +959,9 @@ void Shell::HandleEngineSkiaMessage(fml::RefPtr message) { true); } if (response) { - response->CompleteEmpty(); + std::vector data = {1}; + response->Complete( + std::make_unique(std::move(data))); } }); }