Repository: incubator-weex Updated Branches: refs/heads/master 3f11db871 -> a820eeb2f
[WEEX-400][iOS] add more note about access JSContext Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a820eeb2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a820eeb2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a820eeb2 Branch: refs/heads/master Commit: a820eeb2fe21bba19ed9d00527640da3441628da Parents: 3f11db8 Author: acton393 <zhangxing610...@gmail.com> Authored: Thu May 24 11:53:52 2018 +0800 Committer: acton393 <zhangxing610...@gmail.com> Committed: Thu May 24 11:53:52 2018 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h | 1 + ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 1 + 2 files changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a820eeb2/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h index b4e7cfc..cc91d75 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h @@ -148,6 +148,7 @@ typedef NS_ENUM(NSInteger, WXErrorCode) {//error.code /** * * @return instance runtime JavaScript. + * you must call it in brige thread. Learn more at WXPerformBlockOnBridgeThread **/ - (id<WXBridgeProtocol>)instanceJavaScriptContext; http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a820eeb2/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m index ad53d3a..952b446 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m @@ -143,6 +143,7 @@ typedef enum : NSUInteger { return _instanceJavaScriptContext; } + WXAssertBridgeThread(); if (_instanceJavaScriptContext) { _instanceJavaScriptContext = nil; }