mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Allow bridge delegate to specify whether to use custom JSC wrapper
Reviewed By: mhorowitz Differential Revision: D4197657 fbshipit-source-id: 09e050f802b41c9a7016456c25381018b2123553
This commit is contained in:
parent
55a615bf98
commit
cb3e575deb
@ -82,6 +82,15 @@
|
||||
*/
|
||||
- (BOOL)shouldBridgeInitializeNativeModulesSynchronously:(RCTBridge *)bridge;
|
||||
|
||||
/**
|
||||
* Configure whether the JSCExecutor created should use the system JSC API or
|
||||
* alternative hooks provided. When returning YES from this method, you must have
|
||||
* previously called facebook::react::setCustomJSCWrapper.
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
- (BOOL)shouldBridgeUseCustomJSC:(RCTBridge *)bridge;
|
||||
|
||||
/**
|
||||
* The bridge will automatically attempt to load the JS source code from the
|
||||
* location specified by the `sourceURLForBridge:` method, however, if you want
|
||||
|
@ -216,7 +216,15 @@ void JSCExecutor::setContextName(const std::string& name) {
|
||||
void JSCExecutor::initOnJSVMThread() throw(JSException) {
|
||||
SystraceSection s("JSCExecutor.initOnJSVMThread");
|
||||
|
||||
#if defined(__APPLE__)
|
||||
const bool useCustomJSC = m_jscConfig.getDefault("UseCustomJSC", false).getBool();
|
||||
if (useCustomJSC) {
|
||||
JSC_configureJSCForIOS(true);
|
||||
}
|
||||
#else
|
||||
const bool useCustomJSC = false;
|
||||
#endif
|
||||
|
||||
#if defined(WITH_FB_JSC_TUNING) && defined(__ANDROID__)
|
||||
configureJSCForAndroid(m_jscConfig);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user