mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 22:41:28 +08:00
Use NoAutomaticPrototype everywhere
Reviewed By: michalgr Differential Revision: D4462794 fbshipit-source-id: 53585741c1d35ca31e3429f2de56455ea5dea902
This commit is contained in:
committed by
Facebook Github Bot
parent
517abba6bb
commit
e97ffc469c
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user