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

Commit

Permalink
[iOS] Remove 'Too many timers' report. (#2930)
Browse files Browse the repository at this point in the history
* [iOS] Remove 'Too many timers' report.

* [iOS] Remove 'Too many timers' report.
  • Loading branch information
wqyfavor authored and jianhan-he committed Sep 23, 2019
1 parent 724d887 commit e8f323a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion ios/sdk/WeexSDK/Sources/Engine/WXSDKError.h
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion ios/sdk/WeexSDK/Sources/Engine/WXSDKError.m
Expand Up @@ -103,7 +103,6 @@ +(NSDictionary *) getMap
@(WX_KEY_EXCEPTION_EMPTY_SCREEN_JS):@{ERROR_TYPE:@(WX_RENDER_ERROR),ERROR_GROUP:@(WX_JS)},
@(WX_KEY_EXCEPTION_EMPTY_SCREEN_NATIVE):@{ERROR_TYPE:@(WX_RENDER_ERROR),ERROR_GROUP:@(WX_NATIVE)},

@(WX_KEY_EXCEPTION_TOO_MANY_TIMERS):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
@(WX_KEY_EXCEPTION_NO_BUNDLE_TYPE):@{ERROR_TYPE:@(WX_JS_ERROR),ERROR_GROUP:@(WX_JS)},

@(WX_KEY_EXCEPTION_HERON_ERROR):@{ERROR_TYPE:@(WX_NATIVE_ERROR),ERROR_GROUP:@(WX_NATIVE)},
Expand Down
9 changes: 0 additions & 9 deletions ios/sdk/WeexSDK/Sources/Module/WXTimerModule.m
Expand Up @@ -77,7 +77,6 @@ + (void) checkExcuteInBack:(NSString*) instanceId

@implementation WXTimerModule
{
BOOL _tooManyTimersReported;
NSMutableDictionary *_timers;
}

Expand Down Expand Up @@ -178,14 +177,6 @@ - (void)createTimerWithCallback:(NSString *)callbackID time:(NSTimeInterval)mill
}
}
[_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;
}
}
}
}
}
Expand Down

0 comments on commit e8f323a

Please sign in to comment.