This is an automated email from the ASF dual-hosted git repository. moshen pushed a commit to branch double11-fix2 in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
commit b11decf9226542a38e164b937a817732520af026 Author: qianyuan.wqy <[email protected]> AuthorDate: Thu Sep 26 14:02:31 2019 +0800 [iOS] Fix issue JS thread may be deallocated not in JS thread. --- ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm index 9293fa5..9caff56 100644 --- a/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm +++ b/ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.mm @@ -80,6 +80,7 @@ { _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);
