Changeset 190714 in webkit
- Timestamp:
- Oct 8, 2015 12:30:23 AM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 53 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r190713 r190714 1 2015-10-08 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 Binding generated JS constructors should use GlobalObject references 4 https://bugs.webkit.org/show_bug.cgi?id=149872 5 6 Reviewed by Darin Adler. 7 8 Updated binding generator to generate JS DOM constructors code with JSDOMGlobalOBject references. 9 Updated WebCore JS binding layer accordingly. 10 11 Covered by updated binding tests. 12 13 * bindings/js/DOMConstructorWithDocument.h: 14 (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): 15 (WebCore::DOMConstructorWithDocument::finishCreation): 16 * bindings/js/JSDOMBinding.cpp: 17 (WebCore::getCachedDOMStructure): 18 (WebCore::cacheDOMStructure): 19 * bindings/js/JSDOMBinding.h: 20 (WebCore::DOMConstructorObject::DOMConstructorObject): 21 (WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject): 22 (WebCore::getDOMStructure): 23 (WebCore::deprecatedGetDOMStructure): 24 (WebCore::getDOMPrototype): 25 (WebCore::createJSBuiltin): 26 (WebCore::createWrapper): 27 * bindings/js/JSDOMConstructor.h: 28 (WebCore::JSBuiltinConstructor::JSBuiltinConstructor): 29 * bindings/js/JSDOMGlobalObject.h: 30 (WebCore::getDOMConstructor): 31 * bindings/js/JSDOMWindowCustom.cpp: 32 (WebCore::JSDOMWindow::image): 33 (WebCore::JSDOMWindow::touch): 34 (WebCore::JSDOMWindow::touchList): 35 * bindings/js/JSDOMWrapper.h: 36 (WebCore::JSDOMWrapper::JSDOMWrapper): 37 (WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation): 38 * bindings/js/JSImageConstructor.cpp: 39 (WebCore::JSImageConstructor::JSImageConstructor): 40 (WebCore::JSImageConstructor::finishCreation): 41 * bindings/js/JSImageConstructor.h: 42 (WebCore::JSImageConstructor::create): 43 (WebCore::JSImageConstructor::createStructure): 44 * bindings/js/JSReadableStreamPrivateConstructors.cpp: 45 (WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject): 46 (WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject): 47 * bindings/scripts/CodeGeneratorJS.pm: 48 (GenerateHeader): 49 (GenerateImplementation): 50 (GenerateCallbackImplementation): 51 (GenerateConstructorDeclaration): 52 (GenerateConstructorHelperMethods): 53 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 54 (WebCore::JSTestActiveDOMObjectConstructor::create): 55 (WebCore::JSTestActiveDOMObjectConstructor::createStructure): 56 (WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor): 57 (WebCore::JSTestActiveDOMObjectConstructor::finishCreation): 58 (WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject): 59 (WebCore::JSTestActiveDOMObject::getConstructor): 60 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: 61 (WebCore::JSTestActiveDOMObject::create): 62 * bindings/scripts/test/JS/JSTestCallback.cpp: 63 (WebCore::JSTestCallbackConstructor::create): 64 (WebCore::JSTestCallbackConstructor::createStructure): 65 (WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor): 66 (WebCore::JSTestCallback::getConstructor): 67 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: 68 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create): 69 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure): 70 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor): 71 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation): 72 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject): 73 (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): 74 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: 75 (WebCore::JSTestCustomConstructorWithNoInterfaceObject::create): 76 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 77 (WebCore::JSTestCustomNamedGetterConstructor::create): 78 (WebCore::JSTestCustomNamedGetterConstructor::createStructure): 79 (WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor): 80 (WebCore::JSTestCustomNamedGetterConstructor::finishCreation): 81 (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): 82 (WebCore::JSTestCustomNamedGetter::getConstructor): 83 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: 84 (WebCore::JSTestCustomNamedGetter::create): 85 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 86 (WebCore::JSTestEventConstructorConstructor::create): 87 (WebCore::JSTestEventConstructorConstructor::createStructure): 88 (WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor): 89 (WebCore::JSTestEventConstructorConstructor::finishCreation): 90 (WebCore::JSTestEventConstructor::JSTestEventConstructor): 91 (WebCore::JSTestEventConstructor::getConstructor): 92 * bindings/scripts/test/JS/JSTestEventConstructor.h: 93 (WebCore::JSTestEventConstructor::create): 94 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 95 (WebCore::JSTestEventTargetConstructor::create): 96 (WebCore::JSTestEventTargetConstructor::createStructure): 97 (WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor): 98 (WebCore::JSTestEventTargetConstructor::finishCreation): 99 (WebCore::JSTestEventTarget::JSTestEventTarget): 100 (WebCore::JSTestEventTarget::getConstructor): 101 * bindings/scripts/test/JS/JSTestEventTarget.h: 102 (WebCore::JSTestEventTarget::create): 103 * bindings/scripts/test/JS/JSTestException.cpp: 104 (WebCore::JSTestExceptionConstructor::create): 105 (WebCore::JSTestExceptionConstructor::createStructure): 106 (WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor): 107 (WebCore::JSTestExceptionConstructor::finishCreation): 108 (WebCore::JSTestException::JSTestException): 109 (WebCore::JSTestException::getConstructor): 110 * bindings/scripts/test/JS/JSTestException.h: 111 (WebCore::JSTestException::create): 112 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: 113 (WebCore::JSTestGenerateIsReachableConstructor::create): 114 (WebCore::JSTestGenerateIsReachableConstructor::createStructure): 115 (WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor): 116 (WebCore::JSTestGenerateIsReachableConstructor::finishCreation): 117 (WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable): 118 (WebCore::JSTestGenerateIsReachable::getConstructor): 119 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: 120 (WebCore::JSTestGenerateIsReachable::create): 121 * bindings/scripts/test/JS/JSTestInterface.cpp: 122 (WebCore::JSTestInterfaceConstructor::create): 123 (WebCore::JSTestInterfaceConstructor::createStructure): 124 (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor): 125 (WebCore::JSTestInterfaceConstructor::finishCreation): 126 (WebCore::JSTestInterface::JSTestInterface): 127 (WebCore::JSTestInterface::getConstructor): 128 * bindings/scripts/test/JS/JSTestInterface.h: 129 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 130 (WebCore::JSTestJSBuiltinConstructorConstructor::create): 131 (WebCore::JSTestJSBuiltinConstructorConstructor::createStructure): 132 (WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor): 133 (WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation): 134 (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor): 135 (WebCore::JSTestJSBuiltinConstructor::getConstructor): 136 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: 137 (WebCore::JSTestJSBuiltinConstructor::create): 138 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 139 (WebCore::JSTestMediaQueryListListenerConstructor::create): 140 (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): 141 (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor): 142 (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation): 143 (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): 144 (WebCore::JSTestMediaQueryListListener::getConstructor): 145 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: 146 (WebCore::JSTestMediaQueryListListener::create): 147 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 148 (WebCore::JSTestNamedConstructorConstructor::create): 149 (WebCore::JSTestNamedConstructorConstructor::createStructure): 150 (WebCore::JSTestNamedConstructorNamedConstructor::create): 151 (WebCore::JSTestNamedConstructorNamedConstructor::createStructure): 152 (WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor): 153 (WebCore::JSTestNamedConstructorConstructor::finishCreation): 154 (WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor): 155 (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation): 156 (WebCore::JSTestNamedConstructor::JSTestNamedConstructor): 157 (WebCore::JSTestNamedConstructor::getConstructor): 158 (WebCore::JSTestNamedConstructor::getNamedConstructor): 159 * bindings/scripts/test/JS/JSTestNamedConstructor.h: 160 (WebCore::JSTestNamedConstructor::create): 161 * bindings/scripts/test/JS/JSTestNode.cpp: 162 (WebCore::JSTestNodeConstructor::create): 163 (WebCore::JSTestNodeConstructor::createStructure): 164 (WebCore::JSTestNodeConstructor::JSTestNodeConstructor): 165 (WebCore::JSTestNodeConstructor::finishCreation): 166 (WebCore::JSTestNode::JSTestNode): 167 (WebCore::JSTestNode::getConstructor): 168 * bindings/scripts/test/JS/JSTestNode.h: 169 * bindings/scripts/test/JS/JSTestNondeterministic.cpp: 170 (WebCore::JSTestNondeterministicConstructor::create): 171 (WebCore::JSTestNondeterministicConstructor::createStructure): 172 (WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor): 173 (WebCore::JSTestNondeterministicConstructor::finishCreation): 174 (WebCore::JSTestNondeterministic::JSTestNondeterministic): 175 (WebCore::JSTestNondeterministic::getConstructor): 176 * bindings/scripts/test/JS/JSTestNondeterministic.h: 177 (WebCore::JSTestNondeterministic::create): 178 * bindings/scripts/test/JS/JSTestObj.cpp: 179 (WebCore::JSTestObjConstructor::create): 180 (WebCore::JSTestObjConstructor::createStructure): 181 (WebCore::JSTestObjConstructor::JSTestObjConstructor): 182 (WebCore::JSTestObjConstructor::finishCreation): 183 (WebCore::JSTestObj::JSTestObj): 184 (WebCore::JSTestObj::getConstructor): 185 * bindings/scripts/test/JS/JSTestObj.h: 186 (WebCore::JSTestObj::create): 187 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 188 (WebCore::JSTestOverloadedConstructorsConstructor::create): 189 (WebCore::JSTestOverloadedConstructorsConstructor::createStructure): 190 (WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor): 191 (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation): 192 (WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors): 193 (WebCore::JSTestOverloadedConstructors::getConstructor): 194 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: 195 (WebCore::JSTestOverloadedConstructors::create): 196 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 197 (WebCore::JSTestOverrideBuiltinsConstructor::create): 198 (WebCore::JSTestOverrideBuiltinsConstructor::createStructure): 199 (WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor): 200 (WebCore::JSTestOverrideBuiltinsConstructor::finishCreation): 201 (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins): 202 (WebCore::JSTestOverrideBuiltins::getConstructor): 203 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: 204 (WebCore::JSTestOverrideBuiltins::create): 205 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 206 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): 207 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): 208 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor): 209 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation): 210 (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): 211 (WebCore::JSTestSerializedScriptValueInterface::getConstructor): 212 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: 213 (WebCore::JSTestSerializedScriptValueInterface::create): 214 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 215 (WebCore::JSTestTypedefsConstructor::create): 216 (WebCore::JSTestTypedefsConstructor::createStructure): 217 (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor): 218 (WebCore::JSTestTypedefsConstructor::finishCreation): 219 (WebCore::JSTestTypedefs::JSTestTypedefs): 220 (WebCore::JSTestTypedefs::getConstructor): 221 * bindings/scripts/test/JS/JSTestTypedefs.h: 222 (WebCore::JSTestTypedefs::create): 223 * bindings/scripts/test/JS/JSattribute.cpp: 224 (WebCore::JSattributeConstructor::create): 225 (WebCore::JSattributeConstructor::createStructure): 226 (WebCore::JSattributeConstructor::JSattributeConstructor): 227 (WebCore::JSattributeConstructor::finishCreation): 228 (WebCore::JSattribute::JSattribute): 229 (WebCore::JSattribute::getConstructor): 230 * bindings/scripts/test/JS/JSattribute.h: 231 (WebCore::JSattribute::create): 232 * bindings/scripts/test/JS/JSreadonly.cpp: 233 (WebCore::JSreadonlyConstructor::create): 234 (WebCore::JSreadonlyConstructor::createStructure): 235 (WebCore::JSreadonlyConstructor::JSreadonlyConstructor): 236 (WebCore::JSreadonlyConstructor::finishCreation): 237 (WebCore::JSreadonly::JSreadonly): 238 (WebCore::JSreadonly::getConstructor): 239 * bindings/scripts/test/JS/JSreadonly.h: 240 (WebCore::JSreadonly::create): 241 1 242 2015-10-08 Philippe Normand <pnormand@igalia.com> 2 243 -
trunk/Source/WebCore/bindings/js/DOMConstructorWithDocument.h
r174089 r190714 37 37 38 38 protected: 39 DOMConstructorWithDocument(JSC::Structure* structure, JSDOMGlobalObject *globalObject)39 DOMConstructorWithDocument(JSC::Structure* structure, JSDOMGlobalObject& globalObject) 40 40 : DOMConstructorObject(structure, globalObject) 41 41 { 42 42 } 43 43 44 void finishCreation(JSDOMGlobalObject *globalObject)44 void finishCreation(JSDOMGlobalObject& globalObject) 45 45 { 46 Base::finishCreation(globalObject ->vm());47 ASSERT(globalObject ->scriptExecutionContext()->isDocument());46 Base::finishCreation(globalObject.vm()); 47 ASSERT(globalObject.scriptExecutionContext()->isDocument()); 48 48 } 49 49 }; -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r190198 r190714 296 296 } 297 297 298 Structure* getCachedDOMStructure(JSDOMGlobalObject *globalObject, const ClassInfo* classInfo)299 { 300 JSDOMStructureMap& structures = globalObject ->structures();298 Structure* getCachedDOMStructure(JSDOMGlobalObject& globalObject, const ClassInfo* classInfo) 299 { 300 JSDOMStructureMap& structures = globalObject.structures(); 301 301 return structures.get(classInfo).get(); 302 302 } 303 303 304 Structure* cacheDOMStructure(JSDOMGlobalObject *globalObject, Structure* structure, const ClassInfo* classInfo)305 { 306 JSDOMStructureMap& structures = globalObject ->structures();304 Structure* cacheDOMStructure(JSDOMGlobalObject& globalObject, Structure* structure, const ClassInfo* classInfo) 305 { 306 JSDOMStructureMap& structures = globalObject.structures(); 307 307 ASSERT(!structures.contains(classInfo)); 308 return structures.set(classInfo, WriteBarrier<Structure>(globalObject ->vm(),globalObject, structure)).iterator->value.get();308 return structures.set(classInfo, WriteBarrier<Structure>(globalObject.vm(), &globalObject, structure)).iterator->value.get(); 309 309 } 310 310 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r190314 r190714 98 98 99 99 protected: 100 DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject *globalObject)100 DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject& globalObject) 101 101 : JSDOMWrapper(structure, globalObject) 102 102 { … … 109 109 110 110 protected: 111 DOMConstructorJSBuiltinObject(JSC::Structure* structure, JSDOMGlobalObject *globalObject)111 DOMConstructorJSBuiltinObject(JSC::Structure* structure, JSDOMGlobalObject& globalObject) 112 112 : DOMConstructorObject(structure, globalObject) { } 113 113 … … 121 121 }; 122 122 123 WEBCORE_EXPORT JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject *, const JSC::ClassInfo*);124 WEBCORE_EXPORT JSC::Structure* cacheDOMStructure(JSDOMGlobalObject *, JSC::Structure*, const JSC::ClassInfo*);123 WEBCORE_EXPORT JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject&, const JSC::ClassInfo*); 124 WEBCORE_EXPORT JSC::Structure* cacheDOMStructure(JSDOMGlobalObject&, JSC::Structure*, const JSC::ClassInfo*); 125 125 126 126 inline JSDOMGlobalObject* deprecatedGlobalObjectForPrototype(JSC::ExecState* exec) … … 132 132 } 133 133 134 template<typename WrapperClass> inline JSC::Structure* getDOMStructure(JSC::VM& vm, JSDOMGlobalObject *globalObject)134 template<typename WrapperClass> inline JSC::Structure* getDOMStructure(JSC::VM& vm, JSDOMGlobalObject& globalObject) 135 135 { 136 136 if (JSC::Structure* structure = getCachedDOMStructure(globalObject, WrapperClass::info())) 137 137 return structure; 138 return cacheDOMStructure(globalObject, WrapperClass::createStructure(vm, globalObject, WrapperClass::createPrototype(vm,globalObject)), WrapperClass::info());138 return cacheDOMStructure(globalObject, WrapperClass::createStructure(vm, &globalObject, WrapperClass::createPrototype(vm, &globalObject)), WrapperClass::info()); 139 139 } 140 140 … … 142 142 { 143 143 // FIXME: This function is wrong. It uses the wrong global object for creating the prototype structure. 144 return getDOMStructure<WrapperClass>(exec->vm(), deprecatedGlobalObjectForPrototype(exec));144 return getDOMStructure<WrapperClass>(exec->vm(), *deprecatedGlobalObjectForPrototype(exec)); 145 145 } 146 146 147 147 template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject) 148 148 { 149 return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));149 return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, *JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype())); 150 150 } 151 151 … … 154 154 template<typename JSClass> inline JSC::EncodedJSValue createJSBuiltin(JSC::ExecState& state, JSC::JSFunction& initializeFunction, JSDOMGlobalObject& globalObject) 155 155 { 156 JSC::JSObject* object = JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), &globalObject), &globalObject);156 JSC::JSObject* object = JSClass::create(getDOMStructure<JSClass>(globalObject.vm(), globalObject), &globalObject); 157 157 callFunctionWithCurrentArguments(state, *object, initializeFunction); 158 158 return JSC::JSValue::encode(object); … … 241 241 ASSERT(node); 242 242 ASSERT(!getCachedWrapper(globalObject->world(), node)); 243 WrapperClass* wrapper = WrapperClass::create(getDOMStructure<WrapperClass>(globalObject->vm(), globalObject), globalObject, Ref<DOMClass>(*node));243 WrapperClass* wrapper = WrapperClass::create(getDOMStructure<WrapperClass>(globalObject->vm(), *globalObject), globalObject, Ref<DOMClass>(*node)); 244 244 cacheWrapper(globalObject->world(), node, wrapper); 245 245 return wrapper; -
trunk/Source/WebCore/bindings/js/JSDOMConstructor.h
r190608 r190714 43 43 44 44 private: 45 JSBuiltinConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject) : Base(structure, &globalObject) { }45 JSBuiltinConstructor(JSC::Structure* structure, JSDOMGlobalObject& globalObject) : Base(structure, globalObject) { } 46 46 47 47 void finishCreation(JSC::VM&, JSDOMGlobalObject&); -
trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.h
r180301 r190714 89 89 90 90 template<class ConstructorClass> 91 inline JSC::JSObject* getDOMConstructor(JSC::VM& vm, const JSDOMGlobalObject *globalObject)91 inline JSC::JSObject* getDOMConstructor(JSC::VM& vm, const JSDOMGlobalObject& globalObject) 92 92 { 93 if (JSC::JSObject* constructor = const_cast<JSDOMGlobalObject *>(globalObject)->constructors().get(ConstructorClass::info()).get())93 if (JSC::JSObject* constructor = const_cast<JSDOMGlobalObject&>(globalObject).constructors().get(ConstructorClass::info()).get()) 94 94 return constructor; 95 JSC::JSObject* constructor = ConstructorClass::create(vm, ConstructorClass::createStructure(vm, const_cast<JSDOMGlobalObject *>(globalObject), globalObject->objectPrototype()), const_cast<JSDOMGlobalObject*>(globalObject));96 ASSERT(!const_cast<JSDOMGlobalObject *>(globalObject)->constructors().contains(ConstructorClass::info()));95 JSC::JSObject* constructor = ConstructorClass::create(vm, ConstructorClass::createStructure(vm, const_cast<JSDOMGlobalObject&>(globalObject), globalObject.objectPrototype()), const_cast<JSDOMGlobalObject&>(globalObject)); 96 ASSERT(!const_cast<JSDOMGlobalObject&>(globalObject).constructors().contains(ConstructorClass::info())); 97 97 JSC::WriteBarrier<JSC::JSObject> temp; 98 const_cast<JSDOMGlobalObject *>(globalObject)->constructors().add(ConstructorClass::info(), temp).iterator->value.set(vm,globalObject, constructor);98 const_cast<JSDOMGlobalObject&>(globalObject).constructors().add(ConstructorClass::info(), temp).iterator->value.set(vm, &globalObject, constructor); 99 99 return constructor; 100 100 } -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r190036 r190714 502 502 JSValue JSDOMWindow::image(ExecState& state) const 503 503 { 504 return getDOMConstructor<JSImageConstructor>(state.vm(), this);504 return getDOMConstructor<JSImageConstructor>(state.vm(), *this); 505 505 } 506 506 … … 508 508 JSValue JSDOMWindow::touch(ExecState& state) const 509 509 { 510 return getDOMConstructor<JSTouchConstructor>(state.vm(), this);510 return getDOMConstructor<JSTouchConstructor>(state.vm(), *this); 511 511 } 512 512 513 513 JSValue JSDOMWindow::touchList(ExecState& state) const 514 514 { 515 return getDOMConstructor<JSTouchListConstructor>(state.vm(), this);515 return getDOMConstructor<JSTouchListConstructor>(state.vm(), *this); 516 516 } 517 517 #endif -
trunk/Source/WebCore/bindings/js/JSDOMWrapper.h
r190403 r190714 42 42 43 43 protected: 44 JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject *globalObject)45 : Base(globalObject ->vm(), structure)44 JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject& globalObject) 45 : Base(globalObject.vm(), structure) 46 46 { 47 47 ASSERT(scriptExecutionContext()); … … 57 57 58 58 protected: 59 JSDOMWrapperWithImplementation(JSC::Structure* structure, JSC::JSGlobalObject *globalObject, Ref<ImplementationClass>&& impl)59 JSDOMWrapperWithImplementation(JSC::Structure* structure, JSC::JSGlobalObject& globalObject, Ref<ImplementationClass>&& impl) 60 60 : Base(structure, globalObject) 61 61 , m_impl(&impl.leakRef()) { } -
trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp
r171824 r190714 35 35 const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSImageConstructor) }; 36 36 37 JSImageConstructor::JSImageConstructor(Structure* structure, JSDOMGlobalObject *globalObject)37 JSImageConstructor::JSImageConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 38 38 : DOMConstructorWithDocument(structure, globalObject) 39 39 { 40 40 } 41 41 42 void JSImageConstructor::finishCreation(VM& vm, JSDOMGlobalObject *globalObject)42 void JSImageConstructor::finishCreation(VM& vm, JSDOMGlobalObject& globalObject) 43 43 { 44 44 Base::finishCreation(globalObject); 45 45 ASSERT(inherits(info())); 46 putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::getPrototype(vm, globalObject), None);46 putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::getPrototype(vm, &globalObject), None); 47 47 } 48 48 -
trunk/Source/WebCore/bindings/js/JSImageConstructor.h
r156485 r190714 31 31 typedef DOMConstructorWithDocument Base; 32 32 33 static JSImageConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)33 static JSImageConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 34 34 { 35 35 JSImageConstructor* constructor = new (NotNull, JSC::allocateCell<JSImageConstructor>(vm.heap)) JSImageConstructor(structure, globalObject); … … 38 38 } 39 39 40 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)40 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 41 41 { 42 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());42 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 43 43 } 44 44 … … 46 46 47 47 private: 48 JSImageConstructor(JSC::Structure*, JSDOMGlobalObject *);49 void finishCreation(JSC::VM&, JSDOMGlobalObject *);48 JSImageConstructor(JSC::Structure*, JSDOMGlobalObject&); 49 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 50 50 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&); 51 51 }; -
trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp
r190608 r190714 66 66 template<> JSObject* JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject() 67 67 { 68 return JSReadableStreamReader::create(getDOMStructure<JSReadableStreamReader>(globalObject()->vm(), globalObject()), globalObject(), ReadableStreamReader::create());68 return JSReadableStreamReader::create(getDOMStructure<JSReadableStreamReader>(globalObject()->vm(), *globalObject()), globalObject(), ReadableStreamReader::create()); 69 69 } 70 70 71 71 template<> JSObject* JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject() 72 72 { 73 return JSReadableStreamController::create(getDOMStructure<JSReadableStreamController>(globalObject()->vm(), globalObject()), globalObject(), ReadableStreamController::create());73 return JSReadableStreamController::create(getDOMStructure<JSReadableStreamController>(globalObject()->vm(), *globalObject()), globalObject(), ReadableStreamController::create()); 74 74 } 75 75 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r190637 r190714 939 939 push(@headerContent, " {\n"); 940 940 push(@headerContent, " globalObject->masqueradesAsUndefinedWatchpoint()->fireAll(\"Allocated masquerading object\");\n"); 941 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject, WTF::move(impl));\n");941 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, *globalObject, WTF::move(impl));\n"); 942 942 push(@headerContent, " ptr->finishCreation(globalObject->vm());\n"); 943 943 push(@headerContent, " return ptr;\n"); … … 946 946 push(@headerContent, " static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject)\n"); 947 947 push(@headerContent, " {\n"); 948 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject);\n");948 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, *globalObject);\n"); 949 949 push(@headerContent, " ptr->finishCreation(globalObject->vm());\n"); 950 950 push(@headerContent, " return ptr;\n"); … … 954 954 push(@headerContent, " static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<$implType>&& impl)\n"); 955 955 push(@headerContent, " {\n"); 956 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject, WTF::move(impl));\n");956 push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, *globalObject, WTF::move(impl));\n"); 957 957 push(@headerContent, " ptr->finishCreation(globalObject->vm());\n"); 958 958 push(@headerContent, " return ptr;\n"); … … 1217 1217 push(@headerContent, " $className(JSC::VM&, JSC::Structure*, Ref<$implType>&&);\n"); 1218 1218 } elsif (!NeedsImplementationClass($interface)) { 1219 push(@headerContent, " $className(JSC::Structure*, JSDOMGlobalObject *);\n\n");1219 push(@headerContent, " $className(JSC::Structure*, JSDOMGlobalObject&);\n\n"); 1220 1220 } else { 1221 push(@headerContent, " $className(JSC::Structure*, JSDOMGlobalObject *, Ref<$implType>&&);\n\n");1221 push(@headerContent, " $className(JSC::Structure*, JSDOMGlobalObject&, Ref<$implType>&&);\n\n"); 1222 1222 push(@headerContent, " void finishCreation(JSC::VM& vm)\n"); 1223 1223 push(@headerContent, " {\n"); … … 2155 2155 push(@implContent, "}\n\n"); 2156 2156 } elsif (!NeedsImplementationClass($interface)) { 2157 push(@implContent, "${className}::$className(Structure* structure, JSDOMGlobalObject *globalObject)\n");2157 push(@implContent, "${className}::$className(Structure* structure, JSDOMGlobalObject& globalObject)\n"); 2158 2158 push(@implContent, " : $parentClassName(structure, globalObject) { }\n\n"); 2159 }else {2160 push(@implContent, "${className}::$className(Structure* structure, JSDOMGlobalObject *globalObject, Ref<$implType>&& impl)\n");2159 } else { 2160 push(@implContent, "${className}::$className(Structure* structure, JSDOMGlobalObject& globalObject, Ref<$implType>&& impl)\n"); 2161 2161 push(@implContent, " : $parentClassName(structure, globalObject, WTF::move(impl))\n"); 2162 2162 push(@implContent, "{\n"); … … 2519 2519 push(@implContent, " return JSValue::encode(${className}::getConstructor(state->vm(), domObject->globalObject()));\n"); 2520 2520 } else { 2521 push(@implContent, " JSValue constructor = ${className}Constructor::create(state->vm(), ${className}Constructor::createStructure(state->vm(), domObject->globalObject(), domObject->globalObject()->objectPrototype()),jsCast<JSDOMGlobalObject*>(domObject->globalObject()));\n");2521 push(@implContent, " JSValue constructor = ${className}Constructor::create(state->vm(), ${className}Constructor::createStructure(state->vm(), *domObject->globalObject(), domObject->globalObject()->objectPrototype()), *jsCast<JSDOMGlobalObject*>(domObject->globalObject()));\n"); 2522 2522 push(@implContent, " // Shadowing constructor property to ensure reusing the same constructor object\n"); 2523 2523 push(@implContent, " domObject->putDirect(state->vm(), state->propertyNames().constructor, constructor, DontEnum | ReadOnly);\n"); … … 2834 2834 if (!$interface->extendedAttributes->{"NoInterfaceObject"}) { 2835 2835 push(@implContent, "JSValue ${className}::getConstructor(VM& vm, JSGlobalObject* globalObject)\n{\n"); 2836 push(@implContent, " return getDOMConstructor<${className}Constructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));\n");2836 push(@implContent, " return getDOMConstructor<${className}Constructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject));\n"); 2837 2837 push(@implContent, "}\n\n"); 2838 2838 if ($interface->extendedAttributes->{"NamedConstructor"}) { 2839 2839 push(@implContent, "JSValue ${className}::getNamedConstructor(VM& vm, JSGlobalObject* globalObject)\n{\n"); 2840 push(@implContent, " return getDOMConstructor<${className}NamedConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));\n");2840 push(@implContent, " return getDOMConstructor<${className}NamedConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject));\n"); 2841 2841 push(@implContent, "}\n\n"); 2842 2842 } … … 3731 3731 3732 3732 push(@implContent, "JSValue ${className}::getConstructor(VM& vm, JSGlobalObject* globalObject)\n{\n"); 3733 push(@implContent, " return getDOMConstructor<${className}Constructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));\n");3733 push(@implContent, " return getDOMConstructor<${className}Constructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject));\n"); 3734 3734 push(@implContent, "}\n\n"); 3735 3735 } … … 4607 4607 push(@$outputArray, "class ${constructorClassName} : public " . $parentClassName . " {\n"); 4608 4608 push(@$outputArray, "private:\n"); 4609 push(@$outputArray, " ${constructorClassName}(JSC::Structure*, JSDOMGlobalObject *);\n");4609 push(@$outputArray, " ${constructorClassName}(JSC::Structure*, JSDOMGlobalObject&);\n"); 4610 4610 push(@$outputArray, " void finishCreation(JSC::VM&, JSDOMGlobalObject&);\n\n"); 4611 4611 4612 4612 push(@$outputArray, "public:\n"); 4613 4613 push(@$outputArray, " typedef " . $parentClassName . " Base;\n"); 4614 push(@$outputArray, " static $constructorClassName* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)\n");4614 push(@$outputArray, " static $constructorClassName* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject)\n"); 4615 4615 push(@$outputArray, " {\n"); 4616 4616 push(@$outputArray, " $constructorClassName* ptr = new (NotNull, JSC::allocateCell<$constructorClassName>(vm.heap)) $constructorClassName(structure, globalObject);\n"); 4617 push(@$outputArray, " ptr->finishCreation(vm, *globalObject);\n");4617 push(@$outputArray, " ptr->finishCreation(vm, globalObject);\n"); 4618 4618 push(@$outputArray, " return ptr;\n"); 4619 4619 push(@$outputArray, " }\n\n"); … … 4621 4621 push(@$outputArray, " DECLARE_INFO;\n"); 4622 4622 4623 push(@$outputArray, " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)\n");4623 push(@$outputArray, " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype)\n"); 4624 4624 push(@$outputArray, " {\n"); 4625 push(@$outputArray, " return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());\n");4625 push(@$outputArray, " return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());\n"); 4626 4626 push(@$outputArray, " }\n"); 4627 4627 … … 4652 4652 typedef DOMConstructorWithDocument Base; 4653 4653 4654 static JS${interfaceName}NamedConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)4654 static JS${interfaceName}NamedConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 4655 4655 { 4656 4656 JS${interfaceName}NamedConstructor* constructor = new (NotNull, JSC::allocateCell<JS${interfaceName}NamedConstructor>(vm.heap)) JS${interfaceName}NamedConstructor(structure, globalObject); 4657 constructor->finishCreation(vm, *globalObject);4657 constructor->finishCreation(vm, globalObject); 4658 4658 return constructor; 4659 4659 } 4660 4660 4661 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)4661 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 4662 4662 { 4663 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());4663 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 4664 4664 } 4665 4665 … … 4667 4667 4668 4668 private: 4669 JS${interfaceName}NamedConstructor(JSC::Structure*, JSDOMGlobalObject *);4669 JS${interfaceName}NamedConstructor(JSC::Structure*, JSDOMGlobalObject&); 4670 4670 static JSC::EncodedJSValue JSC_HOST_CALL constructJS${interfaceName}(JSC::ExecState*); 4671 4671 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&); … … 4972 4972 push(@$outputArray, "const ClassInfo ${constructorClassName}::s_info = { \"${visibleInterfaceName}Constructor\", &Base::s_info, 0, CREATE_METHOD_TABLE($constructorClassName) };\n\n"); 4973 4973 4974 push(@$outputArray, "${constructorClassName}::${constructorClassName}(Structure* structure, JSDOMGlobalObject *globalObject)\n");4974 push(@$outputArray, "${constructorClassName}::${constructorClassName}(Structure* structure, JSDOMGlobalObject& globalObject)\n"); 4975 4975 push(@$outputArray, " : Base(structure, globalObject)\n"); 4976 4976 push(@$outputArray, "{\n"); … … 4981 4981 4982 4982 if ($generatingNamedConstructor) { 4983 push(@$outputArray, " Base::finishCreation( &globalObject);\n");4983 push(@$outputArray, " Base::finishCreation(globalObject);\n"); 4984 4984 } else { 4985 4985 push(@$outputArray, " Base::finishCreation(vm);\n"); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r190637 r190714 69 69 class JSTestActiveDOMObjectConstructor : public DOMConstructorObject { 70 70 private: 71 JSTestActiveDOMObjectConstructor(JSC::Structure*, JSDOMGlobalObject *);71 JSTestActiveDOMObjectConstructor(JSC::Structure*, JSDOMGlobalObject&); 72 72 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 73 73 74 74 public: 75 75 typedef DOMConstructorObject Base; 76 static JSTestActiveDOMObjectConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)76 static JSTestActiveDOMObjectConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 77 77 { 78 78 JSTestActiveDOMObjectConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectConstructor>(vm.heap)) JSTestActiveDOMObjectConstructor(structure, globalObject); 79 ptr->finishCreation(vm, *globalObject);79 ptr->finishCreation(vm, globalObject); 80 80 return ptr; 81 81 } 82 82 83 83 DECLARE_INFO; 84 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)85 { 86 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());84 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 85 { 86 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 87 87 } 88 88 }; … … 107 107 const ClassInfo JSTestActiveDOMObjectConstructor::s_info = { "TestActiveDOMObjectConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestActiveDOMObjectConstructor) }; 108 108 109 JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor(Structure* structure, JSDOMGlobalObject *globalObject)109 JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 110 110 : Base(structure, globalObject) 111 111 { … … 139 139 const ClassInfo JSTestActiveDOMObject::s_info = { "TestActiveDOMObject", &Base::s_info, &JSTestActiveDOMObjectTable, CREATE_METHOD_TABLE(JSTestActiveDOMObject) }; 140 140 141 JSTestActiveDOMObject::JSTestActiveDOMObject(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestActiveDOMObject>&& impl)141 JSTestActiveDOMObject::JSTestActiveDOMObject(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestActiveDOMObject>&& impl) 142 142 : JSDOMWrapperWithImplementation<TestActiveDOMObject>(structure, globalObject, WTF::move(impl)) 143 143 { … … 195 195 JSValue JSTestActiveDOMObject::getConstructor(VM& vm, JSGlobalObject* globalObject) 196 196 { 197 return getDOMConstructor<JSTestActiveDOMObjectConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));197 return getDOMConstructor<JSTestActiveDOMObjectConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 198 198 } 199 199 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
r190403 r190714 33 33 static JSTestActiveDOMObject* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestActiveDOMObject>&& impl) 34 34 { 35 JSTestActiveDOMObject* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObject>(globalObject->vm().heap)) JSTestActiveDOMObject(structure, globalObject, WTF::move(impl));35 JSTestActiveDOMObject* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObject>(globalObject->vm().heap)) JSTestActiveDOMObject(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 55 55 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 56 56 protected: 57 JSTestActiveDOMObject(JSC::Structure*, JSDOMGlobalObject *, Ref<TestActiveDOMObject>&&);57 JSTestActiveDOMObject(JSC::Structure*, JSDOMGlobalObject&, Ref<TestActiveDOMObject>&&); 58 58 59 59 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
r190637 r190714 62 62 class JSTestCallbackConstructor : public DOMConstructorObject { 63 63 private: 64 JSTestCallbackConstructor(JSC::Structure*, JSDOMGlobalObject *);64 JSTestCallbackConstructor(JSC::Structure*, JSDOMGlobalObject&); 65 65 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 66 66 67 67 public: 68 68 typedef DOMConstructorObject Base; 69 static JSTestCallbackConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)69 static JSTestCallbackConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 70 70 { 71 71 JSTestCallbackConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestCallbackConstructor>(vm.heap)) JSTestCallbackConstructor(structure, globalObject); 72 ptr->finishCreation(vm, *globalObject);72 ptr->finishCreation(vm, globalObject); 73 73 return ptr; 74 74 } 75 75 76 76 DECLARE_INFO; 77 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)77 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 78 78 { 79 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());79 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 80 80 } 81 81 }; … … 95 95 const ClassInfo JSTestCallbackConstructor::s_info = { "TestCallbackConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCallbackConstructor) }; 96 96 97 JSTestCallbackConstructor::JSTestCallbackConstructor(Structure* structure, JSDOMGlobalObject *globalObject)97 JSTestCallbackConstructor::JSTestCallbackConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 98 98 : Base(structure, globalObject) 99 99 { … … 112 112 JSValue JSTestCallback::getConstructor(VM& vm, JSGlobalObject* globalObject) 113 113 { 114 return getDOMConstructor<JSTestCallbackConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));114 return getDOMConstructor<JSTestCallbackConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 115 115 } 116 116 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
r190637 r190714 60 60 class JSTestCustomConstructorWithNoInterfaceObjectConstructor : public DOMConstructorObject { 61 61 private: 62 JSTestCustomConstructorWithNoInterfaceObjectConstructor(JSC::Structure*, JSDOMGlobalObject *);62 JSTestCustomConstructorWithNoInterfaceObjectConstructor(JSC::Structure*, JSDOMGlobalObject&); 63 63 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 64 64 65 65 public: 66 66 typedef DOMConstructorObject Base; 67 static JSTestCustomConstructorWithNoInterfaceObjectConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)67 static JSTestCustomConstructorWithNoInterfaceObjectConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 68 68 { 69 69 JSTestCustomConstructorWithNoInterfaceObjectConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestCustomConstructorWithNoInterfaceObjectConstructor>(vm.heap)) JSTestCustomConstructorWithNoInterfaceObjectConstructor(structure, globalObject); 70 ptr->finishCreation(vm, *globalObject);70 ptr->finishCreation(vm, globalObject); 71 71 return ptr; 72 72 } 73 73 74 74 DECLARE_INFO; 75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)76 { 77 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 76 { 77 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 78 78 } 79 79 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&); … … 82 82 const ClassInfo JSTestCustomConstructorWithNoInterfaceObjectConstructor::s_info = { "TestCustomConstructorWithNoInterfaceObjectConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCustomConstructorWithNoInterfaceObjectConstructor) }; 83 83 84 JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor(Structure* structure, JSDOMGlobalObject *globalObject)84 JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 85 85 : Base(structure, globalObject) 86 86 { … … 119 119 const ClassInfo JSTestCustomConstructorWithNoInterfaceObject::s_info = { "TestCustomConstructorWithNoInterfaceObject", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCustomConstructorWithNoInterfaceObject) }; 120 120 121 JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestCustomConstructorWithNoInterfaceObject>&& impl)121 JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestCustomConstructorWithNoInterfaceObject>&& impl) 122 122 : JSDOMWrapperWithImplementation<TestCustomConstructorWithNoInterfaceObject>(structure, globalObject, WTF::move(impl)) 123 123 { … … 145 145 if (!domObject) 146 146 return throwVMTypeError(state); 147 JSValue constructor = JSTestCustomConstructorWithNoInterfaceObjectConstructor::create(state->vm(), JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure(state->vm(), domObject->globalObject(), domObject->globalObject()->objectPrototype()),jsCast<JSDOMGlobalObject*>(domObject->globalObject()));147 JSValue constructor = JSTestCustomConstructorWithNoInterfaceObjectConstructor::create(state->vm(), JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure(state->vm(), *domObject->globalObject(), domObject->globalObject()->objectPrototype()), *jsCast<JSDOMGlobalObject*>(domObject->globalObject())); 148 148 // Shadowing constructor property to ensure reusing the same constructor object 149 149 domObject->putDirect(state->vm(), state->propertyNames().constructor, constructor, DontEnum | ReadOnly); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h
r190403 r190714 33 33 static JSTestCustomConstructorWithNoInterfaceObject* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomConstructorWithNoInterfaceObject>&& impl) 34 34 { 35 JSTestCustomConstructorWithNoInterfaceObject* ptr = new (NotNull, JSC::allocateCell<JSTestCustomConstructorWithNoInterfaceObject>(globalObject->vm().heap)) JSTestCustomConstructorWithNoInterfaceObject(structure, globalObject, WTF::move(impl));35 JSTestCustomConstructorWithNoInterfaceObject* ptr = new (NotNull, JSC::allocateCell<JSTestCustomConstructorWithNoInterfaceObject>(globalObject->vm().heap)) JSTestCustomConstructorWithNoInterfaceObject(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 51 51 52 52 protected: 53 JSTestCustomConstructorWithNoInterfaceObject(JSC::Structure*, JSDOMGlobalObject *, Ref<TestCustomConstructorWithNoInterfaceObject>&&);53 JSTestCustomConstructorWithNoInterfaceObject(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCustomConstructorWithNoInterfaceObject>&&); 54 54 55 55 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r190637 r190714 67 67 class JSTestCustomNamedGetterConstructor : public DOMConstructorObject { 68 68 private: 69 JSTestCustomNamedGetterConstructor(JSC::Structure*, JSDOMGlobalObject *);69 JSTestCustomNamedGetterConstructor(JSC::Structure*, JSDOMGlobalObject&); 70 70 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 71 71 72 72 public: 73 73 typedef DOMConstructorObject Base; 74 static JSTestCustomNamedGetterConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)74 static JSTestCustomNamedGetterConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 75 75 { 76 76 JSTestCustomNamedGetterConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterConstructor>(vm.heap)) JSTestCustomNamedGetterConstructor(structure, globalObject); 77 ptr->finishCreation(vm, *globalObject);77 ptr->finishCreation(vm, globalObject); 78 78 return ptr; 79 79 } 80 80 81 81 DECLARE_INFO; 82 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)83 { 84 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());82 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 83 { 84 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 85 85 } 86 86 }; … … 102 102 const ClassInfo JSTestCustomNamedGetterConstructor::s_info = { "TestCustomNamedGetterConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestCustomNamedGetterConstructor) }; 103 103 104 JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor(Structure* structure, JSDOMGlobalObject *globalObject)104 JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 105 105 : Base(structure, globalObject) 106 106 { … … 133 133 const ClassInfo JSTestCustomNamedGetter::s_info = { "TestCustomNamedGetter", &Base::s_info, &JSTestCustomNamedGetterTable, CREATE_METHOD_TABLE(JSTestCustomNamedGetter) }; 134 134 135 JSTestCustomNamedGetter::JSTestCustomNamedGetter(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestCustomNamedGetter>&& impl)135 JSTestCustomNamedGetter::JSTestCustomNamedGetter(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestCustomNamedGetter>&& impl) 136 136 : JSDOMWrapperWithImplementation<TestCustomNamedGetter>(structure, globalObject, WTF::move(impl)) 137 137 { … … 199 199 JSValue JSTestCustomNamedGetter::getConstructor(VM& vm, JSGlobalObject* globalObject) 200 200 { 201 return getDOMConstructor<JSTestCustomNamedGetterConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));201 return getDOMConstructor<JSTestCustomNamedGetterConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 202 202 } 203 203 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
r190403 r190714 33 33 static JSTestCustomNamedGetter* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomNamedGetter>&& impl) 34 34 { 35 JSTestCustomNamedGetter* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetter>(globalObject->vm().heap)) JSTestCustomNamedGetter(structure, globalObject, WTF::move(impl));35 JSTestCustomNamedGetter* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetter>(globalObject->vm().heap)) JSTestCustomNamedGetter(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 56 56 static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 57 57 protected: 58 JSTestCustomNamedGetter(JSC::Structure*, JSDOMGlobalObject *, Ref<TestCustomNamedGetter>&&);58 JSTestCustomNamedGetter(JSC::Structure*, JSDOMGlobalObject&, Ref<TestCustomNamedGetter>&&); 59 59 60 60 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
r190637 r190714 66 66 class JSTestEventConstructorConstructor : public DOMConstructorObject { 67 67 private: 68 JSTestEventConstructorConstructor(JSC::Structure*, JSDOMGlobalObject *);68 JSTestEventConstructorConstructor(JSC::Structure*, JSDOMGlobalObject&); 69 69 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 70 70 71 71 public: 72 72 typedef DOMConstructorObject Base; 73 static JSTestEventConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)73 static JSTestEventConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 74 74 { 75 75 JSTestEventConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorConstructor>(vm.heap)) JSTestEventConstructorConstructor(structure, globalObject); 76 ptr->finishCreation(vm, *globalObject);76 ptr->finishCreation(vm, globalObject); 77 77 return ptr; 78 78 } 79 79 80 80 DECLARE_INFO; 81 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)82 { 83 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());81 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 82 { 83 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 84 84 } 85 85 protected: … … 131 131 const ClassInfo JSTestEventConstructorConstructor::s_info = { "TestEventConstructorConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestEventConstructorConstructor) }; 132 132 133 JSTestEventConstructorConstructor::JSTestEventConstructorConstructor(Structure* structure, JSDOMGlobalObject *globalObject)133 JSTestEventConstructorConstructor::JSTestEventConstructorConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 134 134 : Base(structure, globalObject) 135 135 { … … 170 170 const ClassInfo JSTestEventConstructor::s_info = { "TestEventConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestEventConstructor) }; 171 171 172 JSTestEventConstructor::JSTestEventConstructor(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestEventConstructor>&& impl)172 JSTestEventConstructor::JSTestEventConstructor(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestEventConstructor>&& impl) 173 173 : JSDOMWrapperWithImplementation<TestEventConstructor>(structure, globalObject, WTF::move(impl)) 174 174 { … … 235 235 JSValue JSTestEventConstructor::getConstructor(VM& vm, JSGlobalObject* globalObject) 236 236 { 237 return getDOMConstructor<JSTestEventConstructorConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));237 return getDOMConstructor<JSTestEventConstructorConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 238 238 } 239 239 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
r190403 r190714 35 35 static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventConstructor>&& impl) 36 36 { 37 JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructor>(globalObject->vm().heap)) JSTestEventConstructor(structure, globalObject, WTF::move(impl));37 JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructor>(globalObject->vm().heap)) JSTestEventConstructor(structure, *globalObject, WTF::move(impl)); 38 38 ptr->finishCreation(globalObject->vm()); 39 39 return ptr; … … 54 54 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 55 55 protected: 56 JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject *, Ref<TestEventConstructor>&&);56 JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventConstructor>&&); 57 57 58 58 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r190637 r190714 76 76 class JSTestEventTargetConstructor : public DOMConstructorObject { 77 77 private: 78 JSTestEventTargetConstructor(JSC::Structure*, JSDOMGlobalObject *);78 JSTestEventTargetConstructor(JSC::Structure*, JSDOMGlobalObject&); 79 79 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 80 80 81 81 public: 82 82 typedef DOMConstructorObject Base; 83 static JSTestEventTargetConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)83 static JSTestEventTargetConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 84 84 { 85 85 JSTestEventTargetConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetConstructor>(vm.heap)) JSTestEventTargetConstructor(structure, globalObject); 86 ptr->finishCreation(vm, *globalObject);86 ptr->finishCreation(vm, globalObject); 87 87 return ptr; 88 88 } 89 89 90 90 DECLARE_INFO; 91 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)92 { 93 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());91 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 92 { 93 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 94 94 } 95 95 }; … … 111 111 const ClassInfo JSTestEventTargetConstructor::s_info = { "TestEventTargetConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestEventTargetConstructor) }; 112 112 113 JSTestEventTargetConstructor::JSTestEventTargetConstructor(Structure* structure, JSDOMGlobalObject *globalObject)113 JSTestEventTargetConstructor::JSTestEventTargetConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 114 114 : Base(structure, globalObject) 115 115 { … … 145 145 const ClassInfo JSTestEventTarget::s_info = { "TestEventTarget", &Base::s_info, &JSTestEventTargetTable, CREATE_METHOD_TABLE(JSTestEventTarget) }; 146 146 147 JSTestEventTarget::JSTestEventTarget(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestEventTarget>&& impl)147 JSTestEventTarget::JSTestEventTarget(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestEventTarget>&& impl) 148 148 : JSDOMWrapperWithImplementation<TestEventTarget>(structure, globalObject, WTF::move(impl)) 149 149 { … … 236 236 JSValue JSTestEventTarget::getConstructor(VM& vm, JSGlobalObject* globalObject) 237 237 { 238 return getDOMConstructor<JSTestEventTargetConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));238 return getDOMConstructor<JSTestEventTargetConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 239 239 } 240 240 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
r190403 r190714 34 34 { 35 35 globalObject->masqueradesAsUndefinedWatchpoint()->fireAll("Allocated masquerading object"); 36 JSTestEventTarget* ptr = new (NotNull, JSC::allocateCell<JSTestEventTarget>(globalObject->vm().heap)) JSTestEventTarget(structure, globalObject, WTF::move(impl));36 JSTestEventTarget* ptr = new (NotNull, JSC::allocateCell<JSTestEventTarget>(globalObject->vm().heap)) JSTestEventTarget(structure, *globalObject, WTF::move(impl)); 37 37 ptr->finishCreation(globalObject->vm()); 38 38 return ptr; … … 60 60 static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::MasqueradesAsUndefined | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | Base::StructureFlags; 61 61 protected: 62 JSTestEventTarget(JSC::Structure*, JSDOMGlobalObject *, Ref<TestEventTarget>&&);62 JSTestEventTarget(JSC::Structure*, JSDOMGlobalObject&, Ref<TestEventTarget>&&); 63 63 64 64 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
r190637 r190714 63 63 class JSTestExceptionConstructor : public DOMConstructorObject { 64 64 private: 65 JSTestExceptionConstructor(JSC::Structure*, JSDOMGlobalObject *);65 JSTestExceptionConstructor(JSC::Structure*, JSDOMGlobalObject&); 66 66 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 67 67 68 68 public: 69 69 typedef DOMConstructorObject Base; 70 static JSTestExceptionConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)70 static JSTestExceptionConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 71 71 { 72 72 JSTestExceptionConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionConstructor>(vm.heap)) JSTestExceptionConstructor(structure, globalObject); 73 ptr->finishCreation(vm, *globalObject);73 ptr->finishCreation(vm, globalObject); 74 74 return ptr; 75 75 } 76 76 77 77 DECLARE_INFO; 78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)79 { 80 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 79 { 80 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 81 81 } 82 82 }; … … 98 98 const ClassInfo JSTestExceptionConstructor::s_info = { "TestExceptionConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestExceptionConstructor) }; 99 99 100 JSTestExceptionConstructor::JSTestExceptionConstructor(Structure* structure, JSDOMGlobalObject *globalObject)100 JSTestExceptionConstructor::JSTestExceptionConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 101 101 : Base(structure, globalObject) 102 102 { … … 129 129 const ClassInfo JSTestException::s_info = { "TestException", &Base::s_info, &JSTestExceptionTable, CREATE_METHOD_TABLE(JSTestException) }; 130 130 131 JSTestException::JSTestException(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestException>&& impl)131 JSTestException::JSTestException(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestException>&& impl) 132 132 : JSDOMWrapperWithImplementation<TestException>(structure, globalObject, WTF::move(impl)) 133 133 { … … 181 181 JSValue JSTestException::getConstructor(VM& vm, JSGlobalObject* globalObject) 182 182 { 183 return getDOMConstructor<JSTestExceptionConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));183 return getDOMConstructor<JSTestExceptionConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 184 184 } 185 185 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
r190403 r190714 34 34 static JSTestException* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestException>&& impl) 35 35 { 36 JSTestException* ptr = new (NotNull, JSC::allocateCell<JSTestException>(globalObject->vm().heap)) JSTestException(structure, globalObject, WTF::move(impl));36 JSTestException* ptr = new (NotNull, JSC::allocateCell<JSTestException>(globalObject->vm().heap)) JSTestException(structure, *globalObject, WTF::move(impl)); 37 37 ptr->finishCreation(globalObject->vm()); 38 38 return ptr; … … 56 56 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 57 57 protected: 58 JSTestException(JSC::Structure*, JSDOMGlobalObject *, Ref<TestException>&&);58 JSTestException(JSC::Structure*, JSDOMGlobalObject&, Ref<TestException>&&); 59 59 60 60 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
r190637 r190714 60 60 class JSTestGenerateIsReachableConstructor : public DOMConstructorObject { 61 61 private: 62 JSTestGenerateIsReachableConstructor(JSC::Structure*, JSDOMGlobalObject *);62 JSTestGenerateIsReachableConstructor(JSC::Structure*, JSDOMGlobalObject&); 63 63 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 64 64 65 65 public: 66 66 typedef DOMConstructorObject Base; 67 static JSTestGenerateIsReachableConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)67 static JSTestGenerateIsReachableConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 68 68 { 69 69 JSTestGenerateIsReachableConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachableConstructor>(vm.heap)) JSTestGenerateIsReachableConstructor(structure, globalObject); 70 ptr->finishCreation(vm, *globalObject);70 ptr->finishCreation(vm, globalObject); 71 71 return ptr; 72 72 } 73 73 74 74 DECLARE_INFO; 75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)76 { 77 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 76 { 77 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 78 78 } 79 79 }; … … 81 81 const ClassInfo JSTestGenerateIsReachableConstructor::s_info = { "TestGenerateIsReachableConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachableConstructor) }; 82 82 83 JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor(Structure* structure, JSDOMGlobalObject *globalObject)83 JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 84 84 : Base(structure, globalObject) 85 85 { … … 112 112 const ClassInfo JSTestGenerateIsReachable::s_info = { "TestGenerateIsReachable", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestGenerateIsReachable) }; 113 113 114 JSTestGenerateIsReachable::JSTestGenerateIsReachable(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestGenerateIsReachable>&& impl)114 JSTestGenerateIsReachable::JSTestGenerateIsReachable(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestGenerateIsReachable>&& impl) 115 115 : JSDOMWrapperWithImplementation<TestGenerateIsReachable>(structure, globalObject, WTF::move(impl)) 116 116 { … … 143 143 JSValue JSTestGenerateIsReachable::getConstructor(VM& vm, JSGlobalObject* globalObject) 144 144 { 145 return getDOMConstructor<JSTestGenerateIsReachableConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));145 return getDOMConstructor<JSTestGenerateIsReachableConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 146 146 } 147 147 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
r190403 r190714 33 33 static JSTestGenerateIsReachable* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestGenerateIsReachable>&& impl) 34 34 { 35 JSTestGenerateIsReachable* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachable>(globalObject->vm().heap)) JSTestGenerateIsReachable(structure, globalObject, WTF::move(impl));35 JSTestGenerateIsReachable* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachable>(globalObject->vm().heap)) JSTestGenerateIsReachable(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 52 52 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 53 53 protected: 54 JSTestGenerateIsReachable(JSC::Structure*, JSDOMGlobalObject *, Ref<TestGenerateIsReachable>&&);54 JSTestGenerateIsReachable(JSC::Structure*, JSDOMGlobalObject&, Ref<TestGenerateIsReachable>&&); 55 55 56 56 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r190637 r190714 146 146 class JSTestInterfaceConstructor : public DOMConstructorObject { 147 147 private: 148 JSTestInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject *);148 JSTestInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject&); 149 149 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 150 150 151 151 public: 152 152 typedef DOMConstructorObject Base; 153 static JSTestInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)153 static JSTestInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 154 154 { 155 155 JSTestInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestInterfaceConstructor>(vm.heap)) JSTestInterfaceConstructor(structure, globalObject); 156 ptr->finishCreation(vm, *globalObject);156 ptr->finishCreation(vm, globalObject); 157 157 return ptr; 158 158 } 159 159 160 160 DECLARE_INFO; 161 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)161 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 162 162 { 163 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());163 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 164 164 } 165 165 protected: … … 290 290 const ClassInfo JSTestInterfaceConstructor::s_info = { "TestInterfaceConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestInterfaceConstructor) }; 291 291 292 JSTestInterfaceConstructor::JSTestInterfaceConstructor(Structure* structure, JSDOMGlobalObject *globalObject)292 JSTestInterfaceConstructor::JSTestInterfaceConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 293 293 : Base(structure, globalObject) 294 294 { … … 410 410 const ClassInfo JSTestInterface::s_info = { "TestInterface", &Base::s_info, &JSTestInterfaceTable, CREATE_METHOD_TABLE(JSTestInterface) }; 411 411 412 JSTestInterface::JSTestInterface(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestInterface>&& impl)412 JSTestInterface::JSTestInterface(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestInterface>&& impl) 413 413 : JSDOMWrapperWithImplementation<TestInterface>(structure, globalObject, WTF::move(impl)) 414 414 { … … 798 798 JSValue JSTestInterface::getConstructor(VM& vm, JSGlobalObject* globalObject) 799 799 { 800 return getDOMConstructor<JSTestInterfaceConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));800 return getDOMConstructor<JSTestInterfaceConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 801 801 } 802 802 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r190403 r190714 35 35 static JSTestInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestInterface>&& impl) 36 36 { 37 JSTestInterface* ptr = new (NotNull, JSC::allocateCell<JSTestInterface>(globalObject->vm().heap)) JSTestInterface(structure, globalObject, WTF::move(impl));37 JSTestInterface* ptr = new (NotNull, JSC::allocateCell<JSTestInterface>(globalObject->vm().heap)) JSTestInterface(structure, *globalObject, WTF::move(impl)); 38 38 ptr->finishCreation(globalObject->vm()); 39 39 return ptr; … … 82 82 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 83 83 protected: 84 JSTestInterface(JSC::Structure*, JSDOMGlobalObject *, Ref<TestInterface>&&);84 JSTestInterface(JSC::Structure*, JSDOMGlobalObject&, Ref<TestInterface>&&); 85 85 86 86 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
r190637 r190714 61 61 class JSTestJSBuiltinConstructorConstructor : public DOMConstructorJSBuiltinObject { 62 62 private: 63 JSTestJSBuiltinConstructorConstructor(JSC::Structure*, JSDOMGlobalObject *);63 JSTestJSBuiltinConstructorConstructor(JSC::Structure*, JSDOMGlobalObject&); 64 64 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 65 65 66 66 public: 67 67 typedef DOMConstructorJSBuiltinObject Base; 68 static JSTestJSBuiltinConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)68 static JSTestJSBuiltinConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 69 69 { 70 70 JSTestJSBuiltinConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestJSBuiltinConstructorConstructor>(vm.heap)) JSTestJSBuiltinConstructorConstructor(structure, globalObject); 71 ptr->finishCreation(vm, *globalObject);71 ptr->finishCreation(vm, globalObject); 72 72 return ptr; 73 73 } 74 74 75 75 DECLARE_INFO; 76 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)76 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 77 77 { 78 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());78 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 79 79 } 80 80 protected: … … 91 91 const ClassInfo JSTestJSBuiltinConstructorConstructor::s_info = { "TestJSBuiltinConstructorConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestJSBuiltinConstructorConstructor) }; 92 92 93 JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor(Structure* structure, JSDOMGlobalObject *globalObject)93 JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 94 94 : Base(structure, globalObject) 95 95 { … … 129 129 const ClassInfo JSTestJSBuiltinConstructor::s_info = { "TestJSBuiltinConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestJSBuiltinConstructor) }; 130 130 131 JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor(Structure* structure, JSDOMGlobalObject *globalObject)131 JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 132 132 : JSDOMWrapper(structure, globalObject) { } 133 133 … … 158 158 JSValue JSTestJSBuiltinConstructor::getConstructor(VM& vm, JSGlobalObject* globalObject) 159 159 { 160 return getDOMConstructor<JSTestJSBuiltinConstructorConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));160 return getDOMConstructor<JSTestJSBuiltinConstructorConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 161 161 } 162 162 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
r190403 r190714 31 31 static JSTestJSBuiltinConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject) 32 32 { 33 JSTestJSBuiltinConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestJSBuiltinConstructor>(globalObject->vm().heap)) JSTestJSBuiltinConstructor(structure, globalObject);33 JSTestJSBuiltinConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestJSBuiltinConstructor>(globalObject->vm().heap)) JSTestJSBuiltinConstructor(structure, *globalObject); 34 34 ptr->finishCreation(globalObject->vm()); 35 35 return ptr; … … 51 51 52 52 protected: 53 JSTestJSBuiltinConstructor(JSC::Structure*, JSDOMGlobalObject *);53 JSTestJSBuiltinConstructor(JSC::Structure*, JSDOMGlobalObject&); 54 54 55 55 }; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r190637 r190714 67 67 class JSTestMediaQueryListListenerConstructor : public DOMConstructorObject { 68 68 private: 69 JSTestMediaQueryListListenerConstructor(JSC::Structure*, JSDOMGlobalObject *);69 JSTestMediaQueryListListenerConstructor(JSC::Structure*, JSDOMGlobalObject&); 70 70 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 71 71 72 72 public: 73 73 typedef DOMConstructorObject Base; 74 static JSTestMediaQueryListListenerConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)74 static JSTestMediaQueryListListenerConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 75 75 { 76 76 JSTestMediaQueryListListenerConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerConstructor>(vm.heap)) JSTestMediaQueryListListenerConstructor(structure, globalObject); 77 ptr->finishCreation(vm, *globalObject);77 ptr->finishCreation(vm, globalObject); 78 78 return ptr; 79 79 } 80 80 81 81 DECLARE_INFO; 82 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)83 { 84 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());82 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 83 { 84 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 85 85 } 86 86 }; … … 88 88 const ClassInfo JSTestMediaQueryListListenerConstructor::s_info = { "TestMediaQueryListListenerConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestMediaQueryListListenerConstructor) }; 89 89 90 JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor(Structure* structure, JSDOMGlobalObject *globalObject)90 JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 91 91 : Base(structure, globalObject) 92 92 { … … 120 120 const ClassInfo JSTestMediaQueryListListener::s_info = { "TestMediaQueryListListener", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestMediaQueryListListener) }; 121 121 122 JSTestMediaQueryListListener::JSTestMediaQueryListListener(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestMediaQueryListListener>&& impl)122 JSTestMediaQueryListListener::JSTestMediaQueryListListener(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestMediaQueryListListener>&& impl) 123 123 : JSDOMWrapperWithImplementation<TestMediaQueryListListener>(structure, globalObject, WTF::move(impl)) 124 124 { … … 151 151 JSValue JSTestMediaQueryListListener::getConstructor(VM& vm, JSGlobalObject* globalObject) 152 152 { 153 return getDOMConstructor<JSTestMediaQueryListListenerConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));153 return getDOMConstructor<JSTestMediaQueryListListenerConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 154 154 } 155 155 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
r190403 r190714 33 33 static JSTestMediaQueryListListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestMediaQueryListListener>&& impl) 34 34 { 35 JSTestMediaQueryListListener* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListener>(globalObject->vm().heap)) JSTestMediaQueryListListener(structure, globalObject, WTF::move(impl));35 JSTestMediaQueryListListener* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListener>(globalObject->vm().heap)) JSTestMediaQueryListListener(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 52 52 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 53 53 protected: 54 JSTestMediaQueryListListener(JSC::Structure*, JSDOMGlobalObject *, Ref<TestMediaQueryListListener>&&);54 JSTestMediaQueryListListener(JSC::Structure*, JSDOMGlobalObject&, Ref<TestMediaQueryListListener>&&); 55 55 56 56 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
r190637 r190714 63 63 class JSTestNamedConstructorConstructor : public DOMConstructorObject { 64 64 private: 65 JSTestNamedConstructorConstructor(JSC::Structure*, JSDOMGlobalObject *);65 JSTestNamedConstructorConstructor(JSC::Structure*, JSDOMGlobalObject&); 66 66 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 67 67 68 68 public: 69 69 typedef DOMConstructorObject Base; 70 static JSTestNamedConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)70 static JSTestNamedConstructorConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 71 71 { 72 72 JSTestNamedConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorConstructor>(vm.heap)) JSTestNamedConstructorConstructor(structure, globalObject); 73 ptr->finishCreation(vm, *globalObject);73 ptr->finishCreation(vm, globalObject); 74 74 return ptr; 75 75 } 76 76 77 77 DECLARE_INFO; 78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)79 { 80 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 79 { 80 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 81 81 } 82 82 }; … … 86 86 typedef DOMConstructorWithDocument Base; 87 87 88 static JSTestNamedConstructorNamedConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)88 static JSTestNamedConstructorNamedConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 89 89 { 90 90 JSTestNamedConstructorNamedConstructor* constructor = new (NotNull, JSC::allocateCell<JSTestNamedConstructorNamedConstructor>(vm.heap)) JSTestNamedConstructorNamedConstructor(structure, globalObject); 91 constructor->finishCreation(vm, *globalObject);91 constructor->finishCreation(vm, globalObject); 92 92 return constructor; 93 93 } 94 94 95 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)96 { 97 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());95 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 96 { 97 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 98 98 } 99 99 … … 101 101 102 102 private: 103 JSTestNamedConstructorNamedConstructor(JSC::Structure*, JSDOMGlobalObject *);103 JSTestNamedConstructorNamedConstructor(JSC::Structure*, JSDOMGlobalObject&); 104 104 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestNamedConstructor(JSC::ExecState*); 105 105 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&); … … 109 109 const ClassInfo JSTestNamedConstructorConstructor::s_info = { "TestNamedConstructorConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNamedConstructorConstructor) }; 110 110 111 JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor(Structure* structure, JSDOMGlobalObject *globalObject)111 JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 112 112 : Base(structure, globalObject) 113 113 { … … 148 148 const ClassInfo JSTestNamedConstructorNamedConstructor::s_info = { "AudioConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNamedConstructorNamedConstructor) }; 149 149 150 JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor(Structure* structure, JSDOMGlobalObject *globalObject)150 JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 151 151 : Base(structure, globalObject) 152 152 { … … 155 155 void JSTestNamedConstructorNamedConstructor::finishCreation(VM& vm, JSDOMGlobalObject& globalObject) 156 156 { 157 Base::finishCreation( &globalObject);157 Base::finishCreation(globalObject); 158 158 ASSERT(inherits(info())); 159 159 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::getPrototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum); … … 185 185 const ClassInfo JSTestNamedConstructor::s_info = { "TestNamedConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNamedConstructor) }; 186 186 187 JSTestNamedConstructor::JSTestNamedConstructor(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestNamedConstructor>&& impl)187 JSTestNamedConstructor::JSTestNamedConstructor(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestNamedConstructor>&& impl) 188 188 : JSDOMWrapperWithImplementation<TestNamedConstructor>(structure, globalObject, WTF::move(impl)) 189 189 { … … 216 216 JSValue JSTestNamedConstructor::getConstructor(VM& vm, JSGlobalObject* globalObject) 217 217 { 218 return getDOMConstructor<JSTestNamedConstructorConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));218 return getDOMConstructor<JSTestNamedConstructorConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 219 219 } 220 220 221 221 JSValue JSTestNamedConstructor::getNamedConstructor(VM& vm, JSGlobalObject* globalObject) 222 222 { 223 return getDOMConstructor<JSTestNamedConstructorNamedConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));223 return getDOMConstructor<JSTestNamedConstructorNamedConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 224 224 } 225 225 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
r190403 r190714 33 33 static JSTestNamedConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNamedConstructor>&& impl) 34 34 { 35 JSTestNamedConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructor>(globalObject->vm().heap)) JSTestNamedConstructor(structure, globalObject, WTF::move(impl));35 JSTestNamedConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructor>(globalObject->vm().heap)) JSTestNamedConstructor(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 53 53 static JSC::JSValue getNamedConstructor(JSC::VM&, JSC::JSGlobalObject*); 54 54 protected: 55 JSTestNamedConstructor(JSC::Structure*, JSDOMGlobalObject *, Ref<TestNamedConstructor>&&);55 JSTestNamedConstructor(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNamedConstructor>&&); 56 56 57 57 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r190637 r190714 66 66 class JSTestNodeConstructor : public DOMConstructorObject { 67 67 private: 68 JSTestNodeConstructor(JSC::Structure*, JSDOMGlobalObject *);68 JSTestNodeConstructor(JSC::Structure*, JSDOMGlobalObject&); 69 69 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 70 70 71 71 public: 72 72 typedef DOMConstructorObject Base; 73 static JSTestNodeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)73 static JSTestNodeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 74 74 { 75 75 JSTestNodeConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNodeConstructor>(vm.heap)) JSTestNodeConstructor(structure, globalObject); 76 ptr->finishCreation(vm, *globalObject);76 ptr->finishCreation(vm, globalObject); 77 77 return ptr; 78 78 } 79 79 80 80 DECLARE_INFO; 81 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)82 { 83 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());81 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 82 { 83 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 84 84 } 85 85 protected: … … 97 97 const ClassInfo JSTestNodeConstructor::s_info = { "TestNodeConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNodeConstructor) }; 98 98 99 JSTestNodeConstructor::JSTestNodeConstructor(Structure* structure, JSDOMGlobalObject *globalObject)99 JSTestNodeConstructor::JSTestNodeConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 100 100 : Base(structure, globalObject) 101 101 { … … 135 135 const ClassInfo JSTestNode::s_info = { "TestNode", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNode) }; 136 136 137 JSTestNode::JSTestNode(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestNode>&& impl)137 JSTestNode::JSTestNode(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestNode>&& impl) 138 138 : JSNode(structure, globalObject, WTF::move(impl)) 139 139 { … … 197 197 JSValue JSTestNode::getConstructor(VM& vm, JSGlobalObject* globalObject) 198 198 { 199 return getDOMConstructor<JSTestNodeConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));199 return getDOMConstructor<JSTestNodeConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 200 200 } 201 201 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
r184228 r190714 32 32 static JSTestNode* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNode>&& impl) 33 33 { 34 JSTestNode* ptr = new (NotNull, JSC::allocateCell<JSTestNode>(globalObject->vm().heap)) JSTestNode(structure, globalObject, WTF::move(impl));34 JSTestNode* ptr = new (NotNull, JSC::allocateCell<JSTestNode>(globalObject->vm().heap)) JSTestNode(structure, *globalObject, WTF::move(impl)); 35 35 ptr->finishCreation(globalObject->vm()); 36 36 return ptr; … … 55 55 } 56 56 protected: 57 JSTestNode(JSC::Structure*, JSDOMGlobalObject *, Ref<TestNode>&&);57 JSTestNode(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNode>&&); 58 58 59 59 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
r190637 r190714 83 83 class JSTestNondeterministicConstructor : public DOMConstructorObject { 84 84 private: 85 JSTestNondeterministicConstructor(JSC::Structure*, JSDOMGlobalObject *);85 JSTestNondeterministicConstructor(JSC::Structure*, JSDOMGlobalObject&); 86 86 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 87 87 88 88 public: 89 89 typedef DOMConstructorObject Base; 90 static JSTestNondeterministicConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)90 static JSTestNondeterministicConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 91 91 { 92 92 JSTestNondeterministicConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministicConstructor>(vm.heap)) JSTestNondeterministicConstructor(structure, globalObject); 93 ptr->finishCreation(vm, *globalObject);93 ptr->finishCreation(vm, globalObject); 94 94 return ptr; 95 95 } 96 96 97 97 DECLARE_INFO; 98 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)98 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 99 99 { 100 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());100 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 101 101 } 102 102 }; … … 104 104 const ClassInfo JSTestNondeterministicConstructor::s_info = { "TestNondeterministicConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNondeterministicConstructor) }; 105 105 106 JSTestNondeterministicConstructor::JSTestNondeterministicConstructor(Structure* structure, JSDOMGlobalObject *globalObject)106 JSTestNondeterministicConstructor::JSTestNondeterministicConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 107 107 : Base(structure, globalObject) 108 108 { … … 141 141 const ClassInfo JSTestNondeterministic::s_info = { "TestNondeterministic", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestNondeterministic) }; 142 142 143 JSTestNondeterministic::JSTestNondeterministic(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestNondeterministic>&& impl)143 JSTestNondeterministic::JSTestNondeterministic(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestNondeterministic>&& impl) 144 144 : JSDOMWrapperWithImplementation<TestNondeterministic>(structure, globalObject, WTF::move(impl)) 145 145 { … … 443 443 JSValue JSTestNondeterministic::getConstructor(VM& vm, JSGlobalObject* globalObject) 444 444 { 445 return getDOMConstructor<JSTestNondeterministicConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));445 return getDOMConstructor<JSTestNondeterministicConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 446 446 } 447 447 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
r190403 r190714 33 33 static JSTestNondeterministic* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNondeterministic>&& impl) 34 34 { 35 JSTestNondeterministic* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministic>(globalObject->vm().heap)) JSTestNondeterministic(structure, globalObject, WTF::move(impl));35 JSTestNondeterministic* ptr = new (NotNull, JSC::allocateCell<JSTestNondeterministic>(globalObject->vm().heap)) JSTestNondeterministic(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 52 52 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 53 53 protected: 54 JSTestNondeterministic(JSC::Structure*, JSDOMGlobalObject *, Ref<TestNondeterministic>&&);54 JSTestNondeterministic(JSC::Structure*, JSDOMGlobalObject&, Ref<TestNondeterministic>&&); 55 55 56 56 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r190637 r190714 348 348 class JSTestObjConstructor : public DOMConstructorObject { 349 349 private: 350 JSTestObjConstructor(JSC::Structure*, JSDOMGlobalObject *);350 JSTestObjConstructor(JSC::Structure*, JSDOMGlobalObject&); 351 351 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 352 352 353 353 public: 354 354 typedef DOMConstructorObject Base; 355 static JSTestObjConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)355 static JSTestObjConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 356 356 { 357 357 JSTestObjConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestObjConstructor>(vm.heap)) JSTestObjConstructor(structure, globalObject); 358 ptr->finishCreation(vm, *globalObject);358 ptr->finishCreation(vm, globalObject); 359 359 return ptr; 360 360 } 361 361 362 362 DECLARE_INFO; 363 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)363 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 364 364 { 365 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());365 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 366 366 } 367 367 protected: … … 486 486 const ClassInfo JSTestObjConstructor::s_info = { "TestObjectConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjConstructor) }; 487 487 488 JSTestObjConstructor::JSTestObjConstructor(Structure* structure, JSDOMGlobalObject *globalObject)488 JSTestObjConstructor::JSTestObjConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 489 489 : Base(structure, globalObject) 490 490 { … … 726 726 const ClassInfo JSTestObj::s_info = { "TestObject", &Base::s_info, &JSTestObjTable, CREATE_METHOD_TABLE(JSTestObj) }; 727 727 728 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestObj>&& impl)728 JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestObj>&& impl) 729 729 : JSDOMWrapperWithImplementation<TestObj>(structure, globalObject, WTF::move(impl)) 730 730 { … … 3163 3163 JSValue JSTestObj::getConstructor(VM& vm, JSGlobalObject* globalObject) 3164 3164 { 3165 return getDOMConstructor<JSTestObjConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));3165 return getDOMConstructor<JSTestObjConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 3166 3166 } 3167 3167 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r190403 r190714 33 33 static JSTestObj* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestObj>&& impl) 34 34 { 35 JSTestObj* ptr = new (NotNull, JSC::allocateCell<JSTestObj>(globalObject->vm().heap)) JSTestObj(structure, globalObject, WTF::move(impl));35 JSTestObj* ptr = new (NotNull, JSC::allocateCell<JSTestObj>(globalObject->vm().heap)) JSTestObj(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 68 68 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 69 69 protected: 70 JSTestObj(JSC::Structure*, JSDOMGlobalObject *, Ref<TestObj>&&);70 JSTestObj(JSC::Structure*, JSDOMGlobalObject&, Ref<TestObj>&&); 71 71 72 72 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
r190637 r190714 63 63 class JSTestOverloadedConstructorsConstructor : public DOMConstructorObject { 64 64 private: 65 JSTestOverloadedConstructorsConstructor(JSC::Structure*, JSDOMGlobalObject *);65 JSTestOverloadedConstructorsConstructor(JSC::Structure*, JSDOMGlobalObject&); 66 66 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 67 67 68 68 public: 69 69 typedef DOMConstructorObject Base; 70 static JSTestOverloadedConstructorsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)70 static JSTestOverloadedConstructorsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 71 71 { 72 72 JSTestOverloadedConstructorsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsConstructor>(vm.heap)) JSTestOverloadedConstructorsConstructor(structure, globalObject); 73 ptr->finishCreation(vm, *globalObject);73 ptr->finishCreation(vm, globalObject); 74 74 return ptr; 75 75 } 76 76 77 77 DECLARE_INFO; 78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)79 { 80 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 79 { 80 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 81 81 } 82 82 protected: … … 169 169 const ClassInfo JSTestOverloadedConstructorsConstructor::s_info = { "TestOverloadedConstructorsConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestOverloadedConstructorsConstructor) }; 170 170 171 JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor(Structure* structure, JSDOMGlobalObject *globalObject)171 JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 172 172 : Base(structure, globalObject) 173 173 { … … 206 206 const ClassInfo JSTestOverloadedConstructors::s_info = { "TestOverloadedConstructors", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestOverloadedConstructors) }; 207 207 208 JSTestOverloadedConstructors::JSTestOverloadedConstructors(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestOverloadedConstructors>&& impl)208 JSTestOverloadedConstructors::JSTestOverloadedConstructors(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestOverloadedConstructors>&& impl) 209 209 : JSDOMWrapperWithImplementation<TestOverloadedConstructors>(structure, globalObject, WTF::move(impl)) 210 210 { … … 237 237 JSValue JSTestOverloadedConstructors::getConstructor(VM& vm, JSGlobalObject* globalObject) 238 238 { 239 return getDOMConstructor<JSTestOverloadedConstructorsConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));239 return getDOMConstructor<JSTestOverloadedConstructorsConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 240 240 } 241 241 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
r190403 r190714 33 33 static JSTestOverloadedConstructors* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverloadedConstructors>&& impl) 34 34 { 35 JSTestOverloadedConstructors* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructors>(globalObject->vm().heap)) JSTestOverloadedConstructors(structure, globalObject, WTF::move(impl));35 JSTestOverloadedConstructors* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructors>(globalObject->vm().heap)) JSTestOverloadedConstructors(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 52 52 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 53 53 protected: 54 JSTestOverloadedConstructors(JSC::Structure*, JSDOMGlobalObject *, Ref<TestOverloadedConstructors>&&);54 JSTestOverloadedConstructors(JSC::Structure*, JSDOMGlobalObject&, Ref<TestOverloadedConstructors>&&); 55 55 56 56 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r190637 r190714 69 69 class JSTestOverrideBuiltinsConstructor : public DOMConstructorObject { 70 70 private: 71 JSTestOverrideBuiltinsConstructor(JSC::Structure*, JSDOMGlobalObject *);71 JSTestOverrideBuiltinsConstructor(JSC::Structure*, JSDOMGlobalObject&); 72 72 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 73 73 74 74 public: 75 75 typedef DOMConstructorObject Base; 76 static JSTestOverrideBuiltinsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)76 static JSTestOverrideBuiltinsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 77 77 { 78 78 JSTestOverrideBuiltinsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestOverrideBuiltinsConstructor>(vm.heap)) JSTestOverrideBuiltinsConstructor(structure, globalObject); 79 ptr->finishCreation(vm, *globalObject);79 ptr->finishCreation(vm, globalObject); 80 80 return ptr; 81 81 } 82 82 83 83 DECLARE_INFO; 84 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)85 { 86 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());84 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 85 { 86 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 87 87 } 88 88 }; … … 104 104 const ClassInfo JSTestOverrideBuiltinsConstructor::s_info = { "TestOverrideBuiltinsConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestOverrideBuiltinsConstructor) }; 105 105 106 JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor(Structure* structure, JSDOMGlobalObject *globalObject)106 JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 107 107 : Base(structure, globalObject) 108 108 { … … 135 135 const ClassInfo JSTestOverrideBuiltins::s_info = { "TestOverrideBuiltins", &Base::s_info, &JSTestOverrideBuiltinsTable, CREATE_METHOD_TABLE(JSTestOverrideBuiltins) }; 136 136 137 JSTestOverrideBuiltins::JSTestOverrideBuiltins(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestOverrideBuiltins>&& impl)137 JSTestOverrideBuiltins::JSTestOverrideBuiltins(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestOverrideBuiltins>&& impl) 138 138 : JSDOMWrapperWithImplementation<TestOverrideBuiltins>(structure, globalObject, WTF::move(impl)) 139 139 { … … 208 208 JSValue JSTestOverrideBuiltins::getConstructor(VM& vm, JSGlobalObject* globalObject) 209 209 { 210 return getDOMConstructor<JSTestOverrideBuiltinsConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));210 return getDOMConstructor<JSTestOverrideBuiltinsConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 211 211 } 212 212 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
r190403 r190714 33 33 static JSTestOverrideBuiltins* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverrideBuiltins>&& impl) 34 34 { 35 JSTestOverrideBuiltins* ptr = new (NotNull, JSC::allocateCell<JSTestOverrideBuiltins>(globalObject->vm().heap)) JSTestOverrideBuiltins(structure, globalObject, WTF::move(impl));35 JSTestOverrideBuiltins* ptr = new (NotNull, JSC::allocateCell<JSTestOverrideBuiltins>(globalObject->vm().heap)) JSTestOverrideBuiltins(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 57 57 static const unsigned StructureFlags = JSC::HasImpureGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | Base::StructureFlags; 58 58 protected: 59 JSTestOverrideBuiltins(JSC::Structure*, JSDOMGlobalObject *, Ref<TestOverrideBuiltins>&&);59 JSTestOverrideBuiltins(JSC::Structure*, JSDOMGlobalObject&, Ref<TestOverrideBuiltins>&&); 60 60 61 61 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r190637 r190714 74 74 class JSTestSerializedScriptValueInterfaceConstructor : public DOMConstructorObject { 75 75 private: 76 JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject *);76 JSTestSerializedScriptValueInterfaceConstructor(JSC::Structure*, JSDOMGlobalObject&); 77 77 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 78 78 79 79 public: 80 80 typedef DOMConstructorObject Base; 81 static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)81 static JSTestSerializedScriptValueInterfaceConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 82 82 { 83 83 JSTestSerializedScriptValueInterfaceConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfaceConstructor>(vm.heap)) JSTestSerializedScriptValueInterfaceConstructor(structure, globalObject); 84 ptr->finishCreation(vm, *globalObject);84 ptr->finishCreation(vm, globalObject); 85 85 return ptr; 86 86 } 87 87 88 88 DECLARE_INFO; 89 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)90 { 91 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());89 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 90 { 91 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 92 92 } 93 93 }; … … 95 95 const ClassInfo JSTestSerializedScriptValueInterfaceConstructor::s_info = { "TestSerializedScriptValueInterfaceConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterfaceConstructor) }; 96 96 97 JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor(Structure* structure, JSDOMGlobalObject *globalObject)97 JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 98 98 : Base(structure, globalObject) 99 99 { … … 131 131 const ClassInfo JSTestSerializedScriptValueInterface::s_info = { "TestSerializedScriptValueInterface", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestSerializedScriptValueInterface) }; 132 132 133 JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestSerializedScriptValueInterface>&& impl)133 JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestSerializedScriptValueInterface>&& impl) 134 134 : JSDOMWrapperWithImplementation<TestSerializedScriptValueInterface>(structure, globalObject, WTF::move(impl)) 135 135 { … … 293 293 JSValue JSTestSerializedScriptValueInterface::getConstructor(VM& vm, JSGlobalObject* globalObject) 294 294 { 295 return getDOMConstructor<JSTestSerializedScriptValueInterfaceConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));295 return getDOMConstructor<JSTestSerializedScriptValueInterfaceConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 296 296 } 297 297 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
r190403 r190714 35 35 static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestSerializedScriptValueInterface>&& impl) 36 36 { 37 JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, globalObject, WTF::move(impl));37 JSTestSerializedScriptValueInterface* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterface>(globalObject->vm().heap)) JSTestSerializedScriptValueInterface(structure, *globalObject, WTF::move(impl)); 38 38 ptr->finishCreation(globalObject->vm()); 39 39 return ptr; … … 58 58 59 59 protected: 60 JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject *, Ref<TestSerializedScriptValueInterface>&&);60 JSTestSerializedScriptValueInterface(JSC::Structure*, JSDOMGlobalObject&, Ref<TestSerializedScriptValueInterface>&&); 61 61 62 62 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r190637 r190714 100 100 class JSTestTypedefsConstructor : public DOMConstructorObject { 101 101 private: 102 JSTestTypedefsConstructor(JSC::Structure*, JSDOMGlobalObject *);102 JSTestTypedefsConstructor(JSC::Structure*, JSDOMGlobalObject&); 103 103 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 104 104 105 105 public: 106 106 typedef DOMConstructorObject Base; 107 static JSTestTypedefsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)107 static JSTestTypedefsConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 108 108 { 109 109 JSTestTypedefsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsConstructor>(vm.heap)) JSTestTypedefsConstructor(structure, globalObject); 110 ptr->finishCreation(vm, *globalObject);110 ptr->finishCreation(vm, globalObject); 111 111 return ptr; 112 112 } 113 113 114 114 DECLARE_INFO; 115 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)115 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 116 116 { 117 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());117 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 118 118 } 119 119 protected: … … 160 160 const ClassInfo JSTestTypedefsConstructor::s_info = { "TestTypedefsConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestTypedefsConstructor) }; 161 161 162 JSTestTypedefsConstructor::JSTestTypedefsConstructor(Structure* structure, JSDOMGlobalObject *globalObject)162 JSTestTypedefsConstructor::JSTestTypedefsConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 163 163 : Base(structure, globalObject) 164 164 { … … 214 214 const ClassInfo JSTestTypedefs::s_info = { "TestTypedefs", &Base::s_info, &JSTestTypedefsTable, CREATE_METHOD_TABLE(JSTestTypedefs) }; 215 215 216 JSTestTypedefs::JSTestTypedefs(Structure* structure, JSDOMGlobalObject *globalObject, Ref<TestTypedefs>&& impl)216 JSTestTypedefs::JSTestTypedefs(Structure* structure, JSDOMGlobalObject& globalObject, Ref<TestTypedefs>&& impl) 217 217 : JSDOMWrapperWithImplementation<TestTypedefs>(structure, globalObject, WTF::move(impl)) 218 218 { … … 494 494 JSValue JSTestTypedefs::getConstructor(VM& vm, JSGlobalObject* globalObject) 495 495 { 496 return getDOMConstructor<JSTestTypedefsConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));496 return getDOMConstructor<JSTestTypedefsConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 497 497 } 498 498 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
r190403 r190714 33 33 static JSTestTypedefs* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestTypedefs>&& impl) 34 34 { 35 JSTestTypedefs* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefs>(globalObject->vm().heap)) JSTestTypedefs(structure, globalObject, WTF::move(impl));35 JSTestTypedefs* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefs>(globalObject->vm().heap)) JSTestTypedefs(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 55 55 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 56 56 protected: 57 JSTestTypedefs(JSC::Structure*, JSDOMGlobalObject *, Ref<TestTypedefs>&&);57 JSTestTypedefs(JSC::Structure*, JSDOMGlobalObject&, Ref<TestTypedefs>&&); 58 58 59 59 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
r190637 r190714 63 63 class JSattributeConstructor : public DOMConstructorObject { 64 64 private: 65 JSattributeConstructor(JSC::Structure*, JSDOMGlobalObject *);65 JSattributeConstructor(JSC::Structure*, JSDOMGlobalObject&); 66 66 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 67 67 68 68 public: 69 69 typedef DOMConstructorObject Base; 70 static JSattributeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)70 static JSattributeConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 71 71 { 72 72 JSattributeConstructor* ptr = new (NotNull, JSC::allocateCell<JSattributeConstructor>(vm.heap)) JSattributeConstructor(structure, globalObject); 73 ptr->finishCreation(vm, *globalObject);73 ptr->finishCreation(vm, globalObject); 74 74 return ptr; 75 75 } 76 76 77 77 DECLARE_INFO; 78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)79 { 80 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());78 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 79 { 80 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 81 81 } 82 82 }; … … 84 84 const ClassInfo JSattributeConstructor::s_info = { "attributeConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSattributeConstructor) }; 85 85 86 JSattributeConstructor::JSattributeConstructor(Structure* structure, JSDOMGlobalObject *globalObject)86 JSattributeConstructor::JSattributeConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 87 87 : Base(structure, globalObject) 88 88 { … … 116 116 const ClassInfo JSattribute::s_info = { "attribute", &Base::s_info, 0, CREATE_METHOD_TABLE(JSattribute) }; 117 117 118 JSattribute::JSattribute(Structure* structure, JSDOMGlobalObject *globalObject, Ref<attribute>&& impl)118 JSattribute::JSattribute(Structure* structure, JSDOMGlobalObject& globalObject, Ref<attribute>&& impl) 119 119 : JSDOMWrapperWithImplementation<attribute>(structure, globalObject, WTF::move(impl)) 120 120 { … … 164 164 JSValue JSattribute::getConstructor(VM& vm, JSGlobalObject* globalObject) 165 165 { 166 return getDOMConstructor<JSattributeConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));166 return getDOMConstructor<JSattributeConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 167 167 } 168 168 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSattribute.h
r190403 r190714 34 34 static JSattribute* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<attribute>&& impl) 35 35 { 36 JSattribute* ptr = new (NotNull, JSC::allocateCell<JSattribute>(globalObject->vm().heap)) JSattribute(structure, globalObject, WTF::move(impl));36 JSattribute* ptr = new (NotNull, JSC::allocateCell<JSattribute>(globalObject->vm().heap)) JSattribute(structure, *globalObject, WTF::move(impl)); 37 37 ptr->finishCreation(globalObject->vm()); 38 38 return ptr; … … 53 53 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 54 54 protected: 55 JSattribute(JSC::Structure*, JSDOMGlobalObject *, Ref<attribute>&&);55 JSattribute(JSC::Structure*, JSDOMGlobalObject&, Ref<attribute>&&); 56 56 57 57 void finishCreation(JSC::VM& vm) -
trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
r190637 r190714 60 60 class JSreadonlyConstructor : public DOMConstructorObject { 61 61 private: 62 JSreadonlyConstructor(JSC::Structure*, JSDOMGlobalObject *);62 JSreadonlyConstructor(JSC::Structure*, JSDOMGlobalObject&); 63 63 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 64 64 65 65 public: 66 66 typedef DOMConstructorObject Base; 67 static JSreadonlyConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject *globalObject)67 static JSreadonlyConstructor* create(JSC::VM& vm, JSC::Structure* structure, JSDOMGlobalObject& globalObject) 68 68 { 69 69 JSreadonlyConstructor* ptr = new (NotNull, JSC::allocateCell<JSreadonlyConstructor>(vm.heap)) JSreadonlyConstructor(structure, globalObject); 70 ptr->finishCreation(vm, *globalObject);70 ptr->finishCreation(vm, globalObject); 71 71 return ptr; 72 72 } 73 73 74 74 DECLARE_INFO; 75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject *globalObject, JSC::JSValue prototype)75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject& globalObject, JSC::JSValue prototype) 76 76 { 77 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());77 return JSC::Structure::create(vm, &globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); 78 78 } 79 79 }; … … 81 81 const ClassInfo JSreadonlyConstructor::s_info = { "readonlyConstructor", &Base::s_info, 0, CREATE_METHOD_TABLE(JSreadonlyConstructor) }; 82 82 83 JSreadonlyConstructor::JSreadonlyConstructor(Structure* structure, JSDOMGlobalObject *globalObject)83 JSreadonlyConstructor::JSreadonlyConstructor(Structure* structure, JSDOMGlobalObject& globalObject) 84 84 : Base(structure, globalObject) 85 85 { … … 112 112 const ClassInfo JSreadonly::s_info = { "readonly", &Base::s_info, 0, CREATE_METHOD_TABLE(JSreadonly) }; 113 113 114 JSreadonly::JSreadonly(Structure* structure, JSDOMGlobalObject *globalObject, Ref<readonly>&& impl)114 JSreadonly::JSreadonly(Structure* structure, JSDOMGlobalObject& globalObject, Ref<readonly>&& impl) 115 115 : JSDOMWrapperWithImplementation<readonly>(structure, globalObject, WTF::move(impl)) 116 116 { … … 143 143 JSValue JSreadonly::getConstructor(VM& vm, JSGlobalObject* globalObject) 144 144 { 145 return getDOMConstructor<JSreadonlyConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));145 return getDOMConstructor<JSreadonlyConstructor>(vm, *jsCast<JSDOMGlobalObject*>(globalObject)); 146 146 } 147 147 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
r190403 r190714 33 33 static JSreadonly* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<readonly>&& impl) 34 34 { 35 JSreadonly* ptr = new (NotNull, JSC::allocateCell<JSreadonly>(globalObject->vm().heap)) JSreadonly(structure, globalObject, WTF::move(impl));35 JSreadonly* ptr = new (NotNull, JSC::allocateCell<JSreadonly>(globalObject->vm().heap)) JSreadonly(structure, *globalObject, WTF::move(impl)); 36 36 ptr->finishCreation(globalObject->vm()); 37 37 return ptr; … … 52 52 static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*); 53 53 protected: 54 JSreadonly(JSC::Structure*, JSDOMGlobalObject *, Ref<readonly>&&);54 JSreadonly(JSC::Structure*, JSDOMGlobalObject&, Ref<readonly>&&); 55 55 56 56 void finishCreation(JSC::VM& vm)
Note: See TracChangeset
for help on using the changeset viewer.