feat:Android and iOS monitor use DoricContext as parameter

This commit is contained in:
pengfei.zhou
2020-03-07 10:38:42 +08:00
committed by osborn
parent 5a956950bd
commit 3b0a245129
19 changed files with 73 additions and 69 deletions

View File

@@ -21,7 +21,6 @@
//
#import "DoricContextManager.h"
#import "DoricContext.h"
@interface DoricContextManager ()
@@ -52,11 +51,11 @@ + (instancetype)instance {
- (void)createContext:(DoricContext *)context script:(NSString *)script source:(NSString *)source {
context.contextId = [NSString stringWithFormat:@"%ld", (long) ++self.counter];
[context.driver createContext:context.contextId script:script source:source];
dispatch_sync(self.mapQueue, ^() {
NSValue *value = [NSValue valueWithNonretainedObject:context];
self.doricContextMap[context.contextId] = value;
});
[context.driver createContext:context.contextId script:script source:source];
}
- (DoricContext *)getContext:(NSString *)contextId {