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/09/23 02:15:41 UTC

[incubator-weex] 01/01: [iOS] Remove 'Too many timers' report.

This is an automated email from the ASF dual-hosted git repository.

moshen pushed a commit to branch remove-too-many-timers-report
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git

commit 6ceb5c5f92ebcddb0290b520851e8a9e7e076d51
Author: qianyuan.wqy <qi...@taobao.com>
AuthorDate: Mon Sep 23 10:15:24 2019 +0800

    [iOS] Remove 'Too many timers' report.
---
 ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h    | 1 -
 ios/sdk/WeexSDK/Sources/Module/WXTimerModule.m | 9 ---------
 2 files changed, 10 deletions(-)

diff --git a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
index b628b06..449ab92 100644
--- a/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
+++ b/ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
@@ -106,7 +106,6 @@ typedef NS_ENUM(int, WXSDKErrCode)
     WX_KEY_EXCEPTION_EMPTY_SCREEN_JS = -9700,
     WX_KEY_EXCEPTION_EMPTY_SCREEN_NATIVE = -9701,
     
-    WX_KEY_EXCEPTION_TOO_MANY_TIMERS = -9800,
     WX_KEY_EXCEPTION_NO_BUNDLE_TYPE = -9801,
     
     WX_KEY_EXCEPTION_HERON_ERROR = -9900,
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXTimerModule.m b/ios/sdk/WeexSDK/Sources/Module/WXTimerModule.m
index e6c158f..d036409 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXTimerModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXTimerModule.m
@@ -77,7 +77,6 @@
 
 @implementation WXTimerModule
 {
-    BOOL _tooManyTimersReported;
     NSMutableDictionary *_timers;
 }
 
@@ -178,14 +177,6 @@ WX_EXPORT_METHOD(@selector(clearInterval:))
                 }
             }
             [_timers removeObjectsForKeys:invalidTimerIds];
-            
-            // If alive timer count still exceeds 30, we report once for this page.
-            if ([_timers count] > 30) {
-                if (!_tooManyTimersReported) {
-                    [WXExceptionUtils commitCriticalExceptionRT:self.weexInstance.instanceId errCode:[NSString stringWithFormat:@"%d", WX_KEY_EXCEPTION_TOO_MANY_TIMERS] function:@"" exception:@"Too many timers." extParams:nil];
-                    _tooManyTimersReported = YES;
-                }
-            }
         }
     }
 }