fix:when onDestroy call native plugin

This commit is contained in:
pengfei.zhou
2020-04-23 17:42:32 +08:00
committed by osborn
parent 82fdd5e46c
commit 496c4c1838
8 changed files with 34 additions and 19 deletions

View File

@@ -52,7 +52,6 @@ @implementation DoricJSEngine
- (instancetype)init {
if (self = [super init]) {
_jsQueue = dispatch_queue_create("doric.jsengine", DISPATCH_QUEUE_SERIAL);
_bridgeExtension = [[DoricBridgeExtension alloc] init];
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
struct utsname systemInfo;
uname(&systemInfo);
@@ -76,6 +75,8 @@ - (instancetype)init {
dispatch_async(_jsQueue, ^() {
self.timers = [[NSMutableDictionary alloc] init];
self.registry = [[DoricRegistry alloc] init];
self.bridgeExtension = [DoricBridgeExtension new];
self.bridgeExtension.registry = self.registry;
[self initJSEngine];
[self initJSExecutor];
[self initDoricEnvironment];