diff options
Diffstat (limited to 'JavaScriptCore/runtime/JSGlobalObject.h')
-rw-r--r-- | JavaScriptCore/runtime/JSGlobalObject.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/JavaScriptCore/runtime/JSGlobalObject.h b/JavaScriptCore/runtime/JSGlobalObject.h index 9e4ef49..bbb6d5e 100644 --- a/JavaScriptCore/runtime/JSGlobalObject.h +++ b/JavaScriptCore/runtime/JSGlobalObject.h @@ -267,7 +267,7 @@ namespace JSC { static PassRefPtr<Structure> createStructure(JSValue prototype) { - return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags)); + return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount); } protected: @@ -413,11 +413,21 @@ namespace JSC { { return new (exec) JSObject(exec->lexicalGlobalObject()->emptyObjectStructure()); } + + inline JSObject* constructEmptyObject(ExecState* exec, JSGlobalObject* globalObject) + { + return new (exec) JSObject(globalObject->emptyObjectStructure()); + } inline JSArray* constructEmptyArray(ExecState* exec) { return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure()); } + + inline JSArray* constructEmptyArray(ExecState* exec, JSGlobalObject* globalObject) + { + return new (exec) JSArray(globalObject->arrayStructure()); + } inline JSArray* constructEmptyArray(ExecState* exec, unsigned initialLength) { |