From 8e85bf84e8139caebc79d2034313ff0f4c936bea Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Thu, 15 Mar 2018 09:21:08 -0700 Subject: [PATCH] Gatekeeper for Native Extensions Reviewed By: danzimm, johnislarry Differential Revision: D6965463 fbshipit-source-id: 28bcfbff980abfda3c63d7016ccf05beb1d178eb --- ReactCommon/cxxreact/JSCExecutor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index ddae9fdda..a7d8c72cb 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -134,8 +134,10 @@ namespace facebook { installGlobalProxy(m_context, "nativeModuleProxy", exceptionWrapMethod<&JSCExecutor::getNativeModule>()); } - installGlobalProxy(m_context, "nativeExtensions", - exceptionWrapMethod<&JSCExecutor::getNativeExtension>()); + if (nativeExtensionsProvider) { + installGlobalProxy(m_context, "nativeExtensions", + exceptionWrapMethod<&JSCExecutor::getNativeExtension>()); + } } JSCExecutor::~JSCExecutor() {