Changeset 81272 in webkit


Ignore:
Timestamp:
Mar 16, 2011 1:09:07 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-03-15 Oliver Hunt <oliver@apple.com>

Reviewed by Geoffrey Garen.

Make Structure creation require a JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=56438

Mechanical change to make Structure::create require JSGlobalData&, and
require all users to provide the globalData.

  • API/JSCallbackConstructor.h: (JSC::JSCallbackConstructor::createStructure):
  • API/JSCallbackFunction.h: (JSC::JSCallbackFunction::createStructure):
  • API/JSCallbackObject.h: (JSC::JSCallbackObject::createStructure):
  • API/JSContextRef.cpp:
  • JavaScriptCore.exp:
  • debugger/DebuggerActivation.cpp: (JSC::DebuggerActivation::DebuggerActivation):
  • debugger/DebuggerActivation.h: (JSC::DebuggerActivation::createStructure):
  • jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
  • jsc.cpp: (GlobalObject::GlobalObject): (functionRun): (jscmain):
  • runtime/Arguments.h: (JSC::Arguments::createStructure):
  • runtime/ArrayPrototype.h: (JSC::ArrayPrototype::createStructure):
  • runtime/BooleanObject.h: (JSC::BooleanObject::createStructure):
  • runtime/DateInstance.h: (JSC::DateInstance::createStructure):
  • runtime/DatePrototype.h: (JSC::DatePrototype::createStructure):
  • runtime/ErrorInstance.h: (JSC::ErrorInstance::createStructure):
  • runtime/Executable.h: (JSC::ExecutableBase::createStructure): (JSC::EvalExecutable::createStructure): (JSC::ProgramExecutable::createStructure): (JSC::FunctionExecutable::createStructure):
  • runtime/FunctionPrototype.h: (JSC::FunctionPrototype::createStructure):
  • runtime/GetterSetter.h: (JSC::GetterSetter::createStructure):
  • runtime/InternalFunction.h: (JSC::InternalFunction::createStructure):
  • runtime/JSAPIValueWrapper.h: (JSC::JSAPIValueWrapper::createStructure):
  • runtime/JSActivation.h: (JSC::JSActivation::createStructure):
  • runtime/JSArray.cpp: (JSC::JSArray::JSArray):
  • runtime/JSArray.h: (JSC::JSArray::createStructure):
  • runtime/JSByteArray.cpp: (JSC::JSByteArray::createStructure):
  • runtime/JSByteArray.h: (JSC::JSByteArray::JSByteArray):
  • runtime/JSCell.h: (JSC::JSCell::JSCell::createDummyStructure):
  • runtime/JSFunction.h: (JSC::JSFunction::createStructure):
  • runtime/JSGlobalData.cpp: (JSC::JSGlobalData::storeVPtrs): (JSC::JSGlobalData::JSGlobalData):
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::reset):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::JSGlobalObject): (JSC::JSGlobalObject::createStructure):
  • runtime/JSNotAnObject.h: (JSC::JSNotAnObject::createStructure):
  • runtime/JSONObject.h: (JSC::JSONObject::createStructure):
  • runtime/JSObject.cpp: (JSC::JSObject::createInheritorID):
  • runtime/JSObject.h: (JSC::JSObject::createStructure): (JSC::JSNonFinalObject::createStructure): (JSC::JSFinalObject::createStructure): (JSC::createEmptyObjectStructure): (JSC::JSObject::inheritorID):
  • runtime/JSObjectWithGlobalObject.h: (JSC::JSObjectWithGlobalObject::createStructure):
  • runtime/JSPropertyNameIterator.h: (JSC::JSPropertyNameIterator::createStructure):
  • runtime/JSStaticScopeObject.h: (JSC::JSStaticScopeObject::createStructure):
  • runtime/JSString.h: (JSC::RopeBuilder::createStructure):
  • runtime/JSVariableObject.h: (JSC::JSVariableObject::createStructure):
  • runtime/JSWrapperObject.h: (JSC::JSWrapperObject::createStructure):
  • runtime/JSZombie.h: (JSC::JSZombie::createStructure):
  • runtime/MathObject.h: (JSC::MathObject::createStructure):
  • runtime/NativeErrorConstructor.cpp: (JSC::NativeErrorConstructor::NativeErrorConstructor):
  • runtime/NativeErrorConstructor.h: (JSC::NativeErrorConstructor::createStructure):
  • runtime/NumberConstructor.h: (JSC::NumberConstructor::createStructure):
  • runtime/NumberObject.h: (JSC::NumberObject::createStructure):
  • runtime/ObjectConstructor.h: (JSC::ObjectConstructor::createStructure):
  • runtime/RegExpConstructor.h: (JSC::RegExpConstructor::createStructure):
  • runtime/RegExpObject.h: (JSC::RegExpObject::createStructure):
  • runtime/ScopeChain.h: (JSC::ScopeChainNode::createStructure):
  • runtime/StringObject.h: (JSC::StringObject::createStructure):
  • runtime/StringObjectThatMasqueradesAsUndefined.h: (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
  • runtime/StringPrototype.h: (JSC::StringPrototype::createStructure):
  • runtime/Structure.h: (JSC::Structure::create):

2011-03-15 Oliver Hunt <oliver@apple.com>

Reviewed by Geoffrey Garen.

Make Structure creation require a JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=56438

Mechanical change to make all structure creation pass a JSGlobalData&.

  • JSRun.cpp: (JSGlueGlobalObject::JSGlueGlobalObject): (JSRun::JSRun):
  • JSRun.h:
  • JSUtils.cpp: (getThreadGlobalObject):
  • UserObjectImp.h: (UserObjectImp::createStructure):

2011-03-15 Oliver Hunt <oliver@apple.com>

Reviewed by Geoffrey Garen.

Make Structure creation require a JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=56438

Mechanical change to make all structure creation use GlobalData

  • bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor):
  • bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure):
  • bindings/js/JSDOMBinding.h: (WebCore::DOMObjectWithGlobalPointer::createStructure): (WebCore::DOMConstructorObject::createStructure): (WebCore::getDOMStructure):
  • bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure):
  • bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure):
  • bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::setWindow):
  • bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure):
  • bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor):
  • bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure):
  • bindings/js/JSImageDataCustom.cpp: (WebCore::toJS):
  • bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor):
  • bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure):
  • bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure):
  • bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript):
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure):
  • bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure):
  • bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure):
  • bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure):
  • bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure):
  • bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure):
  • bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
  • bridge/runtime_array.h: (JSC::RuntimeArray::createStructure):
  • bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure):
  • bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure):

2011-03-15 Oliver Hunt <oliver@apple.com>

Reviewed by Geoffrey Garen.

Make Structure creation require a JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=56438

Mechanical change to make all Structure creation use a JSGlobalData&

  • Plugins/Hosted/ProxyInstance.mm: (WebKit::ProxyRuntimeMethod::createStructure):
  • Plugins/Hosted/ProxyRuntimeObject.h: (WebKit::ProxyRuntimeObject::createStructure):

2011-03-15 Oliver Hunt <oliver@apple.com>

Reviewed by Geoffrey Garen.

Make Structure creation require a JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=56438

Mechanical change to make all Structure creation use a JSGlobalData&.

  • WebProcess/Plugins/Netscape/JSNPMethod.cpp: (WebKit::JSNPMethod::JSNPMethod):
  • WebProcess/Plugins/Netscape/JSNPMethod.h: (WebKit::JSNPMethod::createStructure):
  • WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::JSNPObject):
  • WebProcess/Plugins/Netscape/JSNPObject.h: (WebKit::JSNPObject::createStructure):
