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/26 06:02:43 UTC

[incubator-weex] branch double11-fix2 created (now b11decf)

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

moshen pushed a change to branch double11-fix2
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git.


      at b11decf  [iOS] Fix issue JS thread may be deallocated not in JS thread.

This branch includes the following new commits:

     new b11decf  [iOS] Fix issue JS thread may be deallocated not in JS thread.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-weex] 01/01: [iOS] Fix issue JS thread may be deallocated not in JS thread.

Posted by mo...@apache.org.
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 <qi...@taobao.com>
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);