Changeset 81272 in webkit
- Timestamp:
- Mar 16, 2011 1:09:07 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 100 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackConstructor.h
r79132 r81272 40 40 static const ClassInfo s_info; 41 41 42 static PassRefPtr<Structure> createStructure(JS Value proto)42 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 43 43 { 44 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);44 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 45 45 } 46 46 -
trunk/Source/JavaScriptCore/API/JSCallbackFunction.h
r79132 r81272 40 40 // InternalFunction mish-mashes constructor and function behavior -- we should 41 41 // refactor the code so this override isn't necessary 42 static PassRefPtr<Structure> createStructure(JS Value proto)42 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 43 43 { 44 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);44 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 45 45 } 46 46 -
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r79132 r81272 129 129 bool inherits(JSClassRef) const; 130 130 131 static PassRefPtr<Structure> createStructure(JS Value proto)131 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 132 132 { 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); 134 134 } 135 135 -
trunk/Source/JavaScriptCore/API/JSContextRef.cpp
r71375 r81272 94 94 95 95 if (!globalObjectClass) { 96 JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject ;96 JSGlobalObject* globalObject = new (globalData.get()) JSGlobalObject(*globalData); 97 97 return JSGlobalContextRetain(toGlobalRef(globalObject->globalExec())); 98 98 } 99 99 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())); 101 101 ExecState* exec = globalObject->globalExec(); 102 102 JSValue prototype = globalObjectClass->prototype(exec); -
trunk/Source/JavaScriptCore/ChangeLog
r81262 r81272 1 2011-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 1 129 2011-03-16 Geoffrey Garen <ggaren@apple.com> 2 130 -
trunk/Source/JavaScriptCore/JavaScriptCore.exp
r80995 r81272 114 114 __ZN3JSC10throwErrorEPNS_9ExecStateEPNS_8JSObjectE 115 115 __ZN3JSC11JSByteArray13s_defaultInfoE 116 __ZN3JSC11JSByteArray15createStructureE NS_7JSValueEPKNS_9ClassInfoE116 __ZN3JSC11JSByteArray15createStructureERNS_12JSGlobalDataENS_7JSValueEPKNS_9ClassInfoE 117 117 __ZN3JSC11JSByteArrayC1EPNS_9ExecStateEN3WTF17NonNullPassRefPtrINS_9StructureEEEPNS3_9ByteArrayE 118 118 __ZN3JSC11MarkedSpace21allocateFromSizeClassERNS0_9SizeClassE … … 288 288 __ZN3JSC8JSObject15unwrappedObjectEv 289 289 __ZN3JSC8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE 290 __ZN3JSC8JSObject17createInheritorIDEv291 290 __ZN3JSC8JSObject17defineOwnPropertyEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb 292 291 __ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_10JSFunctionEj -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r80995 r81272 103 103 ?createEmptyString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@@Z 104 104 ?createError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z 105 ?createInheritorID@JSObject@JSC@@AAEPAVStructure@2@XZ106 105 ?createInterruptedExecutionException@JSC@@YAPAVJSObject@1@PAVJSGlobalData@1@@Z 107 106 ?createLeaked@JSGlobalData@JSC@@SA?AV?$PassRefPtr@VJSGlobalData@JSC@@@WTF@@W4ThreadStackType@2@@Z … … 110 109 ?createSingleCharacterString@SmallStrings@JSC@@AAEXPAVJSGlobalData@2@E@Z 111 110 ?createStackOverflowError@JSC@@YAPAVJSObject@1@PAVExecState@1@@Z 112 ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@ VJSValue@2@PBUClassInfo@2@@Z111 ?createStructure@JSByteArray@JSC@@SA?AV?$PassRefPtr@VStructure@JSC@@@WTF@@AAVJSGlobalData@2@VJSValue@2@PBUClassInfo@2@@Z 113 112 ?createSyntaxError@JSC@@YAPAVJSObject@1@PAVExecState@1@ABVUString@1@@Z 114 113 ?createTable@HashTable@JSC@@ABEXPAVJSGlobalData@2@@Z -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r81191 r81272 2639 2639 buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */; 2640 2640 compatibilityVersion = "Xcode 3.1"; 2641 developmentRegion = English; 2641 2642 hasScannedForEncodings = 1; 2642 2643 knownRegions = ( -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
r78732 r81272 32 32 33 33 DebuggerActivation::DebuggerActivation(JSGlobalData& globalData, JSObject* activation) 34 : JSNonFinalObject(DebuggerActivation::createStructure( jsNull()))34 : JSNonFinalObject(DebuggerActivation::createStructure(globalData, jsNull())) 35 35 { 36 36 ASSERT(activation); -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.h
r79132 r81272 50 50 virtual JSValue lookupSetter(ExecState*, const Identifier& propertyName); 51 51 52 static PassRefPtr<Structure> createStructure(JS Value prototype)52 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 53 53 { 54 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);54 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 55 55 } 56 56 -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r81191 r81272 1175 1175 JSValue proto = stackFrame.args[0].jsValue(); 1176 1176 if (proto.isObject()) 1177 structure = asObject(proto)->inheritorID( );1177 structure = asObject(proto)->inheritorID(*stackFrame.globalData); 1178 1178 else 1179 1179 structure = constructor->scope()->globalObject->emptyObjectStructure(); -
trunk/Source/JavaScriptCore/jsc.cpp
r79712 r81272 142 142 class GlobalObject : public JSGlobalObject { 143 143 public: 144 GlobalObject( const Vector<UString>& arguments);144 GlobalObject(JSGlobalData&, const Vector<UString>& arguments); 145 145 virtual UString className() const { return "global"; } 146 146 }; … … 148 148 ASSERT_CLASS_FITS_IN_CELL(GlobalObject); 149 149 150 GlobalObject::GlobalObject( const Vector<UString>& arguments)151 : JSGlobalObject( )150 GlobalObject::GlobalObject(JSGlobalData& globalData, const Vector<UString>& arguments) 151 : JSGlobalObject(globalData) 152 152 { 153 153 putDirectFunction(globalExec(), new (globalExec()) JSFunction(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "debug"), functionDebug)); … … 213 213 return JSValue::encode(throwError(exec, createError(exec, "Could not open file."))); 214 214 215 GlobalObject* globalObject = new (&exec->globalData()) GlobalObject( Vector<UString>());215 GlobalObject* globalObject = new (&exec->globalData()) GlobalObject(exec->globalData(), Vector<UString>()); 216 216 217 217 StopWatch stopWatch; … … 537 537 parseArguments(argc, argv, options, globalData); 538 538 539 GlobalObject* globalObject = new (globalData) GlobalObject( options.arguments);539 GlobalObject* globalObject = new (globalData) GlobalObject(*globalData, options.arguments); 540 540 bool success = runWithScripts(globalObject, options.scripts, options.dump); 541 541 if (options.interactive && success) -
trunk/Source/JavaScriptCore/runtime/Arguments.h
r80742 r81272 93 93 } 94 94 95 static PassRefPtr<Structure> createStructure(JS Value prototype)95 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 96 96 { 97 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);97 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 98 98 } 99 99 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.h
r79132 r81272 36 36 static const ClassInfo s_info; 37 37 38 static PassRefPtr<Structure> createStructure(JS Value prototype)38 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 39 39 { 40 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);40 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 41 41 } 42 42 -
trunk/Source/JavaScriptCore/runtime/BooleanObject.h
r79132 r81272 32 32 static const ClassInfo s_info; 33 33 34 static PassRefPtr<Structure> createStructure(JS Value prototype)34 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 35 35 { 36 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);36 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 37 37 } 38 38 }; -
trunk/Source/JavaScriptCore/runtime/DateInstance.h
r81086 r81272 54 54 } 55 55 56 static PassRefPtr<Structure> createStructure(JS Value prototype)56 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 57 57 { 58 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);58 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 59 59 } 60 60 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.h
r81086 r81272 37 37 static const ClassInfo s_info; 38 38 39 static PassRefPtr<Structure> createStructure(JS Value prototype)39 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 40 40 { 41 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);41 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 42 42 } 43 43 -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.h
r79132 r81272 30 30 static const ClassInfo s_info; 31 31 32 static PassRefPtr<Structure> createStructure(JS Value prototype)32 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 33 33 { 34 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);34 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 35 35 } 36 36 -
trunk/Source/JavaScriptCore/runtime/Executable.h
r80738 r81272 66 66 } 67 67 68 static PassRefPtr<Structure> createStructure(JS Value 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); } 69 69 70 70 protected: … … 238 238 } 239 239 #endif 240 static PassRefPtr<Structure> createStructure(JS Value 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); } 241 241 242 242 private: … … 283 283 #endif 284 284 285 static PassRefPtr<Structure> createStructure(JS Value 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); } 286 286 287 287 private: … … 373 373 void markChildren(MarkStack&); 374 374 static FunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception); 375 static PassRefPtr<Structure> createStructure(JS Value 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); } 376 376 377 377 private: -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h
r79177 r81272 31 31 void addFunctionProperties(ExecState*, JSGlobalObject*, Structure* functionStructure, JSFunction** callFunction, JSFunction** applyFunction); 32 32 33 static PassRefPtr<Structure> createStructure(JS Value proto)33 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 34 34 { 35 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);35 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 36 36 } 37 37 -
trunk/Source/JavaScriptCore/runtime/GetterSetter.h
r79132 r81272 48 48 JSObject* setter() const { return m_setter.get(); } 49 49 void setSetter(JSGlobalData& globalData, JSObject* setter) { m_setter.set(globalData, this, setter); } 50 static PassRefPtr<Structure> createStructure(JS Value prototype)50 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 51 51 { 52 return Structure::create( prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount, 0);52 return Structure::create(globalData, prototype, TypeInfo(GetterSetterType, OverridesMarkChildren), AnonymousSlotCount, 0); 53 53 } 54 54 private: -
trunk/Source/JavaScriptCore/runtime/InternalFunction.h
r79132 r81272 40 40 const UString calculatedDisplayName(ExecState*); 41 41 42 static PassRefPtr<Structure> createStructure(JS Value proto)42 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 43 43 { 44 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);44 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 45 45 } 46 46 -
trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h
r79132 r81272 36 36 virtual bool isAPIValueWrapper() const { return true; } 37 37 38 static PassRefPtr<Structure> createStructure(JS Value prototype)38 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 39 39 { 40 return Structure::create( prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, 0);40 return Structure::create(globalData, prototype, TypeInfo(CompoundType, OverridesMarkChildren | OverridesGetPropertyNames), AnonymousSlotCount, 0); 41 41 } 42 42 -
trunk/Source/JavaScriptCore/runtime/JSActivation.h
r81040 r81272 67 67 static const ClassInfo s_info; 68 68 69 static PassRefPtr<Structure> createStructure(JS Value 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); } 70 70 71 71 protected: -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r79240 r81272 128 128 129 129 JSArray::JSArray(VPtrStealingHackType) 130 : JSNonFinalObject( createStructure(jsNull()))130 : JSNonFinalObject(Structure::create(Structure::VPtrStealingHack, &s_info)) 131 131 { 132 132 ASSERT(inherits(&s_info)); -
trunk/Source/JavaScriptCore/runtime/JSArray.h
r81261 r81272 125 125 void copyToRegisters(ExecState*, Register*, uint32_t); 126 126 127 static PassRefPtr<Structure> createStructure(JS Value 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); 130 130 } 131 131 -
trunk/Source/JavaScriptCore/runtime/JSByteArray.cpp
r79132 r81272 51 51 52 52 53 PassRefPtr<Structure> JSByteArray::createStructure(JS Value prototype, const JSC::ClassInfo* classInfo)53 PassRefPtr<Structure> JSByteArray::createStructure(JSGlobalData& globalData, JSValue prototype, const JSC::ClassInfo* classInfo) 54 54 { 55 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, classInfo);55 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, classInfo); 56 56 } 57 57 -
trunk/Source/JavaScriptCore/runtime/JSByteArray.h
r79501 r81272 77 77 78 78 JSByteArray(ExecState*, NonNullPassRefPtr<Structure>, WTF::ByteArray* storage); 79 static PassRefPtr<Structure> createStructure(JS Value prototype, const JSC::ClassInfo* = &s_defaultInfo);79 static PassRefPtr<Structure> createStructure(JSGlobalData&, JSValue prototype, const JSC::ClassInfo* = &s_defaultInfo); 80 80 81 81 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); … … 103 103 enum VPtrStealingHackType { VPtrStealingHack }; 104 104 JSByteArray(VPtrStealingHackType) 105 : JSNonFinalObject( createStructure(jsNull()))105 : JSNonFinalObject(Structure::create(Structure::VPtrStealingHack, &s_info)) 106 106 { 107 107 } -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r81261 r81272 73 73 74 74 public: 75 static PassRefPtr<Structure> createDummyStructure( )75 static PassRefPtr<Structure> createDummyStructure(JSGlobalData& globalData) 76 76 { 77 return Structure::create( jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0);77 return Structure::create(globalData, jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0); 78 78 } 79 79 -
trunk/Source/JavaScriptCore/runtime/JSFunction.h
r80598 r81272 74 74 static JS_EXPORTDATA const ClassInfo s_info; 75 75 76 static PassRefPtr<Structure> createStructure(JS Value prototype)76 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 77 77 { 78 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);78 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 79 79 } 80 80 -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.cpp
r81188 r81272 109 109 COMPILE_ASSERT(sizeof(JSFunction) <= sizeof(storage), sizeof_JSFunction_must_be_less_than_storage); 110 110 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); 113 113 JSGlobalData::jsFunctionVPtr = jsFunction->vptr(); 114 114 jsFunction->~JSCell(); … … 127 127 , regExpConstructorTable(fastNew<HashTable>(JSC::regExpConstructorTable)) 128 128 , 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())145 129 , identifierTable(globalDataType == Default ? wtfThreadData().currentIdentifierTable() : createIdentifierTable()) 146 130 , propertyNames(new CommonIdentifiers(this)) … … 162 146 #endif 163 147 { 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 164 165 interpreter = new Interpreter(*this); 165 166 if (globalDataType == Default) -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r81100 r81272 176 176 // Prototypes 177 177 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()); 181 181 JSFunction* callFunction = 0; 182 182 JSFunction* applyFunction = 0; … … 184 184 m_callFunction.set(exec->globalData(), this, callFunction); 185 185 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())); 187 187 m_functionPrototype->structure()->setPrototypeWithoutTransition(m_objectPrototype.get()); 188 188 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()); 214 214 215 215 m_methodCallDummy.set(exec->globalData(), this, constructEmptyObject(exec)); 216 216 217 ErrorPrototype* errorPrototype = new (exec) ErrorPrototype(exec, this, ErrorPrototype::createStructure( m_objectPrototype.get()), m_functionStructure.get());218 m_errorStructure = ErrorInstance::createStructure(e rrorPrototype);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); 219 219 220 220 // Constructors 221 221 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(e rrorPrototype);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()); 236 236 m_evalErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "EvalError")); 237 237 m_rangeErrorConstructor.set(exec->globalData(), this, new (exec) NativeErrorConstructor(exec, this, nativeErrorStructure, nativeErrorPrototypeStructure, "RangeError")); … … 273 273 // Set global values. 274 274 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), 276 276 GlobalPropertyInfo(Identifier(exec, "NaN"), jsNaN(), DontEnum | DontDelete | ReadOnly), 277 277 GlobalPropertyInfo(Identifier(exec, "Infinity"), jsNumber(Inf), DontEnum | DontDelete | ReadOnly), 278 278 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) 280 280 }; 281 281 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r81100 r81272 114 114 void* operator new(size_t, JSGlobalData*); 115 115 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) 118 118 , m_registerArraySize(0) 119 119 , m_globalScopeChain() … … 239 239 JSGlobalData& globalData() const { return *m_globalData.get(); } 240 240 241 static PassRefPtr<Structure> createStructure(JS Value 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); 244 244 } 245 245 -
trunk/Source/JavaScriptCore/runtime/JSNotAnObject.h
r79132 r81272 44 44 } 45 45 46 static PassRefPtr<Structure> createStructure(JS Value prototype)46 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 47 47 { 48 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);48 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 49 49 } 50 50 -
trunk/Source/JavaScriptCore/runtime/JSONObject.h
r81188 r81272 37 37 JSONObject(JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure); 38 38 39 static PassRefPtr<Structure> createStructure(JS Value prototype)39 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 40 40 { 41 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);41 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 42 42 } 43 43 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r80742 r81272 573 573 } 574 574 575 Structure* JSObject::createInheritorID( )576 { 577 m_inheritorID = createEmptyObjectStructure( this);575 Structure* JSObject::createInheritorID(JSGlobalData& globalData) 576 { 577 m_inheritorID = createEmptyObjectStructure(globalData, this); 578 578 return m_inheritorID.get(); 579 579 } -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r81040 r81272 93 93 94 94 void setStructure(NonNullPassRefPtr<Structure>); 95 Structure* inheritorID( );95 Structure* inheritorID(JSGlobalData&); 96 96 97 97 virtual UString className() const; … … 251 251 252 252 protected: 253 static PassRefPtr<Structure> createStructure(JS Value 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); 256 256 } 257 257 … … 297 297 298 298 const HashEntry* findPropertyHashEntry(ExecState*, const Identifier& propertyName) const; 299 Structure* createInheritorID( );299 Structure* createInheritorID(JSGlobalData&); 300 300 301 301 PropertyStorage m_propertyStorage; … … 321 321 322 322 public: 323 static PassRefPtr<Structure> createStructure(JS Value 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); 326 326 } 327 327 … … 349 349 } 350 350 351 static PassRefPtr<Structure> createStructure(JS Value 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); 354 354 } 355 355 … … 378 378 } 379 379 380 inline PassRefPtr<Structure> createEmptyObjectStructure(JS Value prototype)381 { 382 return JSFinalObject::createStructure( prototype);380 inline PassRefPtr<Structure> createEmptyObjectStructure(JSGlobalData& globalData, JSValue prototype) 381 { 382 return JSFinalObject::createStructure(globalData, prototype); 383 383 } 384 384 … … 443 443 } 444 444 445 inline Structure* JSObject::inheritorID( )445 inline Structure* JSObject::inheritorID(JSGlobalData& globalData) 446 446 { 447 447 if (m_inheritorID) 448 448 return m_inheritorID.get(); 449 return createInheritorID( );449 return createInheritorID(globalData); 450 450 } 451 451 -
trunk/Source/JavaScriptCore/runtime/JSObjectWithGlobalObject.h
r79132 r81272 35 35 class JSObjectWithGlobalObject : public JSNonFinalObject { 36 36 public: 37 static PassRefPtr<Structure> createStructure(JS Value proto)37 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 38 38 { 39 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);39 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 40 40 } 41 41 -
trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
r81040 r81272 46 46 static JSPropertyNameIterator* create(ExecState*, JSObject*); 47 47 48 static PassRefPtr<Structure> createStructure(JS Value prototype)48 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 49 49 { 50 return Structure::create( prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount, 0);50 return Structure::create(globalData, prototype, TypeInfo(CompoundType, OverridesMarkChildren), AnonymousSlotCount, 0); 51 51 } 52 52 -
trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
r80742 r81272 48 48 void putWithAttributes(ExecState*, const Identifier&, JSValue, unsigned attributes); 49 49 50 static PassRefPtr<Structure> createStructure(JS Value 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); } 51 51 52 52 protected: -
trunk/Source/JavaScriptCore/runtime/JSString.h
r81071 r81272 350 350 JSValue replaceCharacter(ExecState*, UChar, const UString& replacement); 351 351 352 static PassRefPtr<Structure> createStructure(JS Value 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); } 353 353 354 354 private: -
trunk/Source/JavaScriptCore/runtime/JSVariableObject.h
r80969 r81272 59 59 WriteBarrier<Unknown>* const * addressOfRegisters() const { return &m_registers; } 60 60 61 static PassRefPtr<Structure> createStructure(JS Value prototype)61 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 62 62 { 63 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);63 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 64 64 } 65 65 -
trunk/Source/JavaScriptCore/runtime/JSWrapperObject.h
r81086 r81272 37 37 void setInternalValue(JSGlobalData&, JSValue); 38 38 39 static PassRefPtr<Structure> createStructure(JS Value prototype)39 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 40 40 { 41 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);41 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 42 42 } 43 43 -
trunk/Source/JavaScriptCore/runtime/JSZombie.h
r80751 r81272 67 67 virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&) { ASSERT_NOT_REACHED(); return false; } 68 68 69 static PassRefPtr<Structure> createStructure(JS Value prototype)69 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 70 70 { 71 return Structure::create( prototype, TypeInfo(ObjectType, 0), AnonymousSlotCount, &s_info);71 return Structure::create(globalData, prototype, TypeInfo(ObjectType, 0), AnonymousSlotCount, &s_info); 72 72 } 73 73 -
trunk/Source/JavaScriptCore/runtime/MathObject.h
r79132 r81272 35 35 static const ClassInfo s_info; 36 36 37 static PassRefPtr<Structure> createStructure(JS Value prototype)37 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 38 38 { 39 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);39 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 40 40 } 41 41 -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r79240 r81272 42 42 putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum); // ECMA 15.11.7.5 43 43 putDirect(exec->globalData(), exec->propertyNames().prototype, prototype, DontDelete | ReadOnly | DontEnum); 44 m_errorStructure = ErrorInstance::createStructure( prototype);44 m_errorStructure = ErrorInstance::createStructure(exec->globalData(), prototype); 45 45 } 46 46 -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
r79132 r81272 36 36 static const ClassInfo s_info; 37 37 38 static PassRefPtr<Structure> createStructure(JS Value prototype)38 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 39 39 { 40 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);40 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 41 41 } 42 42 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.h
r79132 r81272 38 38 static const ClassInfo s_info; 39 39 40 static PassRefPtr<Structure> createStructure(JS Value proto)40 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 41 41 { 42 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);42 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 43 43 } 44 44 -
trunk/Source/JavaScriptCore/runtime/NumberObject.h
r81086 r81272 32 32 static const ClassInfo s_info; 33 33 34 static PassRefPtr<Structure> createStructure(JS Value prototype)34 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 35 35 { 36 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);36 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 37 37 } 38 38 -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h
r80378 r81272 37 37 static const ClassInfo s_info; 38 38 39 static PassRefPtr<Structure> createStructure(JS Value prototype)39 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 40 40 { 41 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);41 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 42 42 } 43 43 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h
r79132 r81272 60 60 RegExpConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, RegExpPrototype*); 61 61 62 static PassRefPtr<Structure> createStructure(JS Value prototype)62 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 63 63 { 64 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);64 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 65 65 } 66 66 -
trunk/Source/JavaScriptCore/runtime/RegExpObject.h
r80743 r81272 59 59 static JS_EXPORTDATA const ClassInfo s_info; 60 60 61 static PassRefPtr<Structure> createStructure(JS Value prototype)61 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 62 62 { 63 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);63 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 64 64 } 65 65 -
trunk/Source/JavaScriptCore/runtime/ScopeChain.h
r81040 r81272 65 65 #endif 66 66 67 static PassRefPtr<Structure> createStructure(JS Value 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); } 68 68 virtual void markChildren(MarkStack&); 69 69 private: -
trunk/Source/JavaScriptCore/runtime/StringObject.h
r81086 r81272 46 46 JSString* internalValue() const { return asString(JSWrapperObject::internalValue());} 47 47 48 static PassRefPtr<Structure> createStructure(JS Value prototype)48 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 49 49 { 50 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);50 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 51 51 } 52 52 -
trunk/Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
r79132 r81272 34 34 { 35 35 return new (exec) StringObjectThatMasqueradesAsUndefined(exec, 36 createStructure(exec-> lexicalGlobalObject()->stringPrototype()), string);36 createStructure(exec->globalData(), exec->lexicalGlobalObject()->stringPrototype()), string); 37 37 } 38 38 … … 43 43 } 44 44 45 static PassRefPtr<Structure> createStructure(JS Value proto)45 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue proto) 46 46 { 47 return Structure::create( proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);47 return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 48 48 } 49 49 -
trunk/Source/JavaScriptCore/runtime/StringPrototype.h
r81086 r81272 35 35 virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&); 36 36 37 static PassRefPtr<Structure> createStructure(JS Value prototype)37 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 38 38 { 39 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);39 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 40 40 } 41 41 -
trunk/Source/JavaScriptCore/runtime/Structure.h
r80969 r81272 58 58 public: 59 59 friend class StructureTransitionTable; 60 static PassRefPtr<Structure> create(JS Value 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) 61 61 { 62 62 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)); 63 69 } 64 70 -
trunk/Source/JavaScriptGlue/ChangeLog
r81135 r81272 1 2011-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 1 19 2011-03-15 Kevin Ollivier <kevino@theolliviers.com> 2 20 -
trunk/Source/JavaScriptGlue/JSRun.cpp
r80742 r81272 34 34 #include <JavaScriptCore/SourceCode.h> 35 35 36 JSGlueGlobalObject::JSGlueGlobalObject( PassRefPtr<Structure> structure, JSFlags flags)36 JSGlueGlobalObject::JSGlueGlobalObject(JSGlobalData& globalData, PassRefPtr<Structure> structure, JSFlags flags) 37 37 : JSGlobalObject(structure) 38 38 , m_flags(flags) 39 , m_userObjectStructure(UserObjectImp::createStructure( jsNull()))39 , m_userObjectStructure(UserObjectImp::createStructure(globalData, jsNull())) 40 40 { 41 41 } … … 44 44 : JSBase(kJSRunTypeID), 45 45 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)), 47 47 fFlags(inFlags) 48 48 { -
trunk/Source/JavaScriptGlue/JSRun.h
r80742 r81272 35 35 class JSGlueGlobalObject : public JSGlobalObject { 36 36 public: 37 JSGlueGlobalObject( PassRefPtr<Structure>, JSFlags = kJSFlagNone);37 JSGlueGlobalObject(JSGlobalData&, PassRefPtr<Structure>, JSFlags = kJSFlagNone); 38 38 39 39 JSFlags Flags() const { return m_flags; } -
trunk/Source/JavaScriptGlue/JSUtils.cpp
r79132 r81272 415 415 JSGlueGlobalObject* globalObject = static_cast<JSGlueGlobalObject*>(pthread_getspecific(globalObjectKey)); 416 416 if (!globalObject) { 417 globalObject = new (getThreadGlobalData()) JSGlueGlobalObject( JSGlueGlobalObject::createStructure(jsNull()));417 globalObject = new (getThreadGlobalData()) JSGlueGlobalObject(*getThreadGlobalData(), JSGlueGlobalObject::createStructure(*getThreadGlobalData(), jsNull())); 418 418 gcProtect(globalObject); 419 419 pthread_setspecific(globalObjectKey, globalObject); -
trunk/Source/JavaScriptGlue/UserObjectImp.h
r79132 r81272 59 59 JSUserObject *GetJSUserObject() const; 60 60 61 static PassRefPtr<Structure> createStructure(JS Value prototype)61 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 62 62 { 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); 64 64 } 65 65 -
trunk/Source/WebCore/ChangeLog
r81267 r81272 1 2011-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 1 63 2011-03-16 Pratik Solanki <psolanki@apple.com> 2 64 -
trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp
r79240 r81272 41 41 42 42 JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) 43 : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject-> objectPrototype()), globalObject)43 : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject) 44 44 { 45 45 ASSERT(inherits(&s_info)); -
trunk/Source/WebCore/bindings/js/JSAudioConstructor.h
r79132 r81272 39 39 JSAudioConstructor(JSC::ExecState*, JSDOMGlobalObject*); 40 40 41 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)41 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 42 42 { 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); 44 44 } 45 45 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r79616 r81272 65 65 } 66 66 67 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value 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); 70 70 } 71 71 … … 84 84 class DOMConstructorObject : public DOMObjectWithGlobalPointer { 85 85 public: 86 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value 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); 89 89 } 90 90 … … 144 144 if (JSC::Structure* structure = getCachedDOMStructure(globalObject, &WrapperClass::s_info)) 145 145 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); 147 147 } 148 148 template<class WrapperClass> inline JSC::Structure* deprecatedGetDOMStructure(JSC::ExecState* exec) -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h
r80742 r81272 70 70 static const JSC::ClassInfo s_info; 71 71 72 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)72 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 73 73 { 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); 75 75 } 76 76 -
trunk/Source/WebCore/bindings/js/JSDOMWindowBase.h
r80742 r81272 58 58 static const JSC::ClassInfo s_info; 59 59 60 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)60 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 61 61 { 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); 63 63 } 64 64 -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
r79132 r81272 45 45 46 46 JSDOMWindowShell::JSDOMWindowShell(PassRefPtr<DOMWindow> window, DOMWrapperWorld* world) 47 : Base(JSDOMWindowShell::createStructure( jsNull()))47 : Base(JSDOMWindowShell::createStructure(*world->globalData(), jsNull())) 48 48 , m_world(world) 49 49 { … … 61 61 // when we allocate the global object. (Once the global object is fully 62 62 // constructed, it can mark its own prototype.) 63 RefPtr<Structure> prototypeStructure = JSDOMWindowPrototype::createStructure( jsNull());63 RefPtr<Structure> prototypeStructure = JSDOMWindowPrototype::createStructure(*JSDOMWindow::commonJSGlobalData(), jsNull()); 64 64 Global<JSDOMWindowPrototype> prototype(*JSDOMWindow::commonJSGlobalData(), new JSDOMWindowPrototype(0, prototypeStructure.release())); 65 65 66 RefPtr<Structure> structure = JSDOMWindow::createStructure( prototype.get());66 RefPtr<Structure> structure = JSDOMWindow::createStructure(*JSDOMWindow::commonJSGlobalData(), prototype.get()); 67 67 JSDOMWindow* jsDOMWindow = new (JSDOMWindow::commonJSGlobalData()) JSDOMWindow(structure.release(), domWindow, this); 68 68 prototype->putAnonymousValue(*JSDOMWindow::commonJSGlobalData(), 0, jsDOMWindow); -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.h
r79132 r81272 59 59 void* operator new(size_t); 60 60 61 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)61 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 62 62 { 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); 64 64 } 65 65 -
trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp
r79240 r81272 36 36 37 37 JSImageConstructor::JSImageConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) 38 : DOMConstructorWithDocument(JSImageConstructor::createStructure(globalObject-> objectPrototype()), globalObject)38 : DOMConstructorWithDocument(JSImageConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject) 39 39 { 40 40 ASSERT(inherits(&s_info)); -
trunk/Source/WebCore/bindings/js/JSImageConstructor.h
r79132 r81272 30 30 JSImageConstructor(JSC::ExecState*, JSDOMGlobalObject*); 31 31 32 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)32 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 33 33 { 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); 35 35 } 36 36 -
trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp
r79132 r81272 49 49 Identifier dataName(exec, "data"); 50 50 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))); 52 52 wrapper->putDirect(exec->globalData(), dataName, new (exec) JSByteArray(exec, cpaStructure, imageData->data()->data()), DontDelete | ReadOnly); 53 53 exec->heap()->reportExtraMemoryCost(imageData->data()->length()); -
trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp
r79240 r81272 37 37 38 38 JSOptionConstructor::JSOptionConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) 39 : DOMConstructorWithDocument(JSOptionConstructor::createStructure(globalObject-> objectPrototype()), globalObject)39 : DOMConstructorWithDocument(JSOptionConstructor::createStructure(globalObject->globalData(), globalObject->objectPrototype()), globalObject) 40 40 { 41 41 ASSERT(inherits(&s_info)); -
trunk/Source/WebCore/bindings/js/JSOptionConstructor.h
r79132 r81272 31 31 JSOptionConstructor(JSC::ExecState*, JSDOMGlobalObject*); 32 32 33 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)33 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 34 34 { 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); 36 36 } 37 37 -
trunk/Source/WebCore/bindings/js/JSWorkerContextBase.h
r79132 r81272 50 50 virtual ScriptExecutionContext* scriptExecutionContext() const; 51 51 52 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)52 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 53 53 { 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); 55 55 } 56 56 -
trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp
r78634 r81272 74 74 // when we allocate the global object. (Once the global object is fully 75 75 // constructed, it can mark its own prototype.) 76 RefPtr<Structure> workerContextPrototypeStructure = JSWorkerContextPrototype::createStructure( jsNull());76 RefPtr<Structure> workerContextPrototypeStructure = JSWorkerContextPrototype::createStructure(*m_globalData, jsNull()); 77 77 Global<JSWorkerContextPrototype> workerContextPrototype(*m_globalData, new (m_globalData.get()) JSWorkerContextPrototype(0, workerContextPrototypeStructure.release())); 78 78 79 79 if (m_workerContext->isDedicatedWorkerContext()) { 80 RefPtr<Structure> dedicatedContextPrototypeStructure = JSDedicatedWorkerContextPrototype::createStructure( workerContextPrototype.get());80 RefPtr<Structure> dedicatedContextPrototypeStructure = JSDedicatedWorkerContextPrototype::createStructure(*m_globalData, workerContextPrototype.get()); 81 81 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()); 83 83 84 84 m_workerContextWrapper.set(*m_globalData, new (m_globalData.get()) JSDedicatedWorkerContext(structure.release(), m_workerContext->toDedicatedWorkerContext())); … … 88 88 } else { 89 89 ASSERT(m_workerContext->isSharedWorkerContext()); 90 RefPtr<Structure> sharedContextPrototypeStructure = JSSharedWorkerContextPrototype::createStructure( workerContextPrototype.get());90 RefPtr<Structure> sharedContextPrototypeStructure = JSSharedWorkerContextPrototype::createStructure(*m_globalData, workerContextPrototype.get()); 91 91 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()); 93 93 94 94 m_workerContextWrapper.set(*m_globalData, new (m_globalData.get()) JSSharedWorkerContext(structure.release(), m_workerContext->toSharedWorkerContext())); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r79904 r81272 747 747 } 748 748 push(@headerContent, 749 " static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)\n" .749 " static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)\n" . 750 750 " {\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" . 752 752 " }\n\n"); 753 753 … … 959 959 } 960 960 push(@headerContent, 961 " static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)\n" .961 " static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)\n" . 962 962 " {\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" . 964 964 " }\n"); 965 965 if ($dataNode->extendedAttributes->{"DelegatingPrototypePutFunction"}) { … … 1443 1443 push(@implContent, "{\n"); 1444 1444 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"); 1446 1446 } 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"); 1448 1448 } 1449 1449 push(@implContent, "}\n\n"); … … 2874 2874 push(@$outputArray, " static const JSC::ClassInfo s_info;\n"); 2875 2875 2876 push(@$outputArray, " static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)\n");2876 push(@$outputArray, " static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)\n"); 2877 2877 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"); 2879 2879 push(@$outputArray, " }\n"); 2880 2880 … … 2908 2908 2909 2909 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"); 2911 2911 push(@$outputArray, "{\n"); 2912 2912 push(@$outputArray, " ASSERT(inherits(&s_info));\n"); -
trunk/Source/WebCore/bridge/c/CRuntimeObject.h
r79132 r81272 45 45 static const ClassInfo s_info; 46 46 47 static PassRefPtr<Structure> createStructure(JS Value prototype)47 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 48 48 { 49 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);49 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 50 50 } 51 51 }; -
trunk/Source/WebCore/bridge/c/c_instance.cpp
r79132 r81272 121 121 } 122 122 123 static PassRefPtr<Structure> createStructure(JS Value 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); 126 126 } 127 127 -
trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
r80633 r81272 126 126 } 127 127 128 static PassRefPtr<Structure> createStructure(JS Value prototype)128 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 129 129 { 130 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);130 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 131 131 } 132 132 -
trunk/Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.h
r79132 r81272 43 43 static const ClassInfo s_info; 44 44 45 static PassRefPtr<Structure> createStructure(JS Value prototype)45 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 46 46 { 47 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);47 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 48 48 } 49 49 }; -
trunk/Source/WebCore/bridge/objc/ObjCRuntimeObject.h
r79132 r81272 43 43 static const ClassInfo s_info; 44 44 45 static PassRefPtr<Structure> createStructure(JS Value prototype)45 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 46 46 { 47 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);47 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 48 48 } 49 49 }; -
trunk/Source/WebCore/bridge/objc/objc_instance.mm
r79132 r81272 185 185 } 186 186 187 static PassRefPtr<Structure> createStructure(JS Value prototype)187 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 188 188 { 189 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);189 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 190 190 } 191 191 -
trunk/Source/WebCore/bridge/objc/objc_runtime.h
r79988 r81272 104 104 } 105 105 106 static PassRefPtr<Structure> createStructure(JS Value prototype)106 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 107 107 { 108 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);108 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 109 109 } 110 110 -
trunk/Source/WebCore/bridge/qt/qt_instance.cpp
r79139 r81272 60 60 } 61 61 62 static PassRefPtr<Structure> createStructure(JS Value prototype)62 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 63 63 { 64 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);64 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 65 65 } 66 66 -
trunk/Source/WebCore/bridge/qt/qt_pixmapruntime.cpp
r79139 r81272 151 151 static const ClassInfo s_info; 152 152 153 static PassRefPtr<Structure> createStructure(JS Value 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); 156 156 } 157 157 -
trunk/Source/WebCore/bridge/qt/qt_runtime.cpp
r80669 r81272 891 891 WTF::RefPtr<WTF::ByteArray> wtfByteArray = WTF::ByteArray::create(qtByteArray.length()); 892 892 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()); 894 894 } 895 895 … … 1829 1829 1830 1830 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())); 1832 1832 PutPropertySlot slot; 1833 1833 wrapper->put(exec, Identifier(exec, "__qt_sender__"), qt_sender, slot); -
trunk/Source/WebCore/bridge/qt/qt_runtime.h
r79988 r81272 154 154 } 155 155 156 static PassRefPtr<Structure> createStructure(JS Value prototype)156 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 157 157 { 158 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);158 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 159 159 } 160 160 -
trunk/Source/WebCore/bridge/runtime_array.h
r81126 r81272 59 59 } 60 60 61 static PassRefPtr<Structure> createStructure(JS Value prototype)61 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 62 62 { 63 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);63 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 64 64 } 65 65 -
trunk/Source/WebCore/bridge/runtime_method.h
r79988 r81272 46 46 } 47 47 48 static PassRefPtr<Structure> createStructure(JS Value prototype)48 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 49 49 { 50 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);50 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 51 51 } 52 52 -
trunk/Source/WebCore/bridge/runtime_object.h
r79988 r81272 62 62 } 63 63 64 static PassRefPtr<Structure> createStructure(JS Value prototype)64 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 65 65 { 66 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);66 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 67 67 } 68 68 -
trunk/Source/WebKit/mac/ChangeLog
r81174 r81272 1 2011-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 1 15 2011-03-15 Alexey Proskuryakov <ap@apple.com> 2 16 -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
r79132 r81272 188 188 } 189 189 190 static PassRefPtr<Structure> createStructure(JS Value prototype)190 static PassRefPtr<Structure> createStructure(JSGlobalData& globalData, JSValue prototype) 191 191 { 192 return Structure::create( prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);192 return Structure::create(globalData, prototype, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info); 193 193 } 194 194 -
trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
r79132 r81272 42 42 ProxyInstance* getInternalProxyInstance() const; 43 43 44 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)44 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 45 45 { 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); 47 47 } 48 48 -
trunk/Source/WebKit2/ChangeLog
r81269 r81272 1 2011-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 1 19 2011-03-16 Alexey Proskuryakov <ap@apple.com> 2 20 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp
r79335 r81272 43 43 44 44 JSNPMethod::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) 46 46 , m_npIdentifier(npIdentifier) 47 47 { -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.h
r79132 r81272 43 43 44 44 private: 45 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)45 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 46 46 { 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); 48 48 } 49 49 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
r79240 r81272 51 51 52 52 JSNPObject::JSNPObject(JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject) 53 : JSObjectWithGlobalObject(globalObject, createStructure(globalObject-> objectPrototype()))53 : JSObjectWithGlobalObject(globalObject, createStructure(globalObject->globalData(), globalObject->objectPrototype())) 54 54 , m_objectMap(objectMap) 55 55 , m_npObject(npObject) -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h
r79132 r81272 56 56 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | JSObject::StructureFlags; 57 57 58 static PassRefPtr<JSC::Structure> createStructure(JSC::JS Value prototype)58 static PassRefPtr<JSC::Structure> createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 59 59 { 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); 61 61 } 62 62
Note: See TracChangeset
for help on using the changeset viewer.