Remove unused setPersistentIsolateData function (flutter/engine#30795)

This commit is contained in:
ColdPaleLight 2022-01-12 02:25:10 +08:00 committed by GitHub
parent 17aaf64c09
commit 06addee8ac
2 changed files with 0 additions and 33 deletions

View File

@ -337,24 +337,4 @@ flutter::Settings FLTDefaultSettingsForBundle(NSBundle* bundle) {
return @"io.flutter.flutter.app";
}
#pragma mark - Settings utilities
- (void)setPersistentIsolateData:(NSData*)data {
if (data == nil) {
return;
}
NSData* persistent_isolate_data = [data copy];
fml::NonOwnedMapping::ReleaseProc data_release_proc = [persistent_isolate_data](auto, auto) {
[persistent_isolate_data release];
};
_settings.persistent_isolate_data = std::make_shared<fml::NonOwnedMapping>(
static_cast<const uint8_t*>(persistent_isolate_data.bytes), // bytes
persistent_isolate_data.length, // byte length
data_release_proc // release proc
);
}
#pragma mark - PlatformData utilities
@end

View File

@ -36,19 +36,6 @@ flutter::Settings FLTDefaultSettingsForBundle(NSBundle* bundle = nil);
+ (NSString*)domainNetworkPolicy:(NSDictionary*)appTransportSecurity;
+ (bool)allowsArbitraryLoads:(NSDictionary*)appTransportSecurity;
/**
* The embedder can specify data that the isolate can request synchronously on launch. Engines
* launched using this configuration can access the persistent isolate data via the
* `PlatformDispatcher.getPersistentIsolateData` accessor.
*
* @param data The persistent isolate data. This data is persistent for the duration of the Flutter
* application and is available even after isolate restarts. Because of this lifecycle,
* the size of this data must be kept to a minimum and platform channels used for
* communication that does not require synchronous embedder to isolate communication
* close to isolate launch.
**/
- (void)setPersistentIsolateData:(NSData*)data;
@end
NS_ASSUME_NONNULL_END