iOS:add protection for SIGSEGV

This commit is contained in:
pengfei.zhou
2020-04-20 11:03:48 +08:00
committed by osborn
parent 4ef508d3a7
commit de9b96c490
8 changed files with 59 additions and 15 deletions

View File

@@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)destroyContext:(NSString *)contextId;
- (JSValue *)invokeDoricMethod:(NSString *)method, ...;
- (JSValue *)invokeDoricMethod:(NSString *)method, ... NS_REQUIRES_NIL_TERMINATION;
- (JSValue *)invokeDoricMethod:(NSString *)method arguments:(va_list)args;

View File

@@ -228,7 +228,7 @@ - (void)callbackTimer:(NSTimer *)timer {
NSDictionary *userInfo = timer.userInfo;
NSNumber *timerId = [userInfo valueForKey:@"timerId"];
NSNumber *repeat = [userInfo valueForKey:@"repeat"];
__strong typeof(_self) self = _self;
@try {
[self invokeDoricMethod:DORIC_TIMER_CALLBACK, timerId, nil];