Make Skia cache size channel respond with a value (flutter/engine#11550)
This commit is contained in:
@@ -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 = '''{
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user