You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2019/05/16 01:59:06 UTC
[incubator-weex] branch master updated: [iOS] Fix not proper use of
block of WXPerformance.
This is an automated email from the ASF dual-hosted git repository.
moshen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
The following commit(s) were added to refs/heads/master by this push:
new 9e0c832 [iOS] Fix not proper use of block of WXPerformance.
new 4ff42cc Merge pull request #2443 from wqyfavor/fix-apm
9e0c832 is described below
commit 9e0c83257452615b7c70cc0f3494760ea55c1593
Author: wqyfavor <qi...@taobao.com>
AuthorDate: Wed May 15 16:26:28 2019 +0800
[iOS] Fix not proper use of block of WXPerformance.
---
ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
index 8a9664b..a5ebcf2 100644
--- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
+++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance_performance.m
@@ -52,17 +52,21 @@
double modifyTime = CACurrentMediaTime()*1000;
__weak WXComponent* weakComponent = targetComponent;
+ __weak WXPerformance* weakSelf = self;
+
dispatch_async(dispatch_get_main_queue(), ^{
__strong WXComponent* strongComponent = weakComponent;
- if (nil == strongComponent) {
+ __strong WXPerformance* strongSelf = weakSelf;
+
+ if (nil == strongComponent || nil == strongSelf) {
return;
}
- if(![self _verifyComponent:strongComponent]){
+
+ if(![strongSelf _verifyComponent:strongComponent]){
return;
}
- self.interactionAddCountRecord++;
-
- [self _handleRenderTime:strongComponent withModifyTime:modifyTime];
+ strongSelf.interactionAddCountRecord++;
+ [strongSelf _handleRenderTime:strongComponent withModifyTime:modifyTime];
});
}