mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-09 13:37:58 +08:00
Check for thread consistency in JSCRuntime
Summary: In the version of JSC on iOS 11, creating a JSContext on one thread and using it on another can trigger subtle and nearly impossible to debug reentrancy-related crashes in the VM (see https://bugs.webkit.org/show_bug.cgi?id=186827). In !NDEBUG builds, check for this case and throw an exception, so it can be detected early. Reviewed By: amnn Differential Revision: D13313264 fbshipit-source-id: ee85435c20e23c8520495ce743d2f91f2eeada5c
This commit is contained in:
committed by
Facebook Github Bot
parent
512676c65e
commit
bdb084e8a8
@@ -53,6 +53,8 @@ void Instance::initializeBridge(
|
||||
m_syncCV.notify_all();
|
||||
});
|
||||
|
||||
// If the NativeToJsBridge ctor throws an exception, this check will
|
||||
// likely happen before before the redbox can be rendered.
|
||||
CHECK(nativeToJsBridge_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user