Location:
trunk/Source
Files:
100 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackConstructor.h

    r79132 r81272  
    4040    static const ClassInfo s_info;
    4141
    42     static PassRefPtr<Structure> createStructure(JSValue proto)
     42    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    4343    {
    44         return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     44        return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4545    }
    4646
  • trunk/Source/JavaScriptCore/API/JSCallbackFunction.h

    r79132 r81272  
    4040    // InternalFunction mish-mashes constructor and function behavior -- we should
    4141    // refactor the code so this override isn't necessary
    42     static PassRefPtr<Structure> createStructure(JSValue proto)
     42    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    4343    {
    44         return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     44        return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4545    }
    4646
  • trunk/Source/JavaScriptCore/API/JSCallbackObject.h

    r79132 r81272  
    129129    bool inherits(JSClassRef) const;
    130130
    131     static PassRefPtr<Structure> createStructure(JSValue proto)
     131    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    132132    {
    133         return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info);
     133        return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), Base::AnonymousSlotCount, &s_info);
    134134    }
    135135   
  • trunk/Source/JavaScriptCore/API/JSContextRef.cpp

    r71375 r81272  
    9494
    9595    if (!globalObjectClass) {
    96         JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject;
     96        JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject(*globalData);
    9797        return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec()));
    9898    }
    9999
    100     JSGlobalObject* globalObject = new (globalData.get()) JSCallbackObject<JSGlobalObject>(globalObjectClass, JSCallbackObject<JSGlobalObject>::createStructure(jsNull()));
     100    JSGlobalObject* globalObject = new (globalData.get()) JSCallbackObject<JSGlobalObject>(globalObjectClass, JSCallbackObject<JSGlobalObject>::createStructure(*globalData, jsNull()));
    101101    ExecState* exec = globalObject->globalExec();
    102102    JSValue prototype = globalObjectClass->prototype(exec);
  • trunk/Source/JavaScriptCore/ChangeLog

    r81262 r81272  
     12011-03-15  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Make Structure creation require a JSGlobalData
     6        https://bugs.webkit.org/show_bug.cgi?id=56438
     7
     8        Mechanical change to make Structure::create require JSGlobalData&, and
     9        require all users to provide the globalData.
     10
     11        * API/JSCallbackConstructor.h:
     12        (JSC::JSCallbackConstructor::createStructure):
     13        * API/JSCallbackFunction.h:
     14        (JSC::JSCallbackFunction::createStructure):
     15        * API/JSCallbackObject.h:
     16        (JSC::JSCallbackObject::createStructure):
     17        * API/JSContextRef.cpp:
     18        * JavaScriptCore.exp:
     19        * debugger/DebuggerActivation.cpp:
     20        (JSC::DebuggerActivation::DebuggerActivation):
     21        * debugger/DebuggerActivation.h:
     22        (JSC::DebuggerActivation::createStructure):
     23        * jit/JITStubs.cpp:
     24        (JSC::DEFINE_STUB_FUNCTION):
     25        * jsc.cpp:
     26        (GlobalObject::GlobalObject):
     27        (functionRun):
     28        (jscmain):
     29        * runtime/Arguments.h:
     30        (JSC::Arguments::createStructure):
     31        * runtime/ArrayPrototype.h:
     32        (JSC::ArrayPrototype::createStructure):
     33        * runtime/BooleanObject.h:
     34        (JSC::BooleanObject::createStructure):
     35        * runtime/DateInstance.h:
     36        (JSC::DateInstance::createStructure):
     37        * runtime/DatePrototype.h:
     38        (JSC::DatePrototype::createStructure):
     39        * runtime/ErrorInstance.h:
     40        (JSC::ErrorInstance::createStructure):
     41        * runtime/Executable.h:
     42        (JSC::ExecutableBase::createStructure):
     43        (JSC::EvalExecutable::createStructure):
     44        (JSC::ProgramExecutable::createStructure):
     45        (JSC::FunctionExecutable::createStructure):
     46        * runtime/FunctionPrototype.h:
     47        (JSC::FunctionPrototype::createStructure):
     48        * runtime/GetterSetter.h:
     49        (JSC::GetterSetter::createStructure):
     50        * runtime/InternalFunction.h:
     51        (JSC::InternalFunction::createStructure):
     52        * runtime/JSAPIValueWrapper.h:
     53        (JSC::JSAPIValueWrapper::createStructure):
     54        * runtime/JSActivation.h:
     55        (JSC::JSActivation::createStructure):
     56        * runtime/JSArray.cpp:
     57        (JSC::JSArray::JSArray):
     58        * runtime/JSArray.h:
     59        (JSC::JSArray::createStructure):
     60        * runtime/JSByteArray.cpp:
     61        (JSC::JSByteArray::createStructure):
     62        * runtime/JSByteArray.h:
     63        (JSC::JSByteArray::JSByteArray):
     64        * runtime/JSCell.h:
     65        (JSC::JSCell::JSCell::createDummyStructure):
     66        * runtime/JSFunction.h:
     67        (JSC::JSFunction::createStructure):
     68        * runtime/JSGlobalData.cpp:
     69        (JSC::JSGlobalData::storeVPtrs):
     70        (JSC::JSGlobalData::JSGlobalData):
     71        * runtime/JSGlobalObject.cpp:
     72        (JSC::JSGlobalObject::reset):
     73        * runtime/JSGlobalObject.h:
     74        (JSC::JSGlobalObject::JSGlobalObject):
     75        (JSC::JSGlobalObject::createStructure):
     76        * runtime/JSNotAnObject.h:
     77        (JSC::JSNotAnObject::createStructure):
     78        * runtime/JSONObject.h:
     79        (JSC::JSONObject::createStructure):
     80        * runtime/JSObject.cpp:
     81        (JSC::JSObject::createInheritorID):
     82        * runtime/JSObject.h:
     83        (JSC::JSObject::createStructure):
     84        (JSC::JSNonFinalObject::createStructure):
     85        (JSC::JSFinalObject::createStructure):
     86        (JSC::createEmptyObjectStructure):
     87        (JSC::JSObject::inheritorID):
     88        * runtime/JSObjectWithGlobalObject.h:
     89        (JSC::JSObjectWithGlobalObject::createStructure):
     90        * runtime/JSPropertyNameIterator.h:
     91        (JSC::JSPropertyNameIterator::createStructure):
     92        * runtime/JSStaticScopeObject.h:
     93        (JSC::JSStaticScopeObject::createStructure):
     94        * runtime/JSString.h:
     95        (JSC::RopeBuilder::createStructure):
     96        * runtime/JSVariableObject.h:
     97        (JSC::JSVariableObject::createStructure):
     98        * runtime/JSWrapperObject.h:
     99        (JSC::JSWrapperObject::createStructure):
     100        * runtime/JSZombie.h:
     101        (JSC::JSZombie::createStructure):
     102        * runtime/MathObject.h:
     103        (JSC::MathObject::createStructure):
     104        * runtime/NativeErrorConstructor.cpp:
     105        (JSC::NativeErrorConstructor::NativeErrorConstructor):
     106        * runtime/NativeErrorConstructor.h:
     107        (JSC::NativeErrorConstructor::createStructure):
     108        * runtime/NumberConstructor.h:
     109        (JSC::NumberConstructor::createStructure):
     110        * runtime/NumberObject.h:
     111        (JSC::NumberObject::createStructure):
     112        * runtime/ObjectConstructor.h:
     113        (JSC::ObjectConstructor::createStructure):
     114        * runtime/RegExpConstructor.h:
     115        (JSC::RegExpConstructor::createStructure):
     116        * runtime/RegExpObject.h:
     117        (JSC::RegExpObject::createStructure):
     118        * runtime/ScopeChain.h:
     119        (JSC::ScopeChainNode::createStructure):
     120        * runtime/StringObject.h:
     121        (JSC::StringObject::createStructure):
     122        * runtime/StringObjectThatMasqueradesAsUndefined.h:
     123        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
     124        * runtime/StringPrototype.h:
     125        (JSC::StringPrototype::createStructure):
     126        * runtime/Structure.h:
     127        (JSC::Structure::create):
     128
    11292011-03-16  Geoffrey Garen  <ggaren@apple.com>
    2130
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r80995 r81272  
    114114__ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE
    115115__ZN3JSC11JSByteArray13s_defaultInfoE
    116 __ZN3JSC11JSByteArray15createStructureENS_7JSValueEPKNS_9ClassInfoE
     116__ZN3JSC11JSByteArray15createStructureERNS_12JSGlobalDataENS_7JSValueEPKNS_9ClassInfoE
    117117__ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayE
    118118__ZN3JSC11MarkedSpace21allocateFromSizeClassERNS0_9SizeClassE
     
    288288__ZN3JSC8JSObject15unwrappedObjectEv
    289289__ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
    290 __ZN3JSC8JSObject17createInheritorIDEv
    291290__ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb
    292291__ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_10JSFunctionEj
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def

    r80995 r81272  
    103103    ?createEmptyString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@@Z
    104104    ?createError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z
    105     ?createInheritorID@JSObject@JSC@@AAEPAVStructure@2@XZ
    106105    ?createInterruptedExecutionException@JSC@@YAPAVJSObject@1@PAVJSGlobalData@1@@Z
    107106    ?createLeaked@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4ThreadStackType@2@@Z
     
    110109    ?createSingleCharacterString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@E@Z
    111110    ?createStackOverflowError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z
    112     ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@VJSValue@2@PBUClassInfo@2@@Z
     111    ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@AAVJSGlobalData@2@VJSValue@2@PBUClassInfo@2@@Z
    113112    ?createSyntaxError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z
    114113    ?createTable@HashTable@JSC@@ABEXPAVJSGlobalData@2@@Z
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r81191 r81272  
    26392639                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
    26402640                        compatibilityVersion = "Xcode 3.1";
     2641                        developmentRegion = English;
    26412642                        hasScannedForEncodings = 1;
    26422643                        knownRegions = (
  • trunk/Source/JavaScriptCore/debugger/DebuggerActivation.cpp

    r78732 r81272  
    3232
    3333DebuggerActivation::DebuggerActivation(JSGlobalData& globalData, JSObject* activation)
    34     : JSNonFinalObject(DebuggerActivation::createStructure(jsNull()))
     34    : JSNonFinalObject(DebuggerActivation::createStructure(globalData, jsNull()))
    3535{
    3636    ASSERT(activation);
  • trunk/Source/JavaScriptCore/debugger/DebuggerActivation.h

    r79132 r81272  
    5050        virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName);
    5151
    52         static PassRefPtr<Structure> createStructure(JSValue prototype)
     52        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    5353        {
    54             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     54            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    5555        }
    5656
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r81191 r81272  
    11751175    JSValue proto = stackFrame.args[0].jsValue();
    11761176    if (proto.isObject())
    1177         structure = asObject(proto)->inheritorID();
     1177        structure = asObject(proto)->inheritorID(*stackFrame.globalData);
    11781178    else
    11791179        structure = constructor->scope()->globalObject->emptyObjectStructure();
  • trunk/Source/JavaScriptCore/jsc.cpp

    r79712 r81272  
    142142class GlobalObject : public JSGlobalObject {
    143143public:
    144     GlobalObject(const Vector<UString>& arguments);
     144    GlobalObject(JSGlobalData&, const Vector<UString>& arguments);
    145145    virtual UString className() const { return "global"; }
    146146};
     
    148148ASSERT_CLASS_FITS_IN_CELL(GlobalObject);
    149149
    150 GlobalObject::GlobalObject(const Vector<UString>& arguments)
    151     : JSGlobalObject()
     150GlobalObject::GlobalObject(JSGlobalData& globalData, const Vector<UString>& arguments)
     151    : JSGlobalObject(globalData)
    152152{
    153153    putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "debug"), functionDebug));
     
    213213        return JSValue::encode(throwError(exec, createError(exec, "Could not open file.")));
    214214
    215     GlobalObject* globalObject = new (&exec->globalData()) GlobalObject(Vector<UString>());
     215    GlobalObject* globalObject = new (&exec->globalData()) GlobalObject(exec->globalData(), Vector<UString>());
    216216
    217217    StopWatch stopWatch;
     
    537537    parseArguments(argc, argv, options, globalData);
    538538
    539     GlobalObject* globalObject = new (globalData) GlobalObject(options.arguments);
     539    GlobalObject* globalObject = new (globalData) GlobalObject(*globalData, options.arguments);
    540540    bool success = runWithScripts(globalObject, options.scripts, options.dump);
    541541    if (options.interactive && success)
  • trunk/Source/JavaScriptCore/runtime/Arguments.h

    r80742 r81272  
    9393        }
    9494
    95         static PassRefPtr<Structure> createStructure(JSValue prototype)
     95        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    9696        {
    97             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     97            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    9898        }
    9999
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h

    r79132 r81272  
    3636        static const ClassInfo s_info;
    3737
    38         static PassRefPtr<Structure> createStructure(JSValue prototype)
     38        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3939        {
    40             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     40            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4141        }
    4242
  • trunk/Source/JavaScriptCore/runtime/BooleanObject.h

    r79132 r81272  
    3232        static const ClassInfo s_info;
    3333       
    34         static PassRefPtr<Structure> createStructure(JSValue prototype)
     34        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3535        {
    36             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     36            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    3737        }
    3838    };
  • trunk/Source/JavaScriptCore/runtime/DateInstance.h

    r81086 r81272  
    5454        }
    5555
    56         static PassRefPtr<Structure> createStructure(JSValue prototype)
     56        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    5757        {
    58             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     58            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    5959        }
    6060
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.h

    r81086 r81272  
    3737        static const ClassInfo s_info;
    3838
    39         static PassRefPtr<Structure> createStructure(JSValue prototype)
     39        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4040        {
    41             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     41            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4242        }
    4343
  • trunk/Source/JavaScriptCore/runtime/ErrorInstance.h

    r79132 r81272  
    3030        static const ClassInfo s_info;
    3131
    32         static PassRefPtr<Structure> createStructure(JSValue prototype)
     32        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3333        {
    34             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     34            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    3535        }
    3636
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r80738 r81272  
    6666        }
    6767
    68         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
     68        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
    6969
    7070    protected:
     
    238238        }
    239239#endif
    240         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
     240        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
    241241
    242242    private:
     
    283283#endif
    284284       
    285         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
     285        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
    286286
    287287    private:
     
    373373        void markChildren(MarkStack&);
    374374        static FunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);
    375         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
     375        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
    376376
    377377    private:
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h

    r79177 r81272  
    3131        void addFunctionProperties(ExecState*, JSGlobalObject*, Structure* functionStructure, JSFunction** callFunction, JSFunction** applyFunction);
    3232
    33         static PassRefPtr<Structure> createStructure(JSValue proto)
     33        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    3434        {
    35             return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     35            return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    3636        }
    3737
  • trunk/Source/JavaScriptCore/runtime/GetterSetter.h

    r79132 r81272  
    4848        JSObject* setter() const { return m_setter.get(); }
    4949        void setSetter(JSGlobalData& globalData, JSObject* setter) { m_setter.set(globalData, this, setter); }
    50         static PassRefPtr<Structure> createStructure(JSValue prototype)
     50        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    5151        {
    52             return Structure::create(prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount, 0);
     52            return Structure::create(globalData, prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount, 0);
    5353        }
    5454    private:
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.h

    r79132 r81272  
    4040        const UString calculatedDisplayName(ExecState*);
    4141
    42         static PassRefPtr<Structure> createStructure(JSValue proto)
     42        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    4343        {
    44             return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     44            return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4545        }
    4646
  • trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h

    r79132 r81272  
    3636        virtual bool isAPIValueWrapper() const { return true; }
    3737
    38         static PassRefPtr<Structure> createStructure(JSValue prototype)
     38        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3939        {
    40             return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, 0);
     40            return Structure::create(globalData, prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, 0);
    4141        }
    4242
  • trunk/Source/JavaScriptCore/runtime/JSActivation.h

    r81040 r81272  
    6767        static const ClassInfo s_info;
    6868
    69         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); }
     69        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); }
    7070
    7171    protected:
  • trunk/Source/JavaScriptCore/runtime/JSArray.cpp

    r79240 r81272  
    128128
    129129JSArray::JSArray(VPtrStealingHackType)
    130     : JSNonFinalObject(createStructure(jsNull()))
     130    : JSNonFinalObject(Structure::create(Structure::VPtrStealingHack, &s_info))
    131131{
    132132    ASSERT(inherits(&s_info));
  • trunk/Source/JavaScriptCore/runtime/JSArray.h

    r81261 r81272  
    125125        void copyToRegisters(ExecState*, Register*, uint32_t);
    126126
    127         static PassRefPtr<Structure> createStructure(JSValue prototype)
    128         {
    129             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     127        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     128        {
     129            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    130130        }
    131131       
  • trunk/Source/JavaScriptCore/runtime/JSByteArray.cpp

    r79132 r81272  
    5151
    5252
    53 PassRefPtr<Structure> JSByteArray::createStructure(JSValue prototype, const JSC::ClassInfo* classInfo)
     53PassRefPtr<Structure> JSByteArray::createStructure(JSGlobalData& globalData, JSValue prototype, const JSC::ClassInfo* classInfo)
    5454{
    55     return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, classInfo);
     55    return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, classInfo);
    5656}
    5757
  • trunk/Source/JavaScriptCore/runtime/JSByteArray.h

    r79501 r81272  
    7777
    7878        JSByteArray(ExecState*, NonNullPassRefPtr<Structure>, WTF::ByteArray* storage);
    79         static PassRefPtr<Structure> createStructure(JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo);
     79        static PassRefPtr<Structure> createStructure(JSGlobalData&, JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo);
    8080
    8181        virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
     
    103103        enum VPtrStealingHackType { VPtrStealingHack };
    104104        JSByteArray(VPtrStealingHackType)
    105             : JSNonFinalObject(createStructure(jsNull()))
     105            : JSNonFinalObject(Structure::create(Structure::VPtrStealingHack, &s_info))
    106106        {
    107107        }
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r81261 r81272  
    7373
    7474    public:
    75         static PassRefPtr<Structure> createDummyStructure()
     75        static PassRefPtr<Structure> createDummyStructure(JSGlobalData& globalData)
    7676        {
    77             return Structure::create(jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0);
     77            return Structure::create(globalData, jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0);
    7878        }
    7979
  • trunk/Source/JavaScriptCore/runtime/JSFunction.h

    r80598 r81272  
    7474        static JS_EXPORTDATA const ClassInfo s_info;
    7575
    76         static PassRefPtr<Structure> createStructure(JSValue prototype)
     76        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    7777        {
    78             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     78            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    7979        }
    8080
  • trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp

    r81188 r81272  
    109109    COMPILE_ASSERT(sizeof(JSFunction) <= sizeof(storage), sizeof_JSFunction_must_be_less_than_storage);
    110110    char executableStorage[sizeof(VPtrHackExecutable)];
    111     VPtrHackExecutable* executable = new (executableStorage) VPtrHackExecutable(VPtrHackExecutable::createStructure(jsNull()));
    112     JSCell* jsFunction = new (storage) JSFunction(JSFunction::createStructure(jsNull()), executable);
     111    VPtrHackExecutable* executable = new (executableStorage) VPtrHackExecutable(Structure::create(Structure::VPtrStealingHack, 0));
     112    JSCell* jsFunction = new (storage) JSFunction(Structure::create(Structure::VPtrStealingHack, &JSFunction::s_info), executable);
    113113    JSGlobalData::jsFunctionVPtr = jsFunction->vptr();
    114114    jsFunction->~JSCell();
     
    127127    , regExpConstructorTable(fastNew<HashTable>(JSC::regExpConstructorTable))
    128128    , stringTable(fastNew<HashTable>(JSC::stringTable))
    129     , activationStructure(JSActivation::createStructure(jsNull()))
    130     , interruptedExecutionErrorStructure(JSNonFinalObject::createStructure(jsNull()))
    131     , terminatedExecutionErrorStructure(JSNonFinalObject::createStructure(jsNull()))
    132     , staticScopeStructure(JSStaticScopeObject::createStructure(jsNull()))
    133     , strictEvalActivationStructure(StrictEvalActivation::createStructure(jsNull()))
    134     , stringStructure(JSString::createStructure(jsNull()))
    135     , notAnObjectStructure(JSNotAnObject::createStructure(jsNull()))
    136     , propertyNameIteratorStructure(JSPropertyNameIterator::createStructure(jsNull()))
    137     , getterSetterStructure(GetterSetter::createStructure(jsNull()))
    138     , apiWrapperStructure(JSAPIValueWrapper::createStructure(jsNull()))
    139     , scopeChainNodeStructure(ScopeChainNode::createStructure(jsNull()))
    140     , executableStructure(ExecutableBase::createStructure(jsNull()))
    141     , evalExecutableStructure(EvalExecutable::createStructure(jsNull()))
    142     , programExecutableStructure(ProgramExecutable::createStructure(jsNull()))
    143     , functionExecutableStructure(FunctionExecutable::createStructure(jsNull()))
    144     , dummyMarkableCellStructure(JSCell::createDummyStructure())
    145129    , identifierTable(globalDataType == Default ? wtfThreadData().currentIdentifierTable() : createIdentifierTable())
    146130    , propertyNames(new CommonIdentifiers(this))
     
    162146#endif
    163147{
     148    activationStructure = JSActivation::createStructure(*this, jsNull());
     149    interruptedExecutionErrorStructure = JSNonFinalObject::createStructure(*this, jsNull());
     150    terminatedExecutionErrorStructure = JSNonFinalObject::createStructure(*this, jsNull());
     151    staticScopeStructure = JSStaticScopeObject::createStructure(*this, jsNull());
     152    strictEvalActivationStructure = StrictEvalActivation::createStructure(*this, jsNull());
     153    stringStructure = JSString::createStructure(*this, jsNull());
     154    notAnObjectStructure = JSNotAnObject::createStructure(*this, jsNull());
     155    propertyNameIteratorStructure = JSPropertyNameIterator::createStructure(*this, jsNull());
     156    getterSetterStructure = GetterSetter::createStructure(*this, jsNull());
     157    apiWrapperStructure = JSAPIValueWrapper::createStructure(*this, jsNull());
     158    scopeChainNodeStructure = ScopeChainNode::createStructure(*this, jsNull());
     159    executableStructure = ExecutableBase::createStructure(*this, jsNull());
     160    evalExecutableStructure = EvalExecutable::createStructure(*this, jsNull());
     161    programExecutableStructure = ProgramExecutable::createStructure(*this, jsNull());
     162    functionExecutableStructure = FunctionExecutable::createStructure(*this, jsNull());
     163    dummyMarkableCellStructure = JSCell::createDummyStructure(*this);
     164
    164165    interpreter = new Interpreter(*this);
    165166    if (globalDataType == Default)
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r81100 r81272  
    176176    // Prototypes
    177177
    178     m_functionPrototype.set(exec->globalData(), this, new (exec) FunctionPrototype(exec, this, FunctionPrototype::createStructure(jsNull()))); // The real prototype will be set once ObjectPrototype is created.
    179     m_functionStructure = JSFunction::createStructure(m_functionPrototype.get());
    180     m_internalFunctionStructure = InternalFunction::createStructure(m_functionPrototype.get());
     178    m_functionPrototype.set(exec->globalData(), this, new (exec) FunctionPrototype(exec, this, FunctionPrototype::createStructure(exec->globalData(), jsNull()))); // The real prototype will be set once ObjectPrototype is created.
     179    m_functionStructure = JSFunction::createStructure(exec->globalData(), m_functionPrototype.get());
     180    m_internalFunctionStructure = InternalFunction::createStructure(exec->globalData(), m_functionPrototype.get());
    181181    JSFunction* callFunction = 0;
    182182    JSFunction* applyFunction = 0;
     
    184184    m_callFunction.set(exec->globalData(), this, callFunction);
    185185    m_applyFunction.set(exec->globalData(), this, applyFunction);
    186     m_objectPrototype.set(exec->globalData(), this, new (exec) ObjectPrototype(exec, this, ObjectPrototype::createStructure(jsNull()), m_functionStructure.get()));
     186    m_objectPrototype.set(exec->globalData(), this, new (exec) ObjectPrototype(exec, this, ObjectPrototype::createStructure(exec->globalData(), jsNull()), m_functionStructure.get()));
    187187    m_functionPrototype->structure()->setPrototypeWithoutTransition(m_objectPrototype.get());
    188188
    189     m_emptyObjectStructure = m_objectPrototype->inheritorID();
    190 
    191     m_callbackFunctionStructure = JSCallbackFunction::createStructure(m_functionPrototype.get());
    192     m_argumentsStructure = Arguments::createStructure(m_objectPrototype.get());
    193     m_callbackConstructorStructure = JSCallbackConstructor::createStructure(m_objectPrototype.get());
    194     m_callbackObjectStructure = JSCallbackObject<JSObjectWithGlobalObject>::createStructure(m_objectPrototype.get());
    195 
    196     m_arrayPrototype.set(exec->globalData(), this, new (exec) ArrayPrototype(this, ArrayPrototype::createStructure(m_objectPrototype.get())));
    197     m_arrayStructure = JSArray::createStructure(m_arrayPrototype.get());
    198     m_regExpMatchesArrayStructure = RegExpMatchesArray::createStructure(m_arrayPrototype.get());
    199 
    200     m_stringPrototype.set(exec->globalData(), this, new (exec) StringPrototype(exec, this, StringPrototype::createStructure(m_objectPrototype.get())));
    201     m_stringObjectStructure = StringObject::createStructure(m_stringPrototype.get());
    202 
    203     m_booleanPrototype.set(exec->globalData(), this, new (exec) BooleanPrototype(exec, this, BooleanPrototype::createStructure(m_objectPrototype.get()), m_functionStructure.get()));
    204     m_booleanObjectStructure = BooleanObject::createStructure(m_booleanPrototype.get());
    205 
    206     m_numberPrototype.set(exec->globalData(), this, new (exec) NumberPrototype(exec, this, NumberPrototype::createStructure(m_objectPrototype.get()), m_functionStructure.get()));
    207     m_numberObjectStructure = NumberObject::createStructure(m_numberPrototype.get());
    208 
    209     m_datePrototype.set(exec->globalData(), this, new (exec) DatePrototype(exec, this, DatePrototype::createStructure(m_objectPrototype.get())));
    210     m_dateStructure = DateInstance::createStructure(m_datePrototype.get());
    211 
    212     m_regExpPrototype.set(exec->globalData(), this, new (exec) RegExpPrototype(exec, this, RegExpPrototype::createStructure(m_objectPrototype.get()), m_functionStructure.get()));
    213     m_regExpStructure = RegExpObject::createStructure(m_regExpPrototype.get());
     189    m_emptyObjectStructure = m_objectPrototype->inheritorID(exec->globalData());
     190
     191    m_callbackFunctionStructure = JSCallbackFunction::createStructure(exec->globalData(), m_functionPrototype.get());
     192    m_argumentsStructure = Arguments::createStructure(exec->globalData(), m_objectPrototype.get());
     193    m_callbackConstructorStructure = JSCallbackConstructor::createStructure(exec->globalData(), m_objectPrototype.get());
     194    m_callbackObjectStructure = JSCallbackObject<JSObjectWithGlobalObject>::createStructure(exec->globalData(), m_objectPrototype.get());
     195
     196    m_arrayPrototype.set(exec->globalData(), this, new (exec) ArrayPrototype(this, ArrayPrototype::createStructure(exec->globalData(), m_objectPrototype.get())));
     197    m_arrayStructure = JSArray::createStructure(exec->globalData(), m_arrayPrototype.get());
     198    m_regExpMatchesArrayStructure = RegExpMatchesArray::createStructure(exec->globalData(), m_arrayPrototype.get());
     199
     200    m_stringPrototype.set(exec->globalData(), this, new (exec) StringPrototype(exec, this, StringPrototype::createStructure(exec->globalData(), m_objectPrototype.get())));
     201    m_stringObjectStructure = StringObject::createStructure(exec->globalData(), m_stringPrototype.get());
     202
     203    m_booleanPrototype.set(exec->globalData(), this, new (exec) BooleanPrototype(exec, this, BooleanPrototype::createStructure(exec->globalData(), m_objectPrototype.get()), m_functionStructure.get()));
     204    m_booleanObjectStructure = BooleanObject::createStructure(exec->globalData(), m_booleanPrototype.get());
     205
     206    m_numberPrototype.set(exec->globalData(), this, new (exec) NumberPrototype(exec, this, NumberPrototype::createStructure(exec->globalData(), m_objectPrototype.get()), m_functionStructure.get()));
     207    m_numberObjectStructure = NumberObject::createStructure(exec->globalData(), m_numberPrototype.get());
     208
     209    m_datePrototype.set(exec->globalData(), this, new (exec) DatePrototype(exec, this, DatePrototype::createStructure(exec->globalData(), m_objectPrototype.get())));
     210    m_dateStructure = DateInstance::createStructure(exec->globalData(), m_datePrototype.get());
     211
     212    m_regExpPrototype.set(exec->globalData(), this, new (exec) RegExpPrototype(exec, this, RegExpPrototype::createStructure(exec->globalData(), m_objectPrototype.get()), m_functionStructure.get()));
     213    m_regExpStructure = RegExpObject::createStructure(exec->globalData(), m_regExpPrototype.get());
    214214
    215215    m_methodCallDummy.set(exec->globalData(), this, constructEmptyObject(exec));
    216216
    217     ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure(m_objectPrototype.get()), m_functionStructure.get());
    218     m_errorStructure = ErrorInstance::createStructure(errorPrototype);
     217    ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure(exec->globalData(), m_objectPrototype.get()), m_functionStructure.get());
     218    m_errorStructure = ErrorInstance::createStructure(exec->globalData(), errorPrototype);
    219219
    220220    // Constructors
    221221
    222     JSCell* objectConstructor = new (exec) ObjectConstructor(exec, this, ObjectConstructor::createStructure(m_functionPrototype.get()), m_objectPrototype.get());
    223     JSCell* functionConstructor = new (exec) FunctionConstructor(exec, this, FunctionConstructor::createStructure(m_functionPrototype.get()), m_functionPrototype.get());
    224     JSCell* arrayConstructor = new (exec) ArrayConstructor(exec, this, ArrayConstructor::createStructure(m_functionPrototype.get()), m_arrayPrototype.get(), m_functionStructure.get());
    225     JSCell* stringConstructor = new (exec) StringConstructor(exec, this, StringConstructor::createStructure(m_functionPrototype.get()), m_functionStructure.get(), m_stringPrototype.get());
    226     JSCell* booleanConstructor = new (exec) BooleanConstructor(exec, this, BooleanConstructor::createStructure(m_functionPrototype.get()), m_booleanPrototype.get());
    227     JSCell* numberConstructor = new (exec) NumberConstructor(exec, this, NumberConstructor::createStructure(m_functionPrototype.get()), m_numberPrototype.get());
    228     JSCell* dateConstructor = new (exec) DateConstructor(exec, this, DateConstructor::createStructure(m_functionPrototype.get()), m_functionStructure.get(), m_datePrototype.get());
    229 
    230     m_regExpConstructor.set(exec->globalData(), this, new (exec) RegExpConstructor(exec, this, RegExpConstructor::createStructure(m_functionPrototype.get()), m_regExpPrototype.get()));
    231 
    232     m_errorConstructor.set(exec->globalData(), this, new (exec) ErrorConstructor(exec, this, ErrorConstructor::createStructure(m_functionPrototype.get()), errorPrototype));
    233 
    234     RefPtr<Structure> nativeErrorPrototypeStructure = NativeErrorPrototype::createStructure(errorPrototype);
    235     RefPtr<Structure> nativeErrorStructure = NativeErrorConstructor::createStructure(m_functionPrototype.get());
     222    JSCell* objectConstructor = new (exec) ObjectConstructor(exec, this, ObjectConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_objectPrototype.get());
     223    JSCell* functionConstructor = new (exec) FunctionConstructor(exec, this, FunctionConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_functionPrototype.get());
     224    JSCell* arrayConstructor = new (exec) ArrayConstructor(exec, this, ArrayConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_arrayPrototype.get(), m_functionStructure.get());
     225    JSCell* stringConstructor = new (exec) StringConstructor(exec, this, StringConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_functionStructure.get(), m_stringPrototype.get());
     226    JSCell* booleanConstructor = new (exec) BooleanConstructor(exec, this, BooleanConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_booleanPrototype.get());
     227    JSCell* numberConstructor = new (exec) NumberConstructor(exec, this, NumberConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_numberPrototype.get());
     228    JSCell* dateConstructor = new (exec) DateConstructor(exec, this, DateConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_functionStructure.get(), m_datePrototype.get());
     229
     230    m_regExpConstructor.set(exec->globalData(), this, new (exec) RegExpConstructor(exec, this, RegExpConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), m_regExpPrototype.get()));
     231
     232    m_errorConstructor.set(exec->globalData(), this, new (exec) ErrorConstructor(exec, this, ErrorConstructor::createStructure(exec->globalData(), m_functionPrototype.get()), errorPrototype));
     233
     234    RefPtr<Structure> nativeErrorPrototypeStructure = NativeErrorPrototype::createStructure(exec->globalData(), errorPrototype);
     235    RefPtr<Structure> nativeErrorStructure = NativeErrorConstructor::createStructure(exec->globalData(), m_functionPrototype.get());
    236236    m_evalErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "EvalError"));
    237237    m_rangeErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "RangeError"));
     
    273273    // Set global values.
    274274    GlobalPropertyInfo staticGlobals[] = {
    275         GlobalPropertyInfo(Identifier(exec, "Math"), new (exec) MathObject(exec, this, MathObject::createStructure(m_objectPrototype.get())), DontEnum | DontDelete),
     275        GlobalPropertyInfo(Identifier(exec, "Math"), new (exec) MathObject(exec, this, MathObject::createStructure(exec->globalData(), m_objectPrototype.get())), DontEnum | DontDelete),
    276276        GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(), DontEnum | DontDelete | ReadOnly),
    277277        GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(Inf), DontEnum | DontDelete | ReadOnly),
    278278        GlobalPropertyInfo(Identifier(exec, "undefined"), jsUndefined(), DontEnum | DontDelete | ReadOnly),
    279         GlobalPropertyInfo(Identifier(exec, "JSON"), new (exec) JSONObject(this, JSONObject::createStructure(m_objectPrototype.get())), DontEnum | DontDelete)
     279        GlobalPropertyInfo(Identifier(exec, "JSON"), new (exec) JSONObject(this, JSONObject::createStructure(exec->globalData(), m_objectPrototype.get())), DontEnum | DontDelete)
    280280    };
    281281
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r81100 r81272  
    114114        void* operator new(size_t, JSGlobalData*);
    115115       
    116         explicit JSGlobalObject()
    117             : JSVariableObject(JSGlobalObject::createStructure(jsNull()), &m_symbolTable, 0)
     116        explicit JSGlobalObject(JSGlobalData& globalData)
     117            : JSVariableObject(JSGlobalObject::createStructure(globalData, jsNull()), &m_symbolTable, 0)
    118118            , m_registerArraySize(0)
    119119            , m_globalScopeChain()
     
    239239        JSGlobalData& globalData() const { return *m_globalData.get(); }
    240240
    241         static PassRefPtr<Structure> createStructure(JSValue prototype)
    242         {
    243             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     241        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     242        {
     243            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    244244        }
    245245
  • trunk/Source/JavaScriptCore/runtime/JSNotAnObject.h

    r79132 r81272  
    4444        }
    4545
    46         static PassRefPtr<Structure> createStructure(JSValue prototype)
     46        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4747        {
    48             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     48            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4949        }
    5050
  • trunk/Source/JavaScriptCore/runtime/JSONObject.h

    r81188 r81272  
    3737        JSONObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure);
    3838
    39         static PassRefPtr<Structure> createStructure(JSValue prototype)
     39        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4040        {
    41             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     41            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4242        }
    4343
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r80742 r81272  
    573573}
    574574
    575 Structure* JSObject::createInheritorID()
    576 {
    577     m_inheritorID = createEmptyObjectStructure(this);
     575Structure* JSObject::createInheritorID(JSGlobalData& globalData)
     576{
     577    m_inheritorID = createEmptyObjectStructure(globalData, this);
    578578    return m_inheritorID.get();
    579579}
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r81040 r81272  
    9393       
    9494        void setStructure(NonNullPassRefPtr<Structure>);
    95         Structure* inheritorID();
     95        Structure* inheritorID(JSGlobalData&);
    9696
    9797        virtual UString className() const;
     
    251251
    252252    protected:
    253         static PassRefPtr<Structure> createStructure(JSValue prototype)
    254         {
    255             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     253        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     254        {
     255            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    256256        }
    257257
     
    297297
    298298        const HashEntry* findPropertyHashEntry(ExecState*, const Identifier& propertyName) const;
    299         Structure* createInheritorID();
     299        Structure* createInheritorID(JSGlobalData&);
    300300
    301301        PropertyStorage m_propertyStorage;
     
    321321
    322322    public:
    323         static PassRefPtr<Structure> createStructure(JSValue prototype)
    324         {
    325             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     323        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     324        {
     325            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    326326        }
    327327
     
    349349        }
    350350
    351         static PassRefPtr<Structure> createStructure(JSValue prototype)
    352         {
    353             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     351        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     352        {
     353            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    354354        }
    355355
     
    378378}
    379379
    380 inline PassRefPtr<Structure> createEmptyObjectStructure(JSValue prototype)
    381 {
    382     return JSFinalObject::createStructure(prototype);
     380inline PassRefPtr<Structure> createEmptyObjectStructure(JSGlobalData& globalData, JSValue prototype)
     381{
     382    return JSFinalObject::createStructure(globalData, prototype);
    383383}
    384384
     
    443443}
    444444
    445 inline Structure* JSObject::inheritorID()
     445inline Structure* JSObject::inheritorID(JSGlobalData& globalData)
    446446{
    447447    if (m_inheritorID)
    448448        return m_inheritorID.get();
    449     return createInheritorID();
     449    return createInheritorID(globalData);
    450450}
    451451
  • trunk/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h

    r79132 r81272  
    3535class JSObjectWithGlobalObject : public JSNonFinalObject {
    3636public:
    37     static PassRefPtr<Structure> createStructure(JSValue proto)
     37    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    3838    {
    39         return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     39        return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4040    }
    4141
  • trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h

    r81040 r81272  
    4646        static JSPropertyNameIterator* create(ExecState*, JSObject*);
    4747       
    48         static PassRefPtr<Structure> createStructure(JSValue prototype)
     48        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4949        {
    50             return Structure::create(prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount, 0);
     50            return Structure::create(globalData, prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount, 0);
    5151        }
    5252
  • trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.h

    r80742 r81272  
    4848        void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes);
    4949
    50         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); }
     50        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); }
    5151
    5252    protected:
  • trunk/Source/JavaScriptCore/runtime/JSString.h

    r81071 r81272  
    350350        JSValue replaceCharacter(ExecState*, UChar, const UString& replacement);
    351351
    352         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount, 0); }
     352        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(StringType, OverridesGetOwnPropertySlot | NeedsThisConversion), AnonymousSlotCount, 0); }
    353353
    354354    private:
  • trunk/Source/JavaScriptCore/runtime/JSVariableObject.h

    r80969 r81272  
    5959        WriteBarrier<Unknown>* const * addressOfRegisters() const { return &m_registers; }
    6060
    61         static PassRefPtr<Structure> createStructure(JSValue prototype)
     61        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6262        {
    63             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     63            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6464        }
    6565       
  • trunk/Source/JavaScriptCore/runtime/JSWrapperObject.h

    r81086 r81272  
    3737        void setInternalValue(JSGlobalData&, JSValue);
    3838
    39         static PassRefPtr<Structure> createStructure(JSValue prototype)
     39        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4040        {
    41             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     41            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4242        }
    4343
  • trunk/Source/JavaScriptCore/runtime/JSZombie.h

    r80751 r81272  
    6767    virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&) { ASSERT_NOT_REACHED(); return false; }
    6868   
    69     static PassRefPtr<Structure> createStructure(JSValue prototype)
     69    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    7070    {
    71         return Structure::create(prototype, TypeInfo(ObjectType, 0), AnonymousSlotCount, &s_info);
     71        return Structure::create(globalData, prototype, TypeInfo(ObjectType, 0), AnonymousSlotCount, &s_info);
    7272    }
    7373
  • trunk/Source/JavaScriptCore/runtime/MathObject.h

    r79132 r81272  
    3535        static const ClassInfo s_info;
    3636
    37         static PassRefPtr<Structure> createStructure(JSValue prototype)
     37        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3838        {
    39             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     39            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4040        }
    4141
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r79240 r81272  
    4242    putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5
    4343    putDirect(exec->globalData(), exec->propertyNames().prototype, prototype, DontDelete | ReadOnly | DontEnum);
    44     m_errorStructure = ErrorInstance::createStructure(prototype);
     44    m_errorStructure = ErrorInstance::createStructure(exec->globalData(), prototype);
    4545}
    4646
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h

    r79132 r81272  
    3636        static const ClassInfo s_info;
    3737
    38         static PassRefPtr<Structure> createStructure(JSValue prototype)
     38        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3939        {
    40             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     40            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4141        }
    4242
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.h

    r79132 r81272  
    3838        static const ClassInfo s_info;
    3939
    40         static PassRefPtr<Structure> createStructure(JSValue proto)
     40        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    4141        {
    42             return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     42            return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4343        }
    4444
  • trunk/Source/JavaScriptCore/runtime/NumberObject.h

    r81086 r81272  
    3232        static const ClassInfo s_info;
    3333
    34         static PassRefPtr<Structure> createStructure(JSValue prototype)
     34        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3535        {
    36             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     36            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    3737        }
    3838
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h

    r80378 r81272  
    3737        static const ClassInfo s_info;
    3838
    39         static PassRefPtr<Structure> createStructure(JSValue prototype)
     39        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4040        {
    41             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     41            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4242        }
    4343
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h

    r79132 r81272  
    6060        RegExpConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, RegExpPrototype*);
    6161
    62         static PassRefPtr<Structure> createStructure(JSValue prototype)
     62        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6363        {
    64             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     64            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6565        }
    6666
  • trunk/Source/JavaScriptCore/runtime/RegExpObject.h

    r80743 r81272  
    5959        static JS_EXPORTDATA const ClassInfo s_info;
    6060
    61         static PassRefPtr<Structure> createStructure(JSValue prototype)
     61        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6262        {
    63             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     63            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6464        }
    6565
  • trunk/Source/JavaScriptCore/runtime/ScopeChain.h

    r81040 r81272  
    6565#endif
    6666       
    67         static PassRefPtr<Structure> createStructure(JSValue proto) { return Structure::create(proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
     67        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) { return Structure::create(globalData, proto, TypeInfo(CompoundType, StructureFlags), AnonymousSlotCount, 0); }
    6868        virtual void markChildren(MarkStack&);
    6969    private:
  • trunk/Source/JavaScriptCore/runtime/StringObject.h

    r81086 r81272  
    4646        JSString* internalValue() const { return asString(JSWrapperObject::internalValue());}
    4747
    48         static PassRefPtr<Structure> createStructure(JSValue prototype)
     48        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4949        {
    50             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     50            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    5151        }
    5252
  • trunk/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h

    r79132 r81272  
    3434        {
    3535            return new (exec) StringObjectThatMasqueradesAsUndefined(exec,
    36                 createStructure(exec->lexicalGlobalObject()->stringPrototype()), string);
     36                createStructure(exec->globalData(), exec->lexicalGlobalObject()->stringPrototype()), string);
    3737        }
    3838
     
    4343        }
    4444
    45         static PassRefPtr<Structure> createStructure(JSValue proto)
     45        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto)
    4646        {
    47             return Structure::create(proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     47            return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4848        }
    4949
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.h

    r81086 r81272  
    3535        virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
    3636
    37         static PassRefPtr<Structure> createStructure(JSValue prototype)
     37        static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    3838        {
    39             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     39            return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4040        }
    4141
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r80969 r81272  
    5858    public:
    5959        friend class StructureTransitionTable;
    60         static PassRefPtr<Structure> create(JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
     60        static PassRefPtr<Structure> create(JSGlobalData&, JSValue prototype, const TypeInfo& typeInfo, unsigned anonymousSlotCount, const ClassInfo* classInfo)
    6161        {
    6262            return adoptRef(new Structure(prototype, typeInfo, anonymousSlotCount, classInfo));
     63        }
     64
     65        enum VPtrStealingHackType { VPtrStealingHack };
     66        static PassRefPtr<Structure> create(VPtrStealingHackType, const ClassInfo* classInfo)
     67        {
     68            return adoptRef(new Structure(jsNull(), TypeInfo(UnspecifiedType), 0, classInfo));
    6369        }
    6470
  • trunk/Source/JavaScriptGlue/ChangeLog

    r81135 r81272  
     12011-03-15  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Make Structure creation require a JSGlobalData
     6        https://bugs.webkit.org/show_bug.cgi?id=56438
     7
     8        Mechanical change to make all structure creation pass a JSGlobalData&.
     9
     10        * JSRun.cpp:
     11        (JSGlueGlobalObject::JSGlueGlobalObject):
     12        (JSRun::JSRun):
     13        * JSRun.h:
     14        * JSUtils.cpp:
     15        (getThreadGlobalObject):
     16        * UserObjectImp.h:
     17        (UserObjectImp::createStructure):
     18
    1192011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
    220
  • trunk/Source/JavaScriptGlue/JSRun.cpp

    r80742 r81272  
    3434#include <JavaScriptCore/SourceCode.h>
    3535
    36 JSGlueGlobalObject::JSGlueGlobalObject(PassRefPtr<Structure> structure, JSFlags flags)
     36JSGlueGlobalObject::JSGlueGlobalObject(JSGlobalData& globalData, PassRefPtr<Structure> structure, JSFlags flags)
    3737    : JSGlobalObject(structure)
    3838    , m_flags(flags)
    39     , m_userObjectStructure(UserObjectImp::createStructure(jsNull()))
     39    , m_userObjectStructure(UserObjectImp::createStructure(globalData, jsNull()))
    4040{
    4141}
     
    4444    :   JSBase(kJSRunTypeID),
    4545        fSource(CFStringToUString(source)),
    46         fGlobalObject(getThreadGlobalExecState()->globalData(), new (&getThreadGlobalExecState()->globalData()) JSGlueGlobalObject(JSGlueGlobalObject::createStructure(jsNull()), inFlags)),
     46        fGlobalObject(getThreadGlobalExecState()->globalData(), new (&getThreadGlobalExecState()->globalData()) JSGlueGlobalObject(getThreadGlobalExecState()->globalData(), JSGlueGlobalObject::createStructure(getThreadGlobalExecState()->globalData(), jsNull()), inFlags)),
    4747        fFlags(inFlags)
    4848{
  • trunk/Source/JavaScriptGlue/JSRun.h

    r80742 r81272  
    3535class JSGlueGlobalObject : public JSGlobalObject {
    3636    public:
    37         JSGlueGlobalObject(PassRefPtr<Structure>, JSFlags = kJSFlagNone);
     37        JSGlueGlobalObject(JSGlobalData&, PassRefPtr<Structure>, JSFlags = kJSFlagNone);
    3838
    3939        JSFlags Flags() const { return m_flags; }
  • trunk/Source/JavaScriptGlue/JSUtils.cpp

    r79132 r81272  
    415415    JSGlueGlobalObject* globalObject = static_cast<JSGlueGlobalObject*>(pthread_getspecific(globalObjectKey));
    416416    if (!globalObject) {
    417         globalObject = new (getThreadGlobalData()) JSGlueGlobalObject(JSGlueGlobalObject::createStructure(jsNull()));
     417        globalObject = new (getThreadGlobalData()) JSGlueGlobalObject(*getThreadGlobalData(), JSGlueGlobalObject::createStructure(*getThreadGlobalData(), jsNull()));
    418418        gcProtect(globalObject);
    419419        pthread_setspecific(globalObjectKey, globalObject);
  • trunk/Source/JavaScriptGlue/UserObjectImp.h

    r79132 r81272  
    5959    JSUserObject *GetJSUserObject() const;
    6060
    61     static PassRefPtr<Structure> createStructure(JSValue prototype)
     61    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6262    {
    63         return Structure::create(prototype, TypeInfo(ObjectType, OverridesGetOwnPropertySlot | OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, &s_info);
     63        return Structure::create(globalData, prototype, TypeInfo(ObjectType, OverridesGetOwnPropertySlot | OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, &s_info);
    6464    }
    6565
  • trunk/Source/WebCore/ChangeLog

    r81267 r81272  
     12011-03-15  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Make Structure creation require a JSGlobalData
     6        https://bugs.webkit.org/show_bug.cgi?id=56438
     7
     8        Mechanical change to make all structure creation use GlobalData
     9
     10        * bindings/js/JSAudioConstructor.cpp:
     11        (WebCore::JSAudioConstructor::JSAudioConstructor):
     12        * bindings/js/JSAudioConstructor.h:
     13        (WebCore::JSAudioConstructor::createStructure):
     14        * bindings/js/JSDOMBinding.h:
     15        (WebCore::DOMObjectWithGlobalPointer::createStructure):
     16        (WebCore::DOMConstructorObject::createStructure):
     17        (WebCore::getDOMStructure):
     18        * bindings/js/JSDOMGlobalObject.h:
     19        (WebCore::JSDOMGlobalObject::createStructure):
     20        * bindings/js/JSDOMWindowBase.h:
     21        (WebCore::JSDOMWindowBase::createStructure):
     22        * bindings/js/JSDOMWindowShell.cpp:
     23        (WebCore::JSDOMWindowShell::JSDOMWindowShell):
     24        (WebCore::JSDOMWindowShell::setWindow):
     25        * bindings/js/JSDOMWindowShell.h:
     26        (WebCore::JSDOMWindowShell::createStructure):
     27        * bindings/js/JSImageConstructor.cpp:
     28        (WebCore::JSImageConstructor::JSImageConstructor):
     29        * bindings/js/JSImageConstructor.h:
     30        (WebCore::JSImageConstructor::createStructure):
     31        * bindings/js/JSImageDataCustom.cpp:
     32        (WebCore::toJS):
     33        * bindings/js/JSOptionConstructor.cpp:
     34        (WebCore::JSOptionConstructor::JSOptionConstructor):
     35        * bindings/js/JSOptionConstructor.h:
     36        (WebCore::JSOptionConstructor::createStructure):
     37        * bindings/js/JSWorkerContextBase.h:
     38        (WebCore::JSWorkerContextBase::createStructure):
     39        * bindings/js/WorkerScriptController.cpp:
     40        (WebCore::WorkerScriptController::initScript):
     41        * bindings/scripts/CodeGeneratorJS.pm:
     42        * bridge/c/CRuntimeObject.h:
     43        (JSC::Bindings::CRuntimeObject::createStructure):
     44        * bridge/c/c_instance.cpp:
     45        (JSC::Bindings::CRuntimeMethod::createStructure):
     46        * bridge/jni/jsc/JavaInstanceJSC.cpp:
     47        (JavaRuntimeMethod::createStructure):
     48        * bridge/jni/jsc/JavaRuntimeObject.h:
     49        (JSC::Bindings::JavaRuntimeObject::createStructure):
     50        * bridge/objc/ObjCRuntimeObject.h:
     51        (JSC::Bindings::ObjCRuntimeObject::createStructure):
     52        * bridge/objc/objc_instance.mm:
     53        (ObjCRuntimeMethod::createStructure):
     54        * bridge/objc/objc_runtime.h:
     55        (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
     56        * bridge/runtime_array.h:
     57        (JSC::RuntimeArray::createStructure):
     58        * bridge/runtime_method.h:
     59        (JSC::RuntimeMethod::createStructure):
     60        * bridge/runtime_object.h:
     61        (JSC::Bindings::RuntimeObject::createStructure):
     62
    1632011-03-16  Pratik Solanki  <psolanki@apple.com>
    264
  • trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp

    r79240 r81272  
    4141
    4242JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
    43     : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->objectPrototype()), globalObject)
     43    : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
    4444{
    4545    ASSERT(inherits(&s_info));
  • trunk/Source/WebCore/bindings/js/JSAudioConstructor.h

    r79132 r81272  
    3939        JSAudioConstructor(JSC::ExecState*, JSDOMGlobalObject*);
    4040
    41         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     41        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    4242        {
    43             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     43            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4444        }
    4545
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.h

    r79616 r81272  
    6565        }
    6666
    67         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
    68         {
    69             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     67        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
     68        {
     69            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    7070        }
    7171
     
    8484    class DOMConstructorObject : public DOMObjectWithGlobalPointer {
    8585    public:
    86         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
    87         {
    88             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     86        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
     87        {
     88            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    8989        }
    9090
     
    144144        if (JSC::Structure* structure = getCachedDOMStructure(globalObject, &WrapperClass::s_info))
    145145            return structure;
    146         return cacheDOMStructure(globalObject, WrapperClass::createStructure(WrapperClass::createPrototype(exec, globalObject)), &WrapperClass::s_info);
     146        return cacheDOMStructure(globalObject, WrapperClass::createStructure(exec->globalData(), WrapperClass::createPrototype(exec, globalObject)), &WrapperClass::s_info);
    147147    }
    148148    template<class WrapperClass> inline JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState* exec)
  • trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h

    r80742 r81272  
    7070        static const JSC::ClassInfo s_info;
    7171
    72         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     72        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    7373        {
    74             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     74            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    7575        }
    7676
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h

    r80742 r81272  
    5858        static const JSC::ClassInfo s_info;
    5959
    60         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     60        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    6161        {
    62             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     62            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6363        }
    6464
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp

    r79132 r81272  
    4545
    4646JSDOMWindowShell::JSDOMWindowShell(PassRefPtr<DOMWindow> window, DOMWrapperWorld* world)
    47     : Base(JSDOMWindowShell::createStructure(jsNull()))
     47    : Base(JSDOMWindowShell::createStructure(*world->globalData(), jsNull()))
    4848    , m_world(world)
    4949{
     
    6161    // when we allocate the global object. (Once the global object is fully
    6262    // constructed, it can mark its own prototype.)
    63     RefPtr<Structure> prototypeStructure = JSDOMWindowPrototype::createStructure(jsNull());
     63    RefPtr<Structure> prototypeStructure = JSDOMWindowPrototype::createStructure(*JSDOMWindow::commonJSGlobalData(), jsNull());
    6464    Global<JSDOMWindowPrototype> prototype(*JSDOMWindow::commonJSGlobalData(), new JSDOMWindowPrototype(0, prototypeStructure.release()));
    6565
    66     RefPtr<Structure> structure = JSDOMWindow::createStructure(prototype.get());
     66    RefPtr<Structure> structure = JSDOMWindow::createStructure(*JSDOMWindow::commonJSGlobalData(), prototype.get());
    6767    JSDOMWindow* jsDOMWindow = new (JSDOMWindow::commonJSGlobalData()) JSDOMWindow(structure.release(), domWindow, this);
    6868    prototype->putAnonymousValue(*JSDOMWindow::commonJSGlobalData(), 0, jsDOMWindow);
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.h

    r79132 r81272  
    5959        void* operator new(size_t);
    6060
    61         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     61        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    6262        {
    63             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     63            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6464        }
    6565
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp

    r79240 r81272  
    3636
    3737JSImageConstructor::JSImageConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
    38     : DOMConstructorWithDocument(JSImageConstructor::createStructure(globalObject->objectPrototype()), globalObject)
     38    : DOMConstructorWithDocument(JSImageConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
    3939{
    4040    ASSERT(inherits(&s_info));
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.h

    r79132 r81272  
    3030        JSImageConstructor(JSC::ExecState*, JSDOMGlobalObject*);
    3131
    32         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     32        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    3333        {
    34             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     34            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    3535        }
    3636
  • trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp

    r79132 r81272  
    4949    Identifier dataName(exec, "data");
    5050    static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::Base::s_info, 0, 0 };
    51     DEFINE_STATIC_LOCAL(RefPtr<Structure>, cpaStructure, (JSByteArray::createStructure(jsNull(), &cpaClassInfo)));
     51    DEFINE_STATIC_LOCAL(RefPtr<Structure>, cpaStructure, (JSByteArray::createStructure(exec->globalData(), jsNull(), &cpaClassInfo)));
    5252    wrapper->putDirect(exec->globalData(), dataName, new (exec) JSByteArray(exec, cpaStructure, imageData->data()->data()), DontDelete | ReadOnly);
    5353    exec->heap()->reportExtraMemoryCost(imageData->data()->length());
  • trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp

    r79240 r81272  
    3737
    3838JSOptionConstructor::JSOptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
    39     : DOMConstructorWithDocument(JSOptionConstructor::createStructure(globalObject->objectPrototype()), globalObject)
     39    : DOMConstructorWithDocument(JSOptionConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)
    4040{
    4141    ASSERT(inherits(&s_info));
  • trunk/Source/WebCore/bindings/js/JSOptionConstructor.h

    r79132 r81272  
    3131        JSOptionConstructor(JSC::ExecState*, JSDOMGlobalObject*);
    3232
    33         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     33        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    3434        {
    35             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     35            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    3636        }
    3737
  • trunk/Source/WebCore/bindings/js/JSWorkerContextBase.h

    r79132 r81272  
    5050        virtual ScriptExecutionContext* scriptExecutionContext() const;
    5151
    52         static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     52        static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    5353        {
    54             return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     54            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    5555        }
    5656
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp

    r78634 r81272  
    7474    // when we allocate the global object. (Once the global object is fully
    7575    // constructed, it can mark its own prototype.)
    76     RefPtr<Structure> workerContextPrototypeStructure = JSWorkerContextPrototype::createStructure(jsNull());
     76    RefPtr<Structure> workerContextPrototypeStructure = JSWorkerContextPrototype::createStructure(*m_globalData, jsNull());
    7777    Global<JSWorkerContextPrototype> workerContextPrototype(*m_globalData, new (m_globalData.get()) JSWorkerContextPrototype(0, workerContextPrototypeStructure.release()));
    7878
    7979    if (m_workerContext->isDedicatedWorkerContext()) {
    80         RefPtr<Structure> dedicatedContextPrototypeStructure = JSDedicatedWorkerContextPrototype::createStructure(workerContextPrototype.get());
     80        RefPtr<Structure> dedicatedContextPrototypeStructure = JSDedicatedWorkerContextPrototype::createStructure(*m_globalData, workerContextPrototype.get());
    8181        Global<JSDedicatedWorkerContextPrototype> dedicatedContextPrototype(*m_globalData, new (m_globalData.get()) JSDedicatedWorkerContextPrototype(0, dedicatedContextPrototypeStructure.release()));
    82         RefPtr<Structure> structure = JSDedicatedWorkerContext::createStructure(dedicatedContextPrototype.get());
     82        RefPtr<Structure> structure = JSDedicatedWorkerContext::createStructure(*m_globalData, dedicatedContextPrototype.get());
    8383
    8484        m_workerContextWrapper.set(*m_globalData, new (m_globalData.get()) JSDedicatedWorkerContext(structure.release(), m_workerContext->toDedicatedWorkerContext()));
     
    8888    } else {
    8989        ASSERT(m_workerContext->isSharedWorkerContext());
    90         RefPtr<Structure> sharedContextPrototypeStructure = JSSharedWorkerContextPrototype::createStructure(workerContextPrototype.get());
     90        RefPtr<Structure> sharedContextPrototypeStructure = JSSharedWorkerContextPrototype::createStructure(*m_globalData, workerContextPrototype.get());
    9191        Global<JSSharedWorkerContextPrototype> sharedContextPrototype(*m_globalData, new (m_globalData.get()) JSSharedWorkerContextPrototype(0, sharedContextPrototypeStructure.release()));
    92         RefPtr<Structure> structure = JSSharedWorkerContext::createStructure(sharedContextPrototype.get());
     92        RefPtr<Structure> structure = JSSharedWorkerContext::createStructure(*m_globalData, sharedContextPrototype.get());
    9393
    9494        m_workerContextWrapper.set(*m_globalData, new (m_globalData.get()) JSSharedWorkerContext(structure.release(), m_workerContext->toSharedWorkerContext()));
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r79904 r81272  
    747747    }
    748748    push(@headerContent,
    749         "    static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n" .
     749        "    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)\n" .
    750750        "    {\n" .
    751         "        return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);\n" .
     751        "        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);\n" .
    752752        "    }\n\n");
    753753
     
    959959    }
    960960    push(@headerContent,
    961         "    static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n" .
     961        "    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)\n" .
    962962        "    {\n" .
    963         "        return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);\n" .
     963        "        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);\n" .
    964964        "    }\n");
    965965    if ($dataNode->extendedAttributes->{"DelegatingPrototypePutFunction"}) {
     
    14431443        push(@implContent, "{\n");
    14441444        if ($hasParent && $parentClassName ne "JSC::DOMNodeFilter") {
    1445             push(@implContent, "    return new (exec) ${className}Prototype(globalObject, ${className}Prototype::createStructure(${parentClassName}Prototype::self(exec, globalObject)));\n");
     1445            push(@implContent, "    return new (exec) ${className}Prototype(globalObject, ${className}Prototype::createStructure(exec->globalData(), ${parentClassName}Prototype::self(exec, globalObject)));\n");
    14461446        } else {
    1447             push(@implContent, "    return new (exec) ${className}Prototype(globalObject, ${className}Prototype::createStructure(globalObject->objectPrototype()));\n");
     1447            push(@implContent, "    return new (exec) ${className}Prototype(globalObject, ${className}Prototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));\n");
    14481448        }
    14491449        push(@implContent, "}\n\n");
     
    28742874    push(@$outputArray, "    static const JSC::ClassInfo s_info;\n");
    28752875
    2876     push(@$outputArray, "    static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)\n");
     2876    push(@$outputArray, "    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)\n");
    28772877    push(@$outputArray, "    {\n");
    2878     push(@$outputArray, "        return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);\n");
     2878    push(@$outputArray, "        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);\n");
    28792879    push(@$outputArray, "    }\n");
    28802880
     
    29082908
    29092909    push(@$outputArray, "${constructorClassName}::${constructorClassName}(ExecState* exec, JSDOMGlobalObject* globalObject)\n");
    2910     push(@$outputArray, "    : DOMConstructorObject(${constructorClassName}::createStructure(globalObject->objectPrototype()), globalObject)\n");
     2910    push(@$outputArray, "    : DOMConstructorObject(${constructorClassName}::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject)\n");
    29112911    push(@$outputArray, "{\n");
    29122912    push(@$outputArray, "    ASSERT(inherits(&s_info));\n");
  • trunk/Source/WebCore/bridge/c/CRuntimeObject.h

    r79132 r81272  
    4545    static const ClassInfo s_info;
    4646
    47     static PassRefPtr<Structure> createStructure(JSValue prototype)
     47    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4848    {
    49         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     49        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    5050    }
    5151};
  • trunk/Source/WebCore/bridge/c/c_instance.cpp

    r79132 r81272  
    121121    }
    122122
    123     static PassRefPtr<Structure> createStructure(JSValue prototype)
    124     {
    125         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     123    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     124    {
     125        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    126126    }
    127127
  • trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp

    r80633 r81272  
    126126    }
    127127
    128     static PassRefPtr<Structure> createStructure(JSValue prototype)
     128    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    129129    {
    130         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     130        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    131131    }
    132132
  • trunk/Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.h

    r79132 r81272  
    4343    static const ClassInfo s_info;
    4444
    45     static PassRefPtr<Structure> createStructure(JSValue prototype)
     45    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4646    {
    47         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     47        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4848    }
    4949};
  • trunk/Source/WebCore/bridge/objc/ObjCRuntimeObject.h

    r79132 r81272  
    4343    static const ClassInfo s_info;
    4444
    45     static PassRefPtr<Structure> createStructure(JSValue prototype)
     45    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4646    {
    47         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     47        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4848    }
    4949};
  • trunk/Source/WebCore/bridge/objc/objc_instance.mm

    r79132 r81272  
    185185    }
    186186
    187     static PassRefPtr<Structure> createStructure(JSValue prototype)
     187    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    188188    {
    189         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     189        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    190190    }
    191191
  • trunk/Source/WebCore/bridge/objc/objc_runtime.h

    r79988 r81272  
    104104    }
    105105
    106     static PassRefPtr<Structure> createStructure(JSValue prototype)
     106    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    107107    {
    108         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     108        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    109109    }
    110110
  • trunk/Source/WebCore/bridge/qt/qt_instance.cpp

    r79139 r81272  
    6060    }
    6161
    62     static PassRefPtr<Structure> createStructure(JSValue prototype)
     62    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6363    {
    64         return Structure::create(prototype, TypeInfo(ObjectType,  StructureFlags), AnonymousSlotCount, &s_info);
     64        return Structure::create(globalData, prototype, TypeInfo(ObjectType,  StructureFlags), AnonymousSlotCount, &s_info);
    6565    }
    6666
  • trunk/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp

    r79139 r81272  
    151151    static const ClassInfo s_info;
    152152
    153     static PassRefPtr<Structure> createStructure(JSValue prototype)
    154     {
    155         return Structure::create(prototype, TypeInfo(ObjectType,  StructureFlags), AnonymousSlotCount, &s_info);
     153    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
     154    {
     155        return Structure::create(globalData, prototype, TypeInfo(ObjectType,  StructureFlags), AnonymousSlotCount, &s_info);
    156156    }
    157157
  • trunk/Source/WebCore/bridge/qt/qt_runtime.cpp

    r80669 r81272  
    891891        WTF::RefPtr<WTF::ByteArray> wtfByteArray = WTF::ByteArray::create(qtByteArray.length());
    892892        memcpy(wtfByteArray->data(), qtByteArray.constData(), qtByteArray.length());
    893         return new (exec) JSC::JSByteArray(exec, JSC::JSByteArray::createStructure(jsNull()), wtfByteArray.get());
     893        return new (exec) JSC::JSByteArray(exec, JSC::JSByteArray::createStructure(exec->globalData(), jsNull()), wtfByteArray.get());
    894894    }
    895895
     
    18291829
    18301830                        JSObject* qt_sender = QtInstance::getQtInstance(sender(), ro, QScriptEngine::QtOwnership)->createRuntimeObject(exec);
    1831                         JSObject* wrapper = constructEmptyObject(exec, createEmptyObjectStructure(jsNull()));
     1831                        JSObject* wrapper = constructEmptyObject(exec, createEmptyObjectStructure(exec->globalData(), jsNull()));
    18321832                        PutPropertySlot slot;
    18331833                        wrapper->put(exec, Identifier(exec, "__qt_sender__"), qt_sender, slot);
  • trunk/Source/WebCore/bridge/qt/qt_runtime.h

    r79988 r81272  
    154154    }
    155155
    156     static PassRefPtr<Structure> createStructure(JSValue prototype)
     156    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    157157    {
    158         return Structure::create(prototype, TypeInfo(ObjectType,  StructureFlags), AnonymousSlotCount, &s_info);
     158        return Structure::create(globalData, prototype, TypeInfo(ObjectType,  StructureFlags), AnonymousSlotCount, &s_info);
    159159    }
    160160
  • trunk/Source/WebCore/bridge/runtime_array.h

    r81126 r81272  
    5959    }
    6060
    61     static PassRefPtr<Structure> createStructure(JSValue prototype)
     61    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6262    {
    63         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     63        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6464    }
    6565
  • trunk/Source/WebCore/bridge/runtime_method.h

    r79988 r81272  
    4646    }
    4747
    48     static PassRefPtr<Structure> createStructure(JSValue prototype)
     48    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    4949    {
    50         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     50        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    5151    }
    5252
  • trunk/Source/WebCore/bridge/runtime_object.h

    r79988 r81272  
    6262    }
    6363
    64     static PassRefPtr<Structure> createStructure(JSValue prototype)
     64    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    6565    {
    66         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     66        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6767    }
    6868
  • trunk/Source/WebKit/mac/ChangeLog

    r81174 r81272  
     12011-03-15  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Make Structure creation require a JSGlobalData
     6        https://bugs.webkit.org/show_bug.cgi?id=56438
     7
     8        Mechanical change to make all Structure creation use a JSGlobalData&
     9
     10        * Plugins/Hosted/ProxyInstance.mm:
     11        (WebKit::ProxyRuntimeMethod::createStructure):
     12        * Plugins/Hosted/ProxyRuntimeObject.h:
     13        (WebKit::ProxyRuntimeObject::createStructure):
     14
    1152011-03-15  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm

    r79132 r81272  
    188188    }
    189189
    190     static PassRefPtr<Structure> createStructure(JSValue prototype)
     190    static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype)
    191191    {
    192         return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     192        return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    193193    }
    194194
  • trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h

    r79132 r81272  
    4242    ProxyInstance* getInternalProxyInstance() const;
    4343
    44     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     44    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    4545    {
    46         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     46        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4747    }
    4848
  • trunk/Source/WebKit2/ChangeLog

    r81269 r81272  
     12011-03-15  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Make Structure creation require a JSGlobalData
     6        https://bugs.webkit.org/show_bug.cgi?id=56438
     7
     8        Mechanical change to make all Structure creation use a JSGlobalData&.
     9
     10        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
     11        (WebKit::JSNPMethod::JSNPMethod):
     12        * WebProcess/Plugins/Netscape/JSNPMethod.h:
     13        (WebKit::JSNPMethod::createStructure):
     14        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
     15        (WebKit::JSNPObject::JSNPObject):
     16        * WebProcess/Plugins/Netscape/JSNPObject.h:
     17        (WebKit::JSNPObject::createStructure):
     18
    1192011-03-16  Alexey Proskuryakov  <ap@apple.com>
    220
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp

    r79335 r81272  
    4343
    4444JSNPMethod::JSNPMethod(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, NPIdentifier npIdentifier)
    45     : InternalFunction(&exec->globalData(), globalObject, createStructure(globalObject->functionPrototype()), name)
     45    : InternalFunction(&exec->globalData(), globalObject, createStructure(exec->globalData(), globalObject->functionPrototype()), name)
    4646    , m_npIdentifier(npIdentifier)
    4747{
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.h

    r79132 r81272  
    4343
    4444private:   
    45     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     45    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    4646    {
    47         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     47        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    4848    }
    4949
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp

    r79240 r81272  
    5151
    5252JSNPObject::JSNPObject(JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject)
    53     : JSObjectWithGlobalObject(globalObject, createStructure(globalObject->objectPrototype()))
     53    : JSObjectWithGlobalObject(globalObject, createStructure(globalObject->globalData(), globalObject->objectPrototype()))
    5454    , m_objectMap(objectMap)
    5555    , m_npObject(npObject)
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h

    r79132 r81272  
    5656    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | JSObject::StructureFlags;
    5757   
    58     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
     58    static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
    5959    {
    60         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
     60        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
    6161    }
    6262
Note: See TracChangeset for help on using the changeset viewer.