feat:fix cannot record onDestroy

This commit is contained in:
pengfei.zhou
2021-07-08 12:46:15 +08:00
committed by osborn
parent f5bd4406d9
commit 5c4bbe2fa5
2 changed files with 5 additions and 3 deletions

View File

@@ -170,7 +170,8 @@ - (DoricAsyncResult *)invokeContextEntity:(NSString *)contextId method:(NSString
- (DoricAsyncResult *)createContext:(NSString *)contextId script:(NSString *)script source:(NSString *)source {
DoricAsyncResult *ret = [[DoricAsyncResult alloc] init];
DoricPerformanceProfile *performanceProfile = [DoricContextManager.instance getContext:contextId].performanceProfile;
DoricPerformanceProfile *performanceProfile = [DoricContextManager.instance getContext:contextId].performanceProfile
?: [[DoricPerformanceProfile alloc] initWithName:contextId];
[performanceProfile prepare:@"Create"];
__weak typeof(self) _self = self;
[self.jsExecutor ensureRunOnJSThread:^{
@@ -191,7 +192,8 @@ - (DoricAsyncResult *)createContext:(NSString *)contextId script:(NSString *)scr
- (DoricAsyncResult *)destroyContext:(NSString *)contextId {
DoricAsyncResult *ret = [[DoricAsyncResult alloc] init];
DoricPerformanceProfile *performanceProfile = [DoricContextManager.instance getContext:contextId].performanceProfile;
DoricPerformanceProfile *performanceProfile = [DoricContextManager.instance getContext:contextId].performanceProfile
?: [[DoricPerformanceProfile alloc] initWithName:contextId];
[performanceProfile prepare:@"Destroy"];
__weak typeof(self) _self = self;
[self.jsExecutor ensureRunOnJSThread:^{