mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-10 22:47:58 +08:00
Synchronously fail when calling JS too early
Differential Revision: D3453476 fbshipit-source-id: 3fbfda46b4cb7d31f554df6760c5146c412ff468
This commit is contained in:
committed by
Facebook Github Bot 3
parent
cc8cf8f0f2
commit
6128b7236f
@@ -191,6 +191,9 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
FLog.w(ReactConstants.TAG, "Calling JS function after bridge has been destroyed.");
|
||||
return;
|
||||
}
|
||||
if (!mInitialized) {
|
||||
throw new RuntimeException("Attempt to call JS function before instance initialization.");
|
||||
}
|
||||
|
||||
callJSFunction(executorToken, module, method, arguments, tracingName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user