diff --git a/ReactCommon/cxxreact/JSCExecutor.cpp b/ReactCommon/cxxreact/JSCExecutor.cpp index 65a7e719b..c23e53e48 100644 --- a/ReactCommon/cxxreact/JSCExecutor.cpp +++ b/ReactCommon/cxxreact/JSCExecutor.cpp @@ -240,7 +240,9 @@ void JSCExecutor::initOnJSVMThread() throw(JSException) { JSClassRef globalClass = nullptr; { SystraceSection s("JSClassCreate"); - globalClass = JSC_JSClassCreate(useCustomJSC, &kJSClassDefinitionEmpty); + JSClassDefinition definition = kJSClassDefinitionEmpty; + definition.attributes |= kJSClassAttributeNoAutomaticPrototype; + globalClass = JSC_JSClassCreate(useCustomJSC, &definition); } { SystraceSection s("JSGlobalContextCreateInGroup"); diff --git a/ReactCommon/jschelpers/JSCHelpers.cpp b/ReactCommon/jschelpers/JSCHelpers.cpp index f99d76076..db6609a91 100644 --- a/ReactCommon/jschelpers/JSCHelpers.cpp +++ b/ReactCommon/jschelpers/JSCHelpers.cpp @@ -30,7 +30,8 @@ JSValueRef functionCaller( } JSClassRef createFuncClass(JSContextRef ctx) { - auto definition = kJSClassDefinitionEmpty; + JSClassDefinition definition = kJSClassDefinitionEmpty; + definition.attributes |= kJSClassAttributeNoAutomaticPrototype; // Need to duplicate the two different finalizer blocks, since there's no way // for it to capture this static information. if (isCustomJSCPtr(ctx)) { @@ -107,7 +108,7 @@ void installGlobalProxy( const char* name, JSObjectGetPropertyCallback callback) { JSClassDefinition proxyClassDefintion = kJSClassDefinitionEmpty; - proxyClassDefintion.className = "_FBProxyClass"; + proxyClassDefintion.attributes |= kJSClassAttributeNoAutomaticPrototype; proxyClassDefintion.getProperty = callback; const bool isCustomJSC = isCustomJSCPtr(ctx);