Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[iOS]fix crash when call getlayouttime
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhan-he committed Aug 29, 2019
1 parent 6d1cb9b commit c24fd94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ - (void) _handleRenderTime:(WXComponent*)targetComponent withModifyTime:(double)
[targetComponent.weexInstance.apmInstance updateMaxStats:KEY_PAGE_STATS_EXECUTE_JS_TIME curMaxValue:self.callJsTime];
[targetComponent.weexInstance.apmInstance updateMaxStats:KEY_PAGE_STATS_CREATE_COMPONENT_TIME curMaxValue:self.componentCreateTime];
[targetComponent.weexInstance.apmInstance updateMaxStats:KEY_PAGE_STATS_CREATE_VIEW_TIME curMaxValue:self.viewCreateTime];
[targetComponent.weexInstance.apmInstance updateMaxStats:KEY_PAGE_STATS_LAYOUT_TIME curMaxValue:[WXCoreBridge getLayoutTime:targetComponent.weexInstance.instanceId]];
__weak WXComponent* weakComponent = targetComponent;
WXPerformBlockOnComponentThread(^{
__strong WXComponent* strongComponent = weakComponent;
if (!strongComponent) {
return;
}
[strongComponent.weexInstance.apmInstance updateMaxStats:KEY_PAGE_STATS_LAYOUT_TIME curMaxValue:[WXCoreBridge getLayoutTime:strongComponent.weexInstance.instanceId]];
});

self.interactionTime = self.interactionTime < diff ? diff :self.interactionTime;
}
Expand Down

0 comments on commit c24fd94

Please sign in to comment.