diff --git a/engine/src/flutter/shell/common/fixtures/shell_test.dart b/engine/src/flutter/shell/common/fixtures/shell_test.dart index 5deaa51c79..2893419fe4 100644 --- a/engine/src/flutter/shell/common/fixtures/shell_test.dart +++ b/engine/src/flutter/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/engine/src/flutter/shell/common/shell.cc b/engine/src/flutter/shell/common/shell.cc index 0fd2315e6d..7e5926f074 100644 --- a/engine/src/flutter/shell/common/shell.cc +++ b/engine/src/flutter/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))); } }); }