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

Double11 fix2 #2937

Merged
merged 2 commits into from
Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ - (void)dealloc
{
_jsContext.instanceId = nil;
__block JSContext* theContext = _jsContext;
_jsContext = nil; // Make sure that the context MUST be freed in JS thread.
WXPerformBlockOnBridgeThreadForInstance(^{
theContext = nil; // release the context in js thread to avoid main-thread deadlock
}, _weexInstanceId);
Expand Down
4 changes: 4 additions & 0 deletions ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ - (BOOL)_handleConfigCenter
BOOL alwaysUseMRCForObjectToWeexCore = [[configCenter configForKey:@"iOS_weex_ext_config.alwaysUseMRC" defaultValue:@(NO) isDefault:NULL] boolValue];
ConvertSwitches(isIOS13, useMRCForInvalidJSONObject, alwaysUseMRCForObjectToWeexCore);
}
else {
BOOL isIOS13 = [[[UIDevice currentDevice] systemVersion] integerValue] == 13;
ConvertSwitches(isIOS13, YES, NO);
}
return NO;
}

Expand Down