Skip to content

Commit

Permalink
Make Skia cache size channel respond with a value (flutter#11550)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnfield authored Aug 28, 2019
1 parent 85810f8 commit 4ceaafc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions shell/common/fixtures/shell_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '''{
Expand Down
4 changes: 3 additions & 1 deletion shell/common/shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
});
}
Expand Down

0 comments on commit 4ceaafc

Please sign in to comment.