Doric bridge

This commit is contained in:
pengfei.zhou
2019-07-29 20:23:00 +08:00
parent 4a5acaa781
commit a17a21954a
15 changed files with 383 additions and 212 deletions

View File

@@ -44,6 +44,14 @@ - (void)createContext:(DoricContext *)context script:(NSString *)script source:(
});
}
- (DoricContext *)getContext:(NSString *)contextId {
__block DoricContext *context;
dispatch_sync(self.mapQueue, ^{
NSValue *value = [self.doricContextMap valueForKey:contextId];
context = value.nonretainedObjectValue;
});
return context;
}
- (void)destroyContext:(DoricContext *)context {
NSString *contextId = context.contextId;