Changeset 216198 in webkit
- Timestamp:
- May 4, 2017 11:39:03 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 73 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r216197 r216198 1 2017-05-04 Sam Weinig <sam@webkit.org> 2 3 Make the [EnabledBySetting] extended attribute work for any attribute or operation on a prototype 4 https://bugs.webkit.org/show_bug.cgi?id=171588 5 6 Reviewed by Dean Jackson. 7 8 * bindings/js/JSDOMIterator.h: 9 (WebCore::JSDOMIterator::createPrototype): 10 * bindings/js/JSDOMWindowShell.cpp: 11 (WebCore::JSDOMWindowShell::setWindow): 12 * bindings/js/JSDOMWrapperCache.h: 13 (WebCore::getDOMStructure): 14 (WebCore::getDOMPrototype): 15 * bindings/js/WorkerScriptController.cpp: 16 (WebCore::WorkerScriptController::initScript): 17 Update to account for createPrototype and prototype taking the global object by reference. 18 19 * bindings/scripts/CodeGeneratorJS.pm: 20 (NeedsSettingsCheckForPrototypeProperty): 21 Add predicate to determine if an interface has any settings enabled properties on the prototype, 22 needed to determine if we should pass the global object to finishCreation. 23 24 (GenerateHeader): 25 Update signature of both createPrototype and prototype to take JSDOMGlobalObject& rather than 26 a JSC::JSGlobalObject*, this allows us to pass the more specific type to the prototype constructor, 27 and access the ScriptExecutionContext for the Settings. 28 29 (GeneratePropertiesHashTable): 30 Update to return, via out parameter, arrays with the attributes and operations that specify EnabledBySetting. This 31 mimics the model used for RuntimeEnabledFeatures. 32 33 (GenerateImplementation): 34 In {Class}Prototype::finishCreation, add code to check settings to see if an attribute or operation should be enabled, 35 and if it shouldn't remove it from the object. This, again, is modeled on RuntimeEnabledFeatures. 36 37 (GeneratePrototypeDeclaration): 38 Update signatures to take JSDOMGlobalObject& and specialize finishCreation to take one if there are any properties 39 that require settings to enable. 40 41 (GenerateConstructorHelperMethods): 42 Update for new signature of prototype(...). 43 44 * bindings/scripts/test/JS/JSInterfaceName.cpp: 45 * bindings/scripts/test/JS/JSInterfaceName.h: 46 * bindings/scripts/test/JS/JSMapLike.cpp: 47 * bindings/scripts/test/JS/JSMapLike.h: 48 * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: 49 * bindings/scripts/test/JS/JSReadOnlyMapLike.h: 50 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 51 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: 52 * bindings/scripts/test/JS/JSTestCEReactions.cpp: 53 * bindings/scripts/test/JS/JSTestCEReactions.h: 54 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: 55 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h: 56 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: 57 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: 58 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: 59 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: 60 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 61 * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: 62 * bindings/scripts/test/JS/JSTestDOMJIT.cpp: 63 * bindings/scripts/test/JS/JSTestDOMJIT.h: 64 * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 65 * bindings/scripts/test/JS/JSTestEventConstructor.h: 66 * bindings/scripts/test/JS/JSTestEventTarget.cpp: 67 * bindings/scripts/test/JS/JSTestEventTarget.h: 68 * bindings/scripts/test/JS/JSTestException.cpp: 69 * bindings/scripts/test/JS/JSTestException.h: 70 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: 71 * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: 72 * bindings/scripts/test/JS/JSTestGlobalObject.h: 73 * bindings/scripts/test/JS/JSTestInterface.cpp: 74 * bindings/scripts/test/JS/JSTestInterface.h: 75 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: 76 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h: 77 * bindings/scripts/test/JS/JSTestIterable.cpp: 78 * bindings/scripts/test/JS/JSTestIterable.h: 79 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 80 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h: 81 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 82 * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: 83 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 84 * bindings/scripts/test/JS/JSTestNamedConstructor.h: 85 * bindings/scripts/test/JS/JSTestNode.cpp: 86 * bindings/scripts/test/JS/JSTestNode.h: 87 * bindings/scripts/test/JS/JSTestObj.cpp: 88 * bindings/scripts/test/JS/JSTestObj.h: 89 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 90 * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: 91 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: 92 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h: 93 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 94 * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: 95 * bindings/scripts/test/JS/JSTestSerialization.cpp: 96 * bindings/scripts/test/JS/JSTestSerialization.h: 97 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: 98 * bindings/scripts/test/JS/JSTestSerializationInherit.h: 99 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: 100 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h: 101 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 102 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: 103 * bindings/scripts/test/JS/JSTestTypedefs.cpp: 104 * bindings/scripts/test/JS/JSTestTypedefs.h: 105 Update test results for new test values and changes in signatures to pass JSDOMGlobalObject. 106 107 * bindings/scripts/test/TestObj.idl: 108 Add tests for [EnableBySetting] for attributes and operations. 109 110 * bridge/objc/objc_runtime.h: 111 * bridge/runtime_array.h: 112 * bridge/runtime_method.h: 113 * bridge/runtime_object.h: 114 * inspector/CommandLineAPIHost.cpp: 115 Update createPrototype function to take the global object by reference. 116 1 117 2017-05-04 Eric Carlson <eric.carlson@apple.com> 2 118 -
trunk/Source/WebCore/bindings/js/JSDOMIterator.h
r211454 r216198 100 100 } 101 101 102 static Prototype* createPrototype(JSC::VM& vm, JSC::JSGlobalObject *globalObject)103 { 104 return Prototype::create(vm, globalObject, Prototype::createStructure(vm, globalObject, globalObject->iteratorPrototype()));102 static Prototype* createPrototype(JSC::VM& vm, JSC::JSGlobalObject& globalObject) 103 { 104 return Prototype::create(vm, &globalObject, Prototype::createStructure(vm, &globalObject, globalObject.iteratorPrototype())); 105 105 } 106 106 -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
r211247 r216198 82 82 83 83 VM& vm = commonVM(); 84 Structure* prototypeStructure = JSDOMWindowPrototype::createStructure(vm, 0, jsNull());85 Strong<JSDOMWindowPrototype> prototype(vm, JSDOMWindowPrototype::create(vm, 0, prototypeStructure));84 Structure* prototypeStructure = JSDOMWindowPrototype::createStructure(vm, nullptr, jsNull()); 85 Strong<JSDOMWindowPrototype> prototype(vm, JSDOMWindowPrototype::create(vm, nullptr, prototypeStructure)); 86 86 87 Structure* structure = JSDOMWindow::createStructure(vm, 0, prototype.get());87 Structure* structure = JSDOMWindow::createStructure(vm, nullptr, prototype.get()); 88 88 JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this); 89 89 prototype->structure()->setGlobalObject(vm, jsDOMWindow); 90 90 91 Structure* windowPropertiesStructure = JSDOMWindowProperties::createStructure(vm, jsDOMWindow, JSEventTarget::prototype(vm, jsDOMWindow));91 Structure* windowPropertiesStructure = JSDOMWindowProperties::createStructure(vm, jsDOMWindow, JSEventTarget::prototype(vm, *jsDOMWindow)); 92 92 JSDOMWindowProperties* windowProperties = JSDOMWindowProperties::create(windowPropertiesStructure, *jsDOMWindow); 93 93 -
trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.h
r211403 r216198 85 85 if (JSC::Structure* structure = getCachedDOMStructure(globalObject, WrapperClass::info())) 86 86 return structure; 87 return cacheDOMStructure(globalObject, WrapperClass::createStructure(vm, &globalObject, WrapperClass::createPrototype(vm, &globalObject)), WrapperClass::info());87 return cacheDOMStructure(globalObject, WrapperClass::createStructure(vm, &globalObject, WrapperClass::createPrototype(vm, globalObject)), WrapperClass::info()); 88 88 } 89 89 … … 94 94 } 95 95 96 template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JS C::JSGlobalObject*globalObject)97 { 98 return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, *JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));96 template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JSDOMGlobalObject& globalObject) 97 { 98 return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, globalObject)->storedPrototype())); 99 99 } 100 100 -
trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp
r215353 r216198 89 89 ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper); 90 90 dedicatedContextPrototype->structure()->setGlobalObject(*m_vm, m_workerGlobalScopeWrapper.get()); 91 dedicatedContextPrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSWorkerGlobalScope::prototype(*m_vm, m_workerGlobalScopeWrapper.get()));91 dedicatedContextPrototype->structure()->setPrototypeWithoutTransition(*m_vm, JSWorkerGlobalScope::prototype(*m_vm, *m_workerGlobalScopeWrapper.get())); 92 92 93 93 proxy->setTarget(*m_vm, m_workerGlobalScopeWrapper.get()); -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r215916 r216198 982 982 return $interface->extendedAttributes->{EnabledAtRuntime} 983 983 || $interface->extendedAttributes->{EnabledForWorld}; 984 } 985 986 sub NeedsSettingsCheckForPrototypeProperty 987 { 988 my $interface = shift; 989 990 foreach my $function (@{$interface->functions}) { 991 next if OperationShouldBeOnInstance($interface, $function); 992 993 return 1 if $function->extendedAttributes->{EnabledBySetting}; 994 } 995 996 foreach my $attribute (@{$interface->attributes}) { 997 next if AttributeShouldBeOnInstance($interface, $attribute); 998 return 1 if $attribute->extendedAttributes->{EnabledBySetting}; 999 } 1000 1001 return 0; 984 1002 } 985 1003 … … 1804 1822 # Prototype 1805 1823 unless (ShouldUseGlobalObjectPrototype($interface)) { 1806 push(@headerContent, " static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);\n");1807 push(@headerContent, " static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);\n");1824 push(@headerContent, " static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);\n"); 1825 push(@headerContent, " static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);\n"); 1808 1826 } 1809 1827 … … 2270 2288 sub GeneratePropertiesHashTable 2271 2289 { 2272 my ($object, $interface, $isInstance, $hashKeys, $hashSpecials, $hashValue1, $hashValue2, $conditionals, $runtimeEnabledFunctions, $runtimeEnabledAttributes ) = @_;2290 my ($object, $interface, $isInstance, $hashKeys, $hashSpecials, $hashValue1, $hashValue2, $conditionals, $runtimeEnabledFunctions, $runtimeEnabledAttributes, $settingsEnabledFunctions, $settingsEnabledAttributes) = @_; 2273 2291 2274 2292 # FIXME: These should be functions on $interface. … … 2331 2349 if (NeedsRuntimeCheck($attribute)) { 2332 2350 push(@$runtimeEnabledAttributes, $attribute); 2351 } 2352 2353 if ($attribute->extendedAttributes->{EnabledBySetting}) { 2354 push(@$settingsEnabledAttributes, $attribute); 2333 2355 } 2334 2356 } … … 2372 2394 if (NeedsRuntimeCheck($function)) { 2373 2395 push(@$runtimeEnabledFunctions, $function); 2396 } 2397 2398 if ($function->extendedAttributes->{EnabledBySetting}) { 2399 push(@$settingsEnabledFunctions, $function); 2374 2400 } 2375 2401 } … … 3190 3216 my @runtimeEnabledFunctions = (); 3191 3217 my @runtimeEnabledAttributes = (); 3218 my @settingsEnabledFunctions = (); 3219 my @settingsEnabledAttributes = (); 3192 3220 3193 3221 # Generate hash table for properties on the instance. … … 3195 3223 \@hashKeys, \@hashSpecials, 3196 3224 \@hashValue1, \@hashValue2, 3197 \%conditionals, \@runtimeEnabledFunctions, \@runtimeEnabledAttributes); 3225 \%conditionals, 3226 \@runtimeEnabledFunctions, \@runtimeEnabledAttributes, 3227 \@settingsEnabledFunctions, \@settingsEnabledAttributes); 3198 3228 3199 3229 $object->GenerateHashTable($hashName, $numInstanceProperties, … … 3313 3343 @runtimeEnabledFunctions = (); 3314 3344 @runtimeEnabledAttributes = (); 3345 @settingsEnabledFunctions = (); 3346 @settingsEnabledAttributes = (); 3315 3347 3316 3348 # Generate hash table for properties on the prototype. … … 3318 3350 \@hashKeys, \@hashSpecials, 3319 3351 \@hashValue1, \@hashValue2, 3320 \%conditionals, \@runtimeEnabledFunctions, \@runtimeEnabledAttributes); 3352 \%conditionals, 3353 \@runtimeEnabledFunctions, \@runtimeEnabledAttributes, 3354 \@settingsEnabledFunctions, \@settingsEnabledAttributes); 3355 3321 3356 my $hashSize = $numPrototypeProperties; 3322 3357 … … 3349 3384 3350 3385 if (PrototypeHasStaticPropertyTable($interface) && !IsGlobalOrPrimaryGlobalInterface($interface)) { 3351 push(@implContent, "void ${className}Prototype::finishCreation(VM& vm)\n"); 3386 my $needsGlobalObjectInFinishCreation = NeedsSettingsCheckForPrototypeProperty($interface); 3387 3388 if ($needsGlobalObjectInFinishCreation) { 3389 push(@implContent, "void ${className}Prototype::finishCreation(VM& vm, JSDOMGlobalObject& globalObject)\n"); 3390 } else { 3391 push(@implContent, "void ${className}Prototype::finishCreation(VM& vm)\n"); 3392 } 3352 3393 push(@implContent, "{\n"); 3353 3394 push(@implContent, " Base::finishCreation(vm);\n"); … … 3368 3409 push(@implContent, " }\n"); 3369 3410 push(@implContent, "#endif\n") if $conditionalString; 3411 } 3412 3413 my @settingsEnabledProperties = @settingsEnabledFunctions; 3414 push(@settingsEnabledProperties, @settingsEnabledAttributes); 3415 if (scalar(@settingsEnabledProperties)) { 3416 AddToImplIncludes("Settings.h"); 3417 push(@implContent, " auto* context = globalObject.scriptExecutionContext();\n"); 3418 push(@implContent, " ASSERT(!context || context->isDocument());\n"); 3419 3420 foreach my $functionOrAttribute (@settingsEnabledProperties) { 3421 my $conditionalString = $codeGenerator->GenerateConditionalString($functionOrAttribute); 3422 push(@implContent, "#if ${conditionalString}\n") if $conditionalString; 3423 3424 my $enableFunction = ToMethodName($functionOrAttribute->extendedAttributes->{EnabledBySetting}) . "Enabled"; 3425 my $name = $functionOrAttribute->name; 3426 3427 push(@implContent, " if (!context || !downcast<Document>(*context).settings().${enableFunction}()) {\n"); 3428 push(@implContent, " Identifier propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>(\"$name\"), strlen(\"$name\"));\n"); 3429 push(@implContent, " VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);\n"); 3430 push(@implContent, " JSObject::deleteProperty(this, globalObject.globalExec(), propertyName);\n"); 3431 push(@implContent, " }\n"); 3432 3433 push(@implContent, "#endif\n") if $conditionalString; 3434 } 3370 3435 } 3371 3436 … … 3523 3588 3524 3589 unless (ShouldUseGlobalObjectPrototype($interface)) { 3525 push(@implContent, "JSObject* ${className}::createPrototype(VM& vm, JS GlobalObject*globalObject)\n");3590 push(@implContent, "JSObject* ${className}::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)\n"); 3526 3591 push(@implContent, "{\n"); 3527 3592 if ($interface->parentType) { 3528 3593 my $parentClassNameForPrototype = "JS" . $interface->parentType->name; 3529 push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm,globalObject, ${parentClassNameForPrototype}::prototype(vm, globalObject)));\n");3594 push(@implContent, " return ${className}Prototype::create(vm, &globalObject, ${className}Prototype::createStructure(vm, &globalObject, ${parentClassNameForPrototype}::prototype(vm, globalObject)));\n"); 3530 3595 } else { 3531 3596 my $prototype = $interface->isException ? "errorPrototype" : "objectPrototype"; 3532 push(@implContent, " return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, globalObject->${prototype}()));\n");3597 push(@implContent, " return ${className}Prototype::create(vm, &globalObject, ${className}Prototype::createStructure(vm, &globalObject, globalObject.${prototype}()));\n"); 3533 3598 } 3534 3599 push(@implContent, "}\n\n"); 3535 3600 3536 push(@implContent, "JSObject* ${className}::prototype(VM& vm, JS GlobalObject*globalObject)\n");3601 push(@implContent, "JSObject* ${className}::prototype(VM& vm, JSDOMGlobalObject& globalObject)\n"); 3537 3602 push(@implContent, "{\n"); 3538 3603 push(@implContent, " return getDOMPrototype<${className}>(vm, globalObject);\n"); … … 6003 6068 my $prototypeClassName = "${className}Prototype"; 6004 6069 6070 my $needsGlobalObjectInFinishCreation = NeedsSettingsCheckForPrototypeProperty($interface); 6071 6005 6072 my %structureFlags = (); 6006 6073 push(@$outputArray, "class ${prototypeClassName} : public JSC::JSNonFinalObject {\n"); … … 6008 6075 push(@$outputArray, " using Base = JSC::JSNonFinalObject;\n"); 6009 6076 6010 push(@$outputArray, " static ${prototypeClassName}* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)\n");6077 push(@$outputArray, " static ${prototypeClassName}* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)\n"); 6011 6078 push(@$outputArray, " {\n"); 6012 6079 push(@$outputArray, " ${className}Prototype* ptr = new (NotNull, JSC::allocateCell<${className}Prototype>(vm.heap)) ${className}Prototype(vm, globalObject, structure);\n"); 6013 push(@$outputArray, " ptr->finishCreation(vm);\n"); 6080 6081 if ($needsGlobalObjectInFinishCreation) { 6082 push(@$outputArray, " ptr->finishCreation(vm, *globalObject);\n"); 6083 } else { 6084 push(@$outputArray, " ptr->finishCreation(vm);\n"); 6085 } 6086 6014 6087 push(@$outputArray, " return ptr;\n"); 6015 6088 push(@$outputArray, " }\n\n"); … … 6017 6090 push(@$outputArray, " DECLARE_INFO;\n"); 6018 6091 6019 push(@$outputArray, 6020 " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\n" . 6021 " {\n" . 6022 " return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());\n" . 6023 " }\n"); 6092 push(@$outputArray, " static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)\n"); 6093 push(@$outputArray, " {\n"); 6094 push(@$outputArray, " return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());\n"); 6095 push(@$outputArray, " }\n"); 6024 6096 6025 6097 push(@$outputArray, "\nprivate:\n"); … … 6034 6106 } else { 6035 6107 push(@$outputArray, "\n"); 6036 push(@$outputArray, " void finishCreation(JSC::VM&);\n"); 6108 if ($needsGlobalObjectInFinishCreation) { 6109 push(@$outputArray, " void finishCreation(JSC::VM&, JSDOMGlobalObject&);\n"); 6110 } else { 6111 push(@$outputArray, " void finishCreation(JSC::VM&);\n"); 6112 } 6037 6113 } 6038 6114 } … … 6234 6310 push(@$outputArray, " UNUSED_PARAM(globalObject);\n"); 6235 6311 } else { 6236 push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);\n");6312 push(@$outputArray, " putDirect(vm, vm.propertyNames->prototype, ${className}::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum);\n"); 6237 6313 } 6238 6314 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp
r211892 r216198 42 42 public: 43 43 using Base = JSC::JSNonFinalObject; 44 static JSInterfaceNamePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)44 static JSInterfaceNamePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 45 45 { 46 46 JSInterfaceNamePrototype* ptr = new (NotNull, JSC::allocateCell<JSInterfaceNamePrototype>(vm.heap)) JSInterfaceNamePrototype(vm, globalObject, structure); … … 74 74 template<> void JSInterfaceNameConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 75 75 { 76 putDirect(vm, vm.propertyNames->prototype, JSInterfaceName::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);76 putDirect(vm, vm.propertyNames->prototype, JSInterfaceName::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 77 77 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("InterfaceName"))), ReadOnly | DontEnum); 78 78 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 110 110 } 111 111 112 JSObject* JSInterfaceName::createPrototype(VM& vm, JS GlobalObject*globalObject)113 { 114 return JSInterfaceNamePrototype::create(vm, globalObject, JSInterfaceNamePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));115 } 116 117 JSObject* JSInterfaceName::prototype(VM& vm, JS GlobalObject*globalObject)112 JSObject* JSInterfaceName::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 113 { 114 return JSInterfaceNamePrototype::create(vm, &globalObject, JSInterfaceNamePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 115 } 116 117 JSObject* JSInterfaceName::prototype(VM& vm, JSDOMGlobalObject& globalObject) 118 118 { 119 119 return getDOMPrototype<JSInterfaceName>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static InterfaceName* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp
r215477 r216198 58 58 public: 59 59 using Base = JSC::JSNonFinalObject; 60 static JSMapLikePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)60 static JSMapLikePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 61 61 { 62 62 JSMapLikePrototype* ptr = new (NotNull, JSC::allocateCell<JSMapLikePrototype>(vm.heap)) JSMapLikePrototype(vm, globalObject, structure); … … 90 90 template<> void JSMapLikeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 91 91 { 92 putDirect(vm, vm.propertyNames->prototype, JSMapLike::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);92 putDirect(vm, vm.propertyNames->prototype, JSMapLike::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 93 93 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("MapLike"))), ReadOnly | DontEnum); 94 94 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 138 138 } 139 139 140 JSObject* JSMapLike::createPrototype(VM& vm, JS GlobalObject*globalObject)141 { 142 return JSMapLikePrototype::create(vm, globalObject, JSMapLikePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));143 } 144 145 JSObject* JSMapLike::prototype(VM& vm, JS GlobalObject*globalObject)140 JSObject* JSMapLike::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 141 { 142 return JSMapLikePrototype::create(vm, &globalObject, JSMapLikePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 143 } 144 145 JSObject* JSMapLike::prototype(VM& vm, JSDOMGlobalObject& globalObject) 146 146 { 147 147 return getDOMPrototype<JSMapLike>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSMapLike.h
r213108 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static MapLike* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp
r215477 r216198 55 55 public: 56 56 using Base = JSC::JSNonFinalObject; 57 static JSReadOnlyMapLikePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)57 static JSReadOnlyMapLikePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 58 58 { 59 59 JSReadOnlyMapLikePrototype* ptr = new (NotNull, JSC::allocateCell<JSReadOnlyMapLikePrototype>(vm.heap)) JSReadOnlyMapLikePrototype(vm, globalObject, structure); … … 87 87 template<> void JSReadOnlyMapLikeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 88 88 { 89 putDirect(vm, vm.propertyNames->prototype, JSReadOnlyMapLike::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);89 putDirect(vm, vm.propertyNames->prototype, JSReadOnlyMapLike::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 90 90 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("ReadOnlyMapLike"))), ReadOnly | DontEnum); 91 91 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 132 132 } 133 133 134 JSObject* JSReadOnlyMapLike::createPrototype(VM& vm, JS GlobalObject*globalObject)135 { 136 return JSReadOnlyMapLikePrototype::create(vm, globalObject, JSReadOnlyMapLikePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));137 } 138 139 JSObject* JSReadOnlyMapLike::prototype(VM& vm, JS GlobalObject*globalObject)134 JSObject* JSReadOnlyMapLike::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 135 { 136 return JSReadOnlyMapLikePrototype::create(vm, &globalObject, JSReadOnlyMapLikePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 137 } 138 139 JSObject* JSReadOnlyMapLike::prototype(VM& vm, JSDOMGlobalObject& globalObject) 140 140 { 141 141 return getDOMPrototype<JSReadOnlyMapLike>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.h
r213108 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static ReadOnlyMapLike* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
r215477 r216198 52 52 public: 53 53 using Base = JSC::JSNonFinalObject; 54 static JSTestActiveDOMObjectPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)54 static JSTestActiveDOMObjectPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 55 55 { 56 56 JSTestActiveDOMObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectPrototype>(vm.heap)) JSTestActiveDOMObjectPrototype(vm, globalObject, structure); … … 98 98 template<> void JSTestActiveDOMObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 99 99 { 100 putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);100 putDirect(vm, vm.propertyNames->prototype, JSTestActiveDOMObject::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 101 101 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestActiveDOMObject"))), ReadOnly | DontEnum); 102 102 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 136 136 } 137 137 138 JSObject* JSTestActiveDOMObject::createPrototype(VM& vm, JS GlobalObject*globalObject)139 { 140 return JSTestActiveDOMObjectPrototype::create(vm, globalObject, JSTestActiveDOMObjectPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));141 } 142 143 JSObject* JSTestActiveDOMObject::prototype(VM& vm, JS GlobalObject*globalObject)138 JSObject* JSTestActiveDOMObject::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 139 { 140 return JSTestActiveDOMObjectPrototype::create(vm, &globalObject, JSTestActiveDOMObjectPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 141 } 142 143 JSObject* JSTestActiveDOMObject::prototype(VM& vm, JSDOMGlobalObject& globalObject) 144 144 { 145 145 return getDOMPrototype<JSTestActiveDOMObject>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestActiveDOMObject* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp
r215477 r216198 57 57 public: 58 58 using Base = JSC::JSNonFinalObject; 59 static JSTestCEReactionsPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)59 static JSTestCEReactionsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 60 60 { 61 61 JSTestCEReactionsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsPrototype>(vm.heap)) JSTestCEReactionsPrototype(vm, globalObject, structure); … … 89 89 template<> void JSTestCEReactionsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 90 90 { 91 putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);91 putDirect(vm, vm.propertyNames->prototype, JSTestCEReactions::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 92 92 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactions"))), ReadOnly | DontEnum); 93 93 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 129 129 } 130 130 131 JSObject* JSTestCEReactions::createPrototype(VM& vm, JS GlobalObject*globalObject)132 { 133 return JSTestCEReactionsPrototype::create(vm, globalObject, JSTestCEReactionsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));134 } 135 136 JSObject* JSTestCEReactions::prototype(VM& vm, JS GlobalObject*globalObject)131 JSObject* JSTestCEReactions::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 132 { 133 return JSTestCEReactionsPrototype::create(vm, &globalObject, JSTestCEReactionsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 134 } 135 136 JSObject* JSTestCEReactions::prototype(VM& vm, JSDOMGlobalObject& globalObject) 137 137 { 138 138 return getDOMPrototype<JSTestCEReactions>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestCEReactions* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp
r215477 r216198 51 51 public: 52 52 using Base = JSC::JSNonFinalObject; 53 static JSTestCEReactionsStringifierPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)53 static JSTestCEReactionsStringifierPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 54 54 { 55 55 JSTestCEReactionsStringifierPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsStringifierPrototype>(vm.heap)) JSTestCEReactionsStringifierPrototype(vm, globalObject, structure); … … 83 83 template<> void JSTestCEReactionsStringifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 84 84 { 85 putDirect(vm, vm.propertyNames->prototype, JSTestCEReactionsStringifier::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);85 putDirect(vm, vm.propertyNames->prototype, JSTestCEReactionsStringifier::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 86 86 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactionsStringifier"))), ReadOnly | DontEnum); 87 87 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 121 121 } 122 122 123 JSObject* JSTestCEReactionsStringifier::createPrototype(VM& vm, JS GlobalObject*globalObject)124 { 125 return JSTestCEReactionsStringifierPrototype::create(vm, globalObject, JSTestCEReactionsStringifierPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));126 } 127 128 JSObject* JSTestCEReactionsStringifier::prototype(VM& vm, JS GlobalObject*globalObject)123 JSObject* JSTestCEReactionsStringifier::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 124 { 125 return JSTestCEReactionsStringifierPrototype::create(vm, &globalObject, JSTestCEReactionsStringifierPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 126 } 127 128 JSObject* JSTestCEReactionsStringifier::prototype(VM& vm, JSDOMGlobalObject& globalObject) 129 129 { 130 130 return getDOMPrototype<JSTestCEReactionsStringifier>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestCEReactionsStringifier* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp
r211892 r216198 43 43 public: 44 44 using Base = JSC::JSNonFinalObject; 45 static JSTestClassWithJSBuiltinConstructorPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)45 static JSTestClassWithJSBuiltinConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 46 46 { 47 47 JSTestClassWithJSBuiltinConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestClassWithJSBuiltinConstructorPrototype>(vm.heap)) JSTestClassWithJSBuiltinConstructorPrototype(vm, globalObject, structure); … … 75 75 template<> void JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 76 76 { 77 putDirect(vm, vm.propertyNames->prototype, JSTestClassWithJSBuiltinConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);77 putDirect(vm, vm.propertyNames->prototype, JSTestClassWithJSBuiltinConstructor::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 78 78 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestClassWithJSBuiltinConstructor"))), ReadOnly | DontEnum); 79 79 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 116 116 } 117 117 118 JSObject* JSTestClassWithJSBuiltinConstructor::createPrototype(VM& vm, JS GlobalObject*globalObject)119 { 120 return JSTestClassWithJSBuiltinConstructorPrototype::create(vm, globalObject, JSTestClassWithJSBuiltinConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));121 } 122 123 JSObject* JSTestClassWithJSBuiltinConstructor::prototype(VM& vm, JS GlobalObject*globalObject)118 JSObject* JSTestClassWithJSBuiltinConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 119 { 120 return JSTestClassWithJSBuiltinConstructorPrototype::create(vm, &globalObject, JSTestClassWithJSBuiltinConstructorPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 121 } 122 123 JSObject* JSTestClassWithJSBuiltinConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject) 124 124 { 125 125 return getDOMPrototype<JSTestClassWithJSBuiltinConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestClassWithJSBuiltinConstructor* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
r211403 r216198 42 42 public: 43 43 using Base = JSC::JSNonFinalObject; 44 static JSTestCustomConstructorWithNoInterfaceObjectPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)44 static JSTestCustomConstructorWithNoInterfaceObjectPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 45 45 { 46 46 JSTestCustomConstructorWithNoInterfaceObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomConstructorWithNoInterfaceObjectPrototype>(vm.heap)) JSTestCustomConstructorWithNoInterfaceObjectPrototype(vm, globalObject, structure); … … 80 80 template<> void JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 81 81 { 82 putDirect(vm, vm.propertyNames->prototype, JSTestCustomConstructorWithNoInterfaceObject::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);82 putDirect(vm, vm.propertyNames->prototype, JSTestCustomConstructorWithNoInterfaceObject::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomConstructorWithNoInterfaceObject"))), ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 116 116 } 117 117 118 JSObject* JSTestCustomConstructorWithNoInterfaceObject::createPrototype(VM& vm, JS GlobalObject*globalObject)119 { 120 return JSTestCustomConstructorWithNoInterfaceObjectPrototype::create(vm, globalObject, JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));121 } 122 123 JSObject* JSTestCustomConstructorWithNoInterfaceObject::prototype(VM& vm, JS GlobalObject*globalObject)118 JSObject* JSTestCustomConstructorWithNoInterfaceObject::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 119 { 120 return JSTestCustomConstructorWithNoInterfaceObjectPrototype::create(vm, &globalObject, JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 121 } 122 123 JSObject* JSTestCustomConstructorWithNoInterfaceObject::prototype(VM& vm, JSDOMGlobalObject& globalObject) 124 124 { 125 125 return getDOMPrototype<JSTestCustomConstructorWithNoInterfaceObject>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestCustomConstructorWithNoInterfaceObject* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
r215477 r216198 48 48 public: 49 49 using Base = JSC::JSNonFinalObject; 50 static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)50 static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 51 51 { 52 52 JSTestCustomNamedGetterPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterPrototype>(vm.heap)) JSTestCustomNamedGetterPrototype(vm, globalObject, structure); … … 80 80 template<> void JSTestCustomNamedGetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 81 81 { 82 putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetter::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);82 putDirect(vm, vm.propertyNames->prototype, JSTestCustomNamedGetter::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomNamedGetter"))), ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 117 117 } 118 118 119 JSObject* JSTestCustomNamedGetter::createPrototype(VM& vm, JS GlobalObject*globalObject)120 { 121 return JSTestCustomNamedGetterPrototype::create(vm, globalObject, JSTestCustomNamedGetterPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));122 } 123 124 JSObject* JSTestCustomNamedGetter::prototype(VM& vm, JS GlobalObject*globalObject)119 JSObject* JSTestCustomNamedGetter::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 120 { 121 return JSTestCustomNamedGetterPrototype::create(vm, &globalObject, JSTestCustomNamedGetterPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 122 } 123 124 JSObject* JSTestCustomNamedGetter::prototype(VM& vm, JSDOMGlobalObject& globalObject) 125 125 { 126 126 return getDOMPrototype<JSTestCustomNamedGetter>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestCustomNamedGetter* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp
r215477 r216198 130 130 public: 131 131 using Base = JSC::JSNonFinalObject; 132 static JSTestDOMJITPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)132 static JSTestDOMJITPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 133 133 { 134 134 JSTestDOMJITPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestDOMJITPrototype>(vm.heap)) JSTestDOMJITPrototype(vm, globalObject, structure); … … 161 161 template<> void JSTestDOMJITConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 162 162 { 163 putDirect(vm, vm.propertyNames->prototype, JSTestDOMJIT::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);163 putDirect(vm, vm.propertyNames->prototype, JSTestDOMJIT::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 164 164 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestDOMJIT"))), ReadOnly | DontEnum); 165 165 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 237 237 } 238 238 239 JSObject* JSTestDOMJIT::createPrototype(VM& vm, JS GlobalObject*globalObject)240 { 241 return JSTestDOMJITPrototype::create(vm, globalObject, JSTestDOMJITPrototype::createStructure(vm,globalObject, JSNode::prototype(vm, globalObject)));242 } 243 244 JSObject* JSTestDOMJIT::prototype(VM& vm, JS GlobalObject*globalObject)239 JSObject* JSTestDOMJIT::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 240 { 241 return JSTestDOMJITPrototype::create(vm, &globalObject, JSTestDOMJITPrototype::createStructure(vm, &globalObject, JSNode::prototype(vm, globalObject))); 242 } 243 244 JSObject* JSTestDOMJIT::prototype(VM& vm, JSDOMGlobalObject& globalObject) 245 245 { 246 246 return getDOMPrototype<JSTestDOMJIT>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.h
r208613 r216198 38 38 } 39 39 40 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 41 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 42 42 43 43 DECLARE_INFO; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
r215477 r216198 95 95 public: 96 96 using Base = JSC::JSNonFinalObject; 97 static JSTestEventConstructorPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)97 static JSTestEventConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 98 98 { 99 99 JSTestEventConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorPrototype>(vm.heap)) JSTestEventConstructorPrototype(vm, globalObject, structure); … … 143 143 template<> void JSTestEventConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 144 144 { 145 putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);145 putDirect(vm, vm.propertyNames->prototype, JSTestEventConstructor::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 146 146 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventConstructor"))), ReadOnly | DontEnum); 147 147 putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum); … … 186 186 } 187 187 188 JSObject* JSTestEventConstructor::createPrototype(VM& vm, JS GlobalObject*globalObject)189 { 190 return JSTestEventConstructorPrototype::create(vm, globalObject, JSTestEventConstructorPrototype::createStructure(vm,globalObject, JSEvent::prototype(vm, globalObject)));191 } 192 193 JSObject* JSTestEventConstructor::prototype(VM& vm, JS GlobalObject*globalObject)188 JSObject* JSTestEventConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 189 { 190 return JSTestEventConstructorPrototype::create(vm, &globalObject, JSTestEventConstructorPrototype::createStructure(vm, &globalObject, JSEvent::prototype(vm, globalObject))); 191 } 192 193 JSObject* JSTestEventConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject) 194 194 { 195 195 return getDOMPrototype<JSTestEventConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
r208613 r216198 38 38 } 39 39 40 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 41 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 42 42 43 43 DECLARE_INFO; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
r215477 r216198 49 49 public: 50 50 using Base = JSC::JSNonFinalObject; 51 static JSTestEventTargetPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)51 static JSTestEventTargetPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 52 52 { 53 53 JSTestEventTargetPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetPrototype>(vm.heap)) JSTestEventTargetPrototype(vm, globalObject, structure); … … 80 80 template<> void JSTestEventTargetConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 81 81 { 82 putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);82 putDirect(vm, vm.propertyNames->prototype, JSTestEventTarget::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventTarget"))), ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 117 117 } 118 118 119 JSObject* JSTestEventTarget::createPrototype(VM& vm, JS GlobalObject*globalObject)120 { 121 return JSTestEventTargetPrototype::create(vm, globalObject, JSTestEventTargetPrototype::createStructure(vm,globalObject, JSEventTarget::prototype(vm, globalObject)));122 } 123 124 JSObject* JSTestEventTarget::prototype(VM& vm, JS GlobalObject*globalObject)119 JSObject* JSTestEventTarget::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 120 { 121 return JSTestEventTargetPrototype::create(vm, &globalObject, JSTestEventTargetPrototype::createStructure(vm, &globalObject, JSEventTarget::prototype(vm, globalObject))); 122 } 123 124 JSObject* JSTestEventTarget::prototype(VM& vm, JSDOMGlobalObject& globalObject) 125 125 { 126 126 return getDOMPrototype<JSTestEventTarget>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
r211247 r216198 38 38 } 39 39 40 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 41 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 42 42 static TestEventTarget* toWrapped(JSC::VM&, JSC::JSValue); 43 43 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
r211892 r216198 44 44 public: 45 45 using Base = JSC::JSNonFinalObject; 46 static JSTestExceptionPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)46 static JSTestExceptionPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 47 47 { 48 48 JSTestExceptionPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionPrototype>(vm.heap)) JSTestExceptionPrototype(vm, globalObject, structure); … … 90 90 template<> void JSTestExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 91 91 { 92 putDirect(vm, vm.propertyNames->prototype, JSTestException::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);92 putDirect(vm, vm.propertyNames->prototype, JSTestException::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 93 93 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestException"))), ReadOnly | DontEnum); 94 94 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 126 126 } 127 127 128 JSObject* JSTestException::createPrototype(VM& vm, JS GlobalObject*globalObject)129 { 130 return JSTestExceptionPrototype::create(vm, globalObject, JSTestExceptionPrototype::createStructure(vm, globalObject, globalObject->errorPrototype()));131 } 132 133 JSObject* JSTestException::prototype(VM& vm, JS GlobalObject*globalObject)128 JSObject* JSTestException::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 129 { 130 return JSTestExceptionPrototype::create(vm, &globalObject, JSTestExceptionPrototype::createStructure(vm, &globalObject, globalObject.errorPrototype())); 131 } 132 133 JSObject* JSTestException::prototype(VM& vm, JSDOMGlobalObject& globalObject) 134 134 { 135 135 return getDOMPrototype<JSTestException>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h
r211247 r216198 38 38 } 39 39 40 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 41 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 42 42 static TestException* toWrapped(JSC::VM&, JSC::JSValue); 43 43 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
r211892 r216198 42 42 public: 43 43 using Base = JSC::JSNonFinalObject; 44 static JSTestGenerateIsReachablePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)44 static JSTestGenerateIsReachablePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 45 45 { 46 46 JSTestGenerateIsReachablePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachablePrototype>(vm.heap)) JSTestGenerateIsReachablePrototype(vm, globalObject, structure); … … 74 74 template<> void JSTestGenerateIsReachableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 75 75 { 76 putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);76 putDirect(vm, vm.propertyNames->prototype, JSTestGenerateIsReachable::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 77 77 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGenerateIsReachable"))), ReadOnly | DontEnum); 78 78 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 110 110 } 111 111 112 JSObject* JSTestGenerateIsReachable::createPrototype(VM& vm, JS GlobalObject*globalObject)113 { 114 return JSTestGenerateIsReachablePrototype::create(vm, globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));115 } 116 117 JSObject* JSTestGenerateIsReachable::prototype(VM& vm, JS GlobalObject*globalObject)112 JSObject* JSTestGenerateIsReachable::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 113 { 114 return JSTestGenerateIsReachablePrototype::create(vm, &globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 115 } 116 117 JSObject* JSTestGenerateIsReachable::prototype(VM& vm, JSDOMGlobalObject& globalObject) 118 118 { 119 119 return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestGenerateIsReachable* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h
r211247 r216198 85 85 public: 86 86 using Base = JSC::JSNonFinalObject; 87 static JSTestGlobalObjectPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)87 static JSTestGlobalObjectPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 88 88 { 89 89 JSTestGlobalObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestGlobalObjectPrototype>(vm.heap)) JSTestGlobalObjectPrototype(vm, globalObject, structure); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r215477 r216198 128 128 public: 129 129 using Base = JSC::JSNonFinalObject; 130 static JSTestInterfacePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)130 static JSTestInterfacePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 131 131 { 132 132 JSTestInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfacePrototype>(vm.heap)) JSTestInterfacePrototype(vm, globalObject, structure); … … 249 249 template<> void JSTestInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 250 250 { 251 putDirect(vm, vm.propertyNames->prototype, JSTestInterface::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);251 putDirect(vm, vm.propertyNames->prototype, JSTestInterface::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 252 252 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterface"))), ReadOnly | DontEnum); 253 253 putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum); … … 386 386 } 387 387 388 JSObject* JSTestInterface::createPrototype(VM& vm, JS GlobalObject*globalObject)389 { 390 return JSTestInterfacePrototype::create(vm, globalObject, JSTestInterfacePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));391 } 392 393 JSObject* JSTestInterface::prototype(VM& vm, JS GlobalObject*globalObject)388 JSObject* JSTestInterface::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 389 { 390 return JSTestInterfacePrototype::create(vm, &globalObject, JSTestInterfacePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 391 } 392 393 JSObject* JSTestInterface::prototype(VM& vm, JSDOMGlobalObject& globalObject) 394 394 { 395 395 return getDOMPrototype<JSTestInterface>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r211247 r216198 39 39 } 40 40 41 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);42 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 42 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 43 43 static TestInterface* toWrapped(JSC::VM&, JSC::JSValue); 44 44 static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp
r211892 r216198 44 44 public: 45 45 using Base = JSC::JSNonFinalObject; 46 static JSTestInterfaceLeadingUnderscorePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)46 static JSTestInterfaceLeadingUnderscorePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 47 47 { 48 48 JSTestInterfaceLeadingUnderscorePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfaceLeadingUnderscorePrototype>(vm.heap)) JSTestInterfaceLeadingUnderscorePrototype(vm, globalObject, structure); … … 76 76 template<> void JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 77 77 { 78 putDirect(vm, vm.propertyNames->prototype, JSTestInterfaceLeadingUnderscore::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);78 putDirect(vm, vm.propertyNames->prototype, JSTestInterfaceLeadingUnderscore::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 79 79 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterfaceLeadingUnderscore"))), ReadOnly | DontEnum); 80 80 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 113 113 } 114 114 115 JSObject* JSTestInterfaceLeadingUnderscore::createPrototype(VM& vm, JS GlobalObject*globalObject)116 { 117 return JSTestInterfaceLeadingUnderscorePrototype::create(vm, globalObject, JSTestInterfaceLeadingUnderscorePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));118 } 119 120 JSObject* JSTestInterfaceLeadingUnderscore::prototype(VM& vm, JS GlobalObject*globalObject)115 JSObject* JSTestInterfaceLeadingUnderscore::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 116 { 117 return JSTestInterfaceLeadingUnderscorePrototype::create(vm, &globalObject, JSTestInterfaceLeadingUnderscorePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 118 } 119 120 JSObject* JSTestInterfaceLeadingUnderscore::prototype(VM& vm, JSDOMGlobalObject& globalObject) 121 121 { 122 122 return getDOMPrototype<JSTestInterfaceLeadingUnderscore>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestInterfaceLeadingUnderscore* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp
r211892 r216198 51 51 public: 52 52 using Base = JSC::JSNonFinalObject; 53 static JSTestIterablePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)53 static JSTestIterablePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 54 54 { 55 55 JSTestIterablePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestIterablePrototype>(vm.heap)) JSTestIterablePrototype(vm, globalObject, structure); … … 83 83 template<> void JSTestIterableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 84 84 { 85 putDirect(vm, vm.propertyNames->prototype, JSTestIterable::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);85 putDirect(vm, vm.propertyNames->prototype, JSTestIterable::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 86 86 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestIterable"))), ReadOnly | DontEnum); 87 87 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 124 124 } 125 125 126 JSObject* JSTestIterable::createPrototype(VM& vm, JS GlobalObject*globalObject)127 { 128 return JSTestIterablePrototype::create(vm, globalObject, JSTestIterablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));129 } 130 131 JSObject* JSTestIterable::prototype(VM& vm, JS GlobalObject*globalObject)126 JSObject* JSTestIterable::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 127 { 128 return JSTestIterablePrototype::create(vm, &globalObject, JSTestIterablePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 129 } 130 131 JSObject* JSTestIterable::prototype(VM& vm, JSDOMGlobalObject& globalObject) 132 132 { 133 133 return getDOMPrototype<JSTestIterable>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestIterable* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
r211892 r216198 51 51 public: 52 52 using Base = JSC::JSNonFinalObject; 53 static JSTestJSBuiltinConstructorPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)53 static JSTestJSBuiltinConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 54 54 { 55 55 JSTestJSBuiltinConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestJSBuiltinConstructorPrototype>(vm.heap)) JSTestJSBuiltinConstructorPrototype(vm, globalObject, structure); … … 83 83 template<> void JSTestJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 84 84 { 85 putDirect(vm, vm.propertyNames->prototype, JSTestJSBuiltinConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);85 putDirect(vm, vm.propertyNames->prototype, JSTestJSBuiltinConstructor::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 86 86 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestJSBuiltinConstructor"))), ReadOnly | DontEnum); 87 87 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 127 127 } 128 128 129 JSObject* JSTestJSBuiltinConstructor::createPrototype(VM& vm, JS GlobalObject*globalObject)130 { 131 return JSTestJSBuiltinConstructorPrototype::create(vm, globalObject, JSTestJSBuiltinConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));132 } 133 134 JSObject* JSTestJSBuiltinConstructor::prototype(VM& vm, JS GlobalObject*globalObject)129 JSObject* JSTestJSBuiltinConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 130 { 131 return JSTestJSBuiltinConstructorPrototype::create(vm, &globalObject, JSTestJSBuiltinConstructorPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 132 } 133 134 JSObject* JSTestJSBuiltinConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject) 135 135 { 136 136 return getDOMPrototype<JSTestJSBuiltinConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
r208613 r216198 35 35 } 36 36 37 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);38 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);37 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 38 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 39 39 static void destroy(JSC::JSCell*); 40 40 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
r211892 r216198 49 49 public: 50 50 using Base = JSC::JSNonFinalObject; 51 static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)51 static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 52 52 { 53 53 JSTestMediaQueryListListenerPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerPrototype>(vm.heap)) JSTestMediaQueryListListenerPrototype(vm, globalObject, structure); … … 81 81 template<> void JSTestMediaQueryListListenerConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 82 82 { 83 putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);83 putDirect(vm, vm.propertyNames->prototype, JSTestMediaQueryListListener::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestMediaQueryListListener"))), ReadOnly | DontEnum); 85 85 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 118 118 } 119 119 120 JSObject* JSTestMediaQueryListListener::createPrototype(VM& vm, JS GlobalObject*globalObject)121 { 122 return JSTestMediaQueryListListenerPrototype::create(vm, globalObject, JSTestMediaQueryListListenerPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));123 } 124 125 JSObject* JSTestMediaQueryListListener::prototype(VM& vm, JS GlobalObject*globalObject)120 JSObject* JSTestMediaQueryListListener::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 121 { 122 return JSTestMediaQueryListListenerPrototype::create(vm, &globalObject, JSTestMediaQueryListListenerPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 123 } 124 125 JSObject* JSTestMediaQueryListListener::prototype(VM& vm, JSDOMGlobalObject& globalObject) 126 126 { 127 127 return getDOMPrototype<JSTestMediaQueryListListener>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestMediaQueryListListener* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
r215477 r216198 45 45 public: 46 46 using Base = JSC::JSNonFinalObject; 47 static JSTestNamedConstructorPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)47 static JSTestNamedConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 48 48 { 49 49 JSTestNamedConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorPrototype>(vm.heap)) JSTestNamedConstructorPrototype(vm, globalObject, structure); … … 78 78 template<> void JSTestNamedConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 79 79 { 80 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);80 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 81 81 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedConstructor"))), ReadOnly | DontEnum); 82 82 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 112 112 template<> void JSTestNamedConstructorNamedConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 113 113 { 114 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);114 putDirect(vm, vm.propertyNames->prototype, JSTestNamedConstructor::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 115 115 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Audio"))), ReadOnly | DontEnum); 116 116 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 148 148 } 149 149 150 JSObject* JSTestNamedConstructor::createPrototype(VM& vm, JS GlobalObject*globalObject)151 { 152 return JSTestNamedConstructorPrototype::create(vm, globalObject, JSTestNamedConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));153 } 154 155 JSObject* JSTestNamedConstructor::prototype(VM& vm, JS GlobalObject*globalObject)150 JSObject* JSTestNamedConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 151 { 152 return JSTestNamedConstructorPrototype::create(vm, &globalObject, JSTestNamedConstructorPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 153 } 154 155 JSObject* JSTestNamedConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject) 156 156 { 157 157 return getDOMPrototype<JSTestNamedConstructor>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestNamedConstructor* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
r215477 r216198 59 59 public: 60 60 using Base = JSC::JSNonFinalObject; 61 static JSTestNodePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)61 static JSTestNodePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 62 62 { 63 63 JSTestNodePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNodePrototype>(vm.heap)) JSTestNodePrototype(vm, globalObject, structure); … … 101 101 template<> void JSTestNodeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 102 102 { 103 putDirect(vm, vm.propertyNames->prototype, JSTestNode::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);103 putDirect(vm, vm.propertyNames->prototype, JSTestNode::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 104 104 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNode"))), ReadOnly | DontEnum); 105 105 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 165 165 } 166 166 167 JSObject* JSTestNode::createPrototype(VM& vm, JS GlobalObject*globalObject)168 { 169 return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm,globalObject, JSNode::prototype(vm, globalObject)));170 } 171 172 JSObject* JSTestNode::prototype(VM& vm, JS GlobalObject*globalObject)167 JSObject* JSTestNode::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 168 { 169 return JSTestNodePrototype::create(vm, &globalObject, JSTestNodePrototype::createStructure(vm, &globalObject, JSNode::prototype(vm, globalObject))); 170 } 171 172 JSObject* JSTestNode::prototype(VM& vm, JSDOMGlobalObject& globalObject) 173 173 { 174 174 return getDOMPrototype<JSTestNode>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
r212344 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 42 42 DECLARE_INFO; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r215904 r216198 1110 1110 #endif 1111 1111 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWorldSpecificMethod(JSC::ExecState*); 1112 #if ENABLE(TEST_FEATURE) 1113 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEnabledBySettingOperation(JSC::ExecState*); 1114 #endif 1112 1115 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(JSC::ExecState*); 1113 1116 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(JSC::ExecState*); … … 1359 1362 bool setJSTestObjEnabledAtRuntimeAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 1360 1363 #endif 1364 #if ENABLE(TEST_FEATURE) 1365 JSC::EncodedJSValue jsTestObjEnabledBySettingAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); 1366 bool setJSTestObjEnabledBySettingAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); 1367 #endif 1361 1368 JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName); 1362 1369 bool setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue); … … 1463 1470 public: 1464 1471 using Base = JSC::JSNonFinalObject; 1465 static JSTestObjPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)1472 static JSTestObjPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 1466 1473 { 1467 1474 JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure); 1468 ptr->finishCreation(vm );1475 ptr->finishCreation(vm, *globalObject); 1469 1476 return ptr; 1470 1477 } … … 1482 1489 } 1483 1490 1484 void finishCreation(JSC::VM& );1491 void finishCreation(JSC::VM&, JSDOMGlobalObject&); 1485 1492 }; 1486 1493 … … 1618 1625 template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 1619 1626 { 1620 putDirect(vm, vm.propertyNames->prototype, JSTestObj::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);1627 putDirect(vm, vm.propertyNames->prototype, JSTestObj::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 1621 1628 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum); 1622 1629 putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum); … … 1680 1687 { 0, 0, NoIntrinsic, { 0, 0 } }, 1681 1688 #endif 1689 #if ENABLE(TEST_FEATURE) 1690 { "enabledBySettingAttribute", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjEnabledBySettingAttribute), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjEnabledBySettingAttribute) } }, 1691 #else 1692 { 0, 0, NoIntrinsic, { 0, 0 } }, 1693 #endif 1682 1694 { "typedArrayAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTypedArrayAttr) } }, 1683 1695 { "attributeWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithGetterException) } }, … … 1753 1765 #endif 1754 1766 { "worldSpecificMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionWorldSpecificMethod), (intptr_t) (1) } }, 1767 #if ENABLE(TEST_FEATURE) 1768 { "enabledBySettingOperation", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionEnabledBySettingOperation), (intptr_t) (1) } }, 1769 #else 1770 { 0, 0, NoIntrinsic, { 0, 0 } }, 1771 #endif 1755 1772 { "voidMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) } }, 1756 1773 { "voidMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) } }, … … 1929 1946 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) }; 1930 1947 1931 void JSTestObjPrototype::finishCreation(VM& vm )1948 void JSTestObjPrototype::finishCreation(VM& vm, JSDOMGlobalObject& globalObject) 1932 1949 { 1933 1950 Base::finishCreation(vm); … … 1950 1967 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); 1951 1968 JSObject::deleteProperty(this, globalObject()->globalExec(), propertyName); 1969 } 1970 #endif 1971 auto* context = globalObject.scriptExecutionContext(); 1972 ASSERT(!context || context->isDocument()); 1973 #if ENABLE(TEST_FEATURE) 1974 if (!context || !downcast<Document>(*context).settings().testSettingEnabled()) { 1975 Identifier propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("enabledBySettingOperation"), strlen("enabledBySettingOperation")); 1976 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); 1977 JSObject::deleteProperty(this, globalObject.globalExec(), propertyName); 1978 } 1979 #endif 1980 #if ENABLE(TEST_FEATURE) 1981 if (!context || !downcast<Document>(*context).settings().testSettingEnabled()) { 1982 Identifier propertyName = Identifier::fromString(&vm, reinterpret_cast<const LChar*>("enabledBySettingAttribute"), strlen("enabledBySettingAttribute")); 1983 VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable); 1984 JSObject::deleteProperty(this, globalObject.globalExec(), propertyName); 1952 1985 } 1953 1986 #endif … … 1976 2009 } 1977 2010 1978 JSObject* JSTestObj::createPrototype(VM& vm, JS GlobalObject*globalObject)1979 { 1980 return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));1981 } 1982 1983 JSObject* JSTestObj::prototype(VM& vm, JS GlobalObject*globalObject)2011 JSObject* JSTestObj::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 2012 { 2013 return JSTestObjPrototype::create(vm, &globalObject, JSTestObjPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 2014 } 2015 2016 JSObject* JSTestObj::prototype(VM& vm, JSDOMGlobalObject& globalObject) 1984 2017 { 1985 2018 return getDOMPrototype<JSTestObj>(vm, globalObject); … … 2839 2872 #endif 2840 2873 2874 #if ENABLE(TEST_FEATURE) 2875 static inline JSValue jsTestObjEnabledBySettingAttributeGetter(ExecState&, JSTestObj&, ThrowScope& throwScope); 2876 2877 EncodedJSValue jsTestObjEnabledBySettingAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName) 2878 { 2879 return BindingCaller<JSTestObj>::attribute<jsTestObjEnabledBySettingAttributeGetter>(state, thisValue, "enabledBySettingAttribute"); 2880 } 2881 2882 static inline JSValue jsTestObjEnabledBySettingAttributeGetter(ExecState& state, JSTestObj& thisObject, ThrowScope& throwScope) 2883 { 2884 UNUSED_PARAM(throwScope); 2885 UNUSED_PARAM(state); 2886 auto& impl = thisObject.wrapped(); 2887 JSValue result = toJS<IDLDOMString>(state, impl.enabledBySettingAttribute()); 2888 return result; 2889 } 2890 2891 #endif 2892 2841 2893 static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState&, JSTestObj&, ThrowScope& throwScope); 2842 2894 … … 4486 4538 RETURN_IF_EXCEPTION(throwScope, false); 4487 4539 impl.setEnabledAtRuntimeAttribute(WTFMove(nativeValue)); 4540 return true; 4541 } 4542 4543 #endif 4544 4545 #if ENABLE(TEST_FEATURE) 4546 static inline bool setJSTestObjEnabledBySettingAttributeFunction(ExecState&, JSTestObj&, JSValue, ThrowScope&); 4547 4548 bool setJSTestObjEnabledBySettingAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) 4549 { 4550 return BindingCaller<JSTestObj>::setAttribute<setJSTestObjEnabledBySettingAttributeFunction>(state, thisValue, encodedValue, "enabledBySettingAttribute"); 4551 } 4552 4553 static inline bool setJSTestObjEnabledBySettingAttributeFunction(ExecState& state, JSTestObj& thisObject, JSValue value, ThrowScope& throwScope) 4554 { 4555 UNUSED_PARAM(state); 4556 UNUSED_PARAM(throwScope); 4557 auto& impl = thisObject.wrapped(); 4558 auto nativeValue = convert<IDLDOMString>(state, value); 4559 RETURN_IF_EXCEPTION(throwScope, false); 4560 impl.setEnabledBySettingAttribute(WTFMove(nativeValue)); 4488 4561 return true; 4489 4562 } … … 5316 5389 return JSValue::encode(jsUndefined()); 5317 5390 } 5391 5392 #if ENABLE(TEST_FEATURE) 5393 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledBySettingOperationCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); 5394 5395 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEnabledBySettingOperation(ExecState* state) 5396 { 5397 return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionEnabledBySettingOperationCaller>(state, "enabledBySettingOperation"); 5398 } 5399 5400 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledBySettingOperationCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope) 5401 { 5402 UNUSED_PARAM(state); 5403 UNUSED_PARAM(throwScope); 5404 auto& impl = castedThis->wrapped(); 5405 if (UNLIKELY(state->argumentCount() < 1)) 5406 return throwVMError(state, throwScope, createNotEnoughArgumentsError(state)); 5407 auto testParam = convert<IDLDOMString>(*state, state->uncheckedArgument(0)); 5408 RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); 5409 impl.enabledBySettingOperation(WTFMove(testParam)); 5410 return JSValue::encode(jsUndefined()); 5411 } 5412 5413 #endif 5318 5414 5319 5415 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVoidMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r212344 r216198 38 38 } 39 39 40 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 41 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 42 42 static TestObj* toWrapped(JSC::VM&, JSC::JSValue); 43 43 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
r215477 r216198 46 46 public: 47 47 using Base = JSC::JSNonFinalObject; 48 static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)48 static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 49 49 { 50 50 JSTestOverloadedConstructorsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsPrototype>(vm.heap)) JSTestOverloadedConstructorsPrototype(vm, globalObject, structure); … … 175 175 template<> void JSTestOverloadedConstructorsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 176 176 { 177 putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);177 putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructors::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 178 178 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructors"))), ReadOnly | DontEnum); 179 179 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 211 211 } 212 212 213 JSObject* JSTestOverloadedConstructors::createPrototype(VM& vm, JS GlobalObject*globalObject)214 { 215 return JSTestOverloadedConstructorsPrototype::create(vm, globalObject, JSTestOverloadedConstructorsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));216 } 217 218 JSObject* JSTestOverloadedConstructors::prototype(VM& vm, JS GlobalObject*globalObject)213 JSObject* JSTestOverloadedConstructors::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 214 { 215 return JSTestOverloadedConstructorsPrototype::create(vm, &globalObject, JSTestOverloadedConstructorsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 216 } 217 218 JSObject* JSTestOverloadedConstructors::prototype(VM& vm, JSDOMGlobalObject& globalObject) 219 219 { 220 220 return getDOMPrototype<JSTestOverloadedConstructors>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestOverloadedConstructors* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp
r215477 r216198 46 46 public: 47 47 using Base = JSC::JSNonFinalObject; 48 static JSTestOverloadedConstructorsWithSequencePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)48 static JSTestOverloadedConstructorsWithSequencePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 49 49 { 50 50 JSTestOverloadedConstructorsWithSequencePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsWithSequencePrototype>(vm.heap)) JSTestOverloadedConstructorsWithSequencePrototype(vm, globalObject, structure); … … 126 126 template<> void JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 127 127 { 128 putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructorsWithSequence::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);128 putDirect(vm, vm.propertyNames->prototype, JSTestOverloadedConstructorsWithSequence::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 129 129 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructorsWithSequence"))), ReadOnly | DontEnum); 130 130 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 162 162 } 163 163 164 JSObject* JSTestOverloadedConstructorsWithSequence::createPrototype(VM& vm, JS GlobalObject*globalObject)165 { 166 return JSTestOverloadedConstructorsWithSequencePrototype::create(vm, globalObject, JSTestOverloadedConstructorsWithSequencePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));167 } 168 169 JSObject* JSTestOverloadedConstructorsWithSequence::prototype(VM& vm, JS GlobalObject*globalObject)164 JSObject* JSTestOverloadedConstructorsWithSequence::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 165 { 166 return JSTestOverloadedConstructorsWithSequencePrototype::create(vm, &globalObject, JSTestOverloadedConstructorsWithSequencePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 167 } 168 169 JSObject* JSTestOverloadedConstructorsWithSequence::prototype(VM& vm, JSDOMGlobalObject& globalObject) 170 170 { 171 171 return getDOMPrototype<JSTestOverloadedConstructorsWithSequence>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestOverloadedConstructorsWithSequence* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
r215477 r216198 49 49 public: 50 50 using Base = JSC::JSNonFinalObject; 51 static JSTestOverrideBuiltinsPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)51 static JSTestOverrideBuiltinsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 52 52 { 53 53 JSTestOverrideBuiltinsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverrideBuiltinsPrototype>(vm.heap)) JSTestOverrideBuiltinsPrototype(vm, globalObject, structure); … … 81 81 template<> void JSTestOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 82 82 { 83 putDirect(vm, vm.propertyNames->prototype, JSTestOverrideBuiltins::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);83 putDirect(vm, vm.propertyNames->prototype, JSTestOverrideBuiltins::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverrideBuiltins"))), ReadOnly | DontEnum); 85 85 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 118 118 } 119 119 120 JSObject* JSTestOverrideBuiltins::createPrototype(VM& vm, JS GlobalObject*globalObject)121 { 122 return JSTestOverrideBuiltinsPrototype::create(vm, globalObject, JSTestOverrideBuiltinsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));123 } 124 125 JSObject* JSTestOverrideBuiltins::prototype(VM& vm, JS GlobalObject*globalObject)120 JSObject* JSTestOverrideBuiltins::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 121 { 122 return JSTestOverrideBuiltinsPrototype::create(vm, &globalObject, JSTestOverrideBuiltinsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 123 } 124 125 JSObject* JSTestOverrideBuiltins::prototype(VM& vm, JSDOMGlobalObject& globalObject) 126 126 { 127 127 return getDOMPrototype<JSTestOverrideBuiltins>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestOverrideBuiltins* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp
r215477 r216198 61 61 public: 62 62 using Base = JSC::JSNonFinalObject; 63 static JSTestSerializationPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)63 static JSTestSerializationPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 64 64 { 65 65 JSTestSerializationPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializationPrototype>(vm.heap)) JSTestSerializationPrototype(vm, globalObject, structure); … … 93 93 template<> void JSTestSerializationConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 94 94 { 95 putDirect(vm, vm.propertyNames->prototype, JSTestSerialization::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);95 putDirect(vm, vm.propertyNames->prototype, JSTestSerialization::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 96 96 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerialization"))), ReadOnly | DontEnum); 97 97 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 136 136 } 137 137 138 JSObject* JSTestSerialization::createPrototype(VM& vm, JS GlobalObject*globalObject)139 { 140 return JSTestSerializationPrototype::create(vm, globalObject, JSTestSerializationPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));141 } 142 143 JSObject* JSTestSerialization::prototype(VM& vm, JS GlobalObject*globalObject)138 JSObject* JSTestSerialization::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 139 { 140 return JSTestSerializationPrototype::create(vm, &globalObject, JSTestSerializationPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 141 } 142 143 JSObject* JSTestSerialization::prototype(VM& vm, JSDOMGlobalObject& globalObject) 144 144 { 145 145 return getDOMPrototype<JSTestSerialization>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.h
r212344 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestSerialization* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp
r215477 r216198 49 49 public: 50 50 using Base = JSC::JSNonFinalObject; 51 static JSTestSerializationInheritPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)51 static JSTestSerializationInheritPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 52 52 { 53 53 JSTestSerializationInheritPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializationInheritPrototype>(vm.heap)) JSTestSerializationInheritPrototype(vm, globalObject, structure); … … 80 80 template<> void JSTestSerializationInheritConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 81 81 { 82 putDirect(vm, vm.propertyNames->prototype, JSTestSerializationInherit::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);82 putDirect(vm, vm.propertyNames->prototype, JSTestSerializationInherit::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 83 83 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationInherit"))), ReadOnly | DontEnum); 84 84 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 118 118 } 119 119 120 JSObject* JSTestSerializationInherit::createPrototype(VM& vm, JS GlobalObject*globalObject)121 { 122 return JSTestSerializationInheritPrototype::create(vm, globalObject, JSTestSerializationInheritPrototype::createStructure(vm,globalObject, JSTestSerialization::prototype(vm, globalObject)));123 } 124 125 JSObject* JSTestSerializationInherit::prototype(VM& vm, JS GlobalObject*globalObject)120 JSObject* JSTestSerializationInherit::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 121 { 122 return JSTestSerializationInheritPrototype::create(vm, &globalObject, JSTestSerializationInheritPrototype::createStructure(vm, &globalObject, JSTestSerialization::prototype(vm, globalObject))); 123 } 124 125 JSObject* JSTestSerializationInherit::prototype(VM& vm, JSDOMGlobalObject& globalObject) 126 126 { 127 127 return getDOMPrototype<JSTestSerializationInherit>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.h
r212344 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 42 42 DECLARE_INFO; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp
r215477 r216198 51 51 public: 52 52 using Base = JSC::JSNonFinalObject; 53 static JSTestSerializationInheritFinalPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)53 static JSTestSerializationInheritFinalPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 54 54 { 55 55 JSTestSerializationInheritFinalPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializationInheritFinalPrototype>(vm.heap)) JSTestSerializationInheritFinalPrototype(vm, globalObject, structure); … … 82 82 template<> void JSTestSerializationInheritFinalConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 83 83 { 84 putDirect(vm, vm.propertyNames->prototype, JSTestSerializationInheritFinal::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);84 putDirect(vm, vm.propertyNames->prototype, JSTestSerializationInheritFinal::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 85 85 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationInheritFinal"))), ReadOnly | DontEnum); 86 86 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 121 121 } 122 122 123 JSObject* JSTestSerializationInheritFinal::createPrototype(VM& vm, JS GlobalObject*globalObject)124 { 125 return JSTestSerializationInheritFinalPrototype::create(vm, globalObject, JSTestSerializationInheritFinalPrototype::createStructure(vm,globalObject, JSTestSerializationInherit::prototype(vm, globalObject)));126 } 127 128 JSObject* JSTestSerializationInheritFinal::prototype(VM& vm, JS GlobalObject*globalObject)123 JSObject* JSTestSerializationInheritFinal::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 124 { 125 return JSTestSerializationInheritFinalPrototype::create(vm, &globalObject, JSTestSerializationInheritFinalPrototype::createStructure(vm, &globalObject, JSTestSerializationInherit::prototype(vm, globalObject))); 126 } 127 128 JSObject* JSTestSerializationInheritFinal::prototype(VM& vm, JSDOMGlobalObject& globalObject) 129 129 { 130 130 return getDOMPrototype<JSTestSerializationInheritFinal>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.h
r212344 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 42 42 DECLARE_INFO; -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r211892 r216198 62 62 public: 63 63 using Base = JSC::JSNonFinalObject; 64 static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)64 static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 65 65 { 66 66 JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure); … … 94 94 template<> void JSTestSerializedScriptValueInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 95 95 { 96 putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);96 putDirect(vm, vm.propertyNames->prototype, JSTestSerializedScriptValueInterface::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 97 97 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializedScriptValueInterface"))), ReadOnly | DontEnum); 98 98 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum); … … 137 137 } 138 138 139 JSObject* JSTestSerializedScriptValueInterface::createPrototype(VM& vm, JS GlobalObject*globalObject)140 { 141 return JSTestSerializedScriptValueInterfacePrototype::create(vm, globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));142 } 143 144 JSObject* JSTestSerializedScriptValueInterface::prototype(VM& vm, JS GlobalObject*globalObject)139 JSObject* JSTestSerializedScriptValueInterface::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 140 { 141 return JSTestSerializedScriptValueInterfacePrototype::create(vm, &globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 142 } 143 144 JSObject* JSTestSerializedScriptValueInterface::prototype(VM& vm, JSDOMGlobalObject& globalObject) 145 145 { 146 146 return getDOMPrototype<JSTestSerializedScriptValueInterface>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
r211247 r216198 39 39 } 40 40 41 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);42 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);41 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 42 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 43 43 static TestSerializedScriptValueInterface* toWrapped(JSC::VM&, JSC::JSValue); 44 44 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
r215477 r216198 87 87 public: 88 88 using Base = JSC::JSNonFinalObject; 89 static JSTestTypedefsPrototype* create(JSC::VM& vm, JS C::JSGlobalObject* globalObject, JSC::Structure* structure)89 static JSTestTypedefsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) 90 90 { 91 91 JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure); … … 159 159 template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject) 160 160 { 161 putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, &globalObject), DontDelete | ReadOnly | DontEnum);161 putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, globalObject), DontDelete | ReadOnly | DontEnum); 162 162 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum); 163 163 putDirect(vm, vm.propertyNames->length, jsNumber(3), ReadOnly | DontEnum); … … 219 219 } 220 220 221 JSObject* JSTestTypedefs::createPrototype(VM& vm, JS GlobalObject*globalObject)222 { 223 return JSTestTypedefsPrototype::create(vm, globalObject, JSTestTypedefsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));224 } 225 226 JSObject* JSTestTypedefs::prototype(VM& vm, JS GlobalObject*globalObject)221 JSObject* JSTestTypedefs::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) 222 { 223 return JSTestTypedefsPrototype::create(vm, &globalObject, JSTestTypedefsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype())); 224 } 225 226 JSObject* JSTestTypedefs::prototype(VM& vm, JSDOMGlobalObject& globalObject) 227 227 { 228 228 return getDOMPrototype<JSTestTypedefs>(vm, globalObject); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
r211247 r216198 37 37 } 38 38 39 static JSC::JSObject* createPrototype(JSC::VM&, JS C::JSGlobalObject*);40 static JSC::JSObject* prototype(JSC::VM&, JS C::JSGlobalObject*);39 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); 40 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); 41 41 static TestTypedefs* toWrapped(JSC::VM&, JSC::JSValue); 42 42 static void destroy(JSC::JSCell*); -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r215904 r216198 113 113 114 114 [EnabledForWorld=someWorld] void worldSpecificMethod(long testParam); 115 116 // [EnabledBySetting] attributes and operations. 117 [Conditional=TEST_FEATURE, EnabledBySetting=TestSetting] attribute DOMString enabledBySettingAttribute; 118 [Conditional=TEST_FEATURE, EnabledBySetting=TestSetting] void enabledBySettingOperation(DOMString testParam); 115 119 116 120 // TypedArray attribute -
trunk/Source/WebCore/bridge/objc/objc_runtime.h
r198023 r216198 109 109 const String& propertyName() const { return m_item; } 110 110 111 static ObjectPrototype* createPrototype(VM&, JSGlobalObject *globalObject)111 static ObjectPrototype* createPrototype(VM&, JSGlobalObject& globalObject) 112 112 { 113 return globalObject ->objectPrototype();113 return globalObject.objectPrototype(); 114 114 } 115 115 -
trunk/Source/WebCore/bridge/runtime_array.h
r206065 r216198 69 69 DECLARE_INFO; 70 70 71 static ArrayPrototype* createPrototype(VM&, JSGlobalObject *globalObject)71 static ArrayPrototype* createPrototype(VM&, JSGlobalObject& globalObject) 72 72 { 73 return globalObject ->arrayPrototype();73 return globalObject.arrayPrototype(); 74 74 } 75 75 -
trunk/Source/WebCore/bridge/runtime_method.h
r201703 r216198 49 49 DECLARE_INFO; 50 50 51 static FunctionPrototype* createPrototype(VM&, JSGlobalObject *globalObject)51 static FunctionPrototype* createPrototype(VM&, JSGlobalObject& globalObject) 52 52 { 53 return globalObject ->functionPrototype();53 return globalObject.functionPrototype(); 54 54 } 55 55 -
trunk/Source/WebCore/bridge/runtime_object.h
r205198 r216198 64 64 DECLARE_INFO; 65 65 66 static ObjectPrototype* createPrototype(VM&, JSGlobalObject *globalObject)66 static ObjectPrototype* createPrototype(VM&, JSGlobalObject& globalObject) 67 67 { 68 return globalObject ->objectPrototype();68 return globalObject.objectPrototype(); 69 69 } 70 70 -
trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp
r208112 r216198 142 142 return value; 143 143 144 JSObject* prototype = JSCommandLineAPIHost::createPrototype(exec->vm(), globalObject);144 JSObject* prototype = JSCommandLineAPIHost::createPrototype(exec->vm(), *globalObject); 145 145 Structure* structure = JSCommandLineAPIHost::createStructure(exec->vm(), globalObject, prototype); 146 146 JSCommandLineAPIHost* commandLineAPIHost = JSCommandLineAPIHost::create(structure, globalObject, makeRef(*this));
Note: See TracChangeset
for help on using the changeset viewer.