Changeset 216198 in webkit


Ignore:
Timestamp:
May 4, 2017 11:39:03 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Make the [EnabledBySetting] extended attribute work for any attribute or operation on a prototype
https://bugs.webkit.org/show_bug.cgi?id=171588

Patch by Sam Weinig <sam@webkit.org> on 2017-05-04
Reviewed by Dean Jackson.

  • bindings/js/JSDOMIterator.h:

(WebCore::JSDOMIterator::createPrototype):

  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSDOMWrapperCache.h:

(WebCore::getDOMStructure):
(WebCore::getDOMPrototype):

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::initScript):
Update to account for createPrototype and prototype taking the global object by reference.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsSettingsCheckForPrototypeProperty):
Add predicate to determine if an interface has any settings enabled properties on the prototype,
needed to determine if we should pass the global object to finishCreation.

(GenerateHeader):
Update signature of both createPrototype and prototype to take JSDOMGlobalObject& rather than
a JSC::JSGlobalObject*, this allows us to pass the more specific type to the prototype constructor,
and access the ScriptExecutionContext for the Settings.

(GeneratePropertiesHashTable):
Update to return, via out parameter, arrays with the attributes and operations that specify EnabledBySetting. This
mimics the model used for RuntimeEnabledFeatures.

(GenerateImplementation):
In {Class}Prototype::finishCreation, add code to check settings to see if an attribute or operation should be enabled,
and if it shouldn't remove it from the object. This, again, is modeled on RuntimeEnabledFeatures.

(GeneratePrototypeDeclaration):
Update signatures to take JSDOMGlobalObject& and specialize finishCreation to take one if there are any properties
that require settings to enable.

(GenerateConstructorHelperMethods):
Update for new signature of prototype(...).

  • bindings/scripts/test/JS/JSInterfaceName.cpp:
  • bindings/scripts/test/JS/JSInterfaceName.h:
  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSMapLike.h:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.h:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.h:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.h:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.h:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.h:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.h:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestException.h:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
  • bindings/scripts/test/JS/JSTestGlobalObject.h:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
  • bindings/scripts/test/JS/JSTestIterable.cpp:
  • bindings/scripts/test/JS/JSTestIterable.h:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.h:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNode.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.h:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.h:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.h:

Update test results for new test values and changes in signatures to pass JSDOMGlobalObject.

  • bindings/scripts/test/TestObj.idl:

Add tests for [EnableBySetting] for attributes and operations.

  • bridge/objc/objc_runtime.h:
  • bridge/runtime_array.h:
  • bridge/runtime_method.h:
  • bridge/runtime_object.h:
  • inspector/CommandLineAPIHost.cpp:

Update createPrototype function to take the global object by reference.

Location:
trunk/Source/WebCore
Files:
73 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r216197 r216198  
     12017-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
    11172017-05-04  Eric Carlson  <eric.carlson@apple.com>
    2118
  • trunk/Source/WebCore/bindings/js/JSDOMIterator.h

    r211454 r216198  
    100100    }
    101101
    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()));
    105105    }
    106106
  • trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp

    r211247 r216198  
    8282   
    8383    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));
    8686
    87     Structure* structure = JSDOMWindow::createStructure(vm, 0, prototype.get());
     87    Structure* structure = JSDOMWindow::createStructure(vm, nullptr, prototype.get());
    8888    JSDOMWindow* jsDOMWindow = JSDOMWindow::create(vm, structure, *domWindow, this);
    8989    prototype->structure()->setGlobalObject(vm, jsDOMWindow);
    9090
    91     Structure* windowPropertiesStructure = JSDOMWindowProperties::createStructure(vm, jsDOMWindow, JSEventTarget::prototype(vm, jsDOMWindow));
     91    Structure* windowPropertiesStructure = JSDOMWindowProperties::createStructure(vm, jsDOMWindow, JSEventTarget::prototype(vm, *jsDOMWindow));
    9292    JSDOMWindowProperties* windowProperties = JSDOMWindowProperties::create(windowPropertiesStructure, *jsDOMWindow);
    9393
  • trunk/Source/WebCore/bindings/js/JSDOMWrapperCache.h

    r211403 r216198  
    8585    if (JSC::Structure* structure = getCachedDOMStructure(globalObject, WrapperClass::info()))
    8686        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());
    8888}
    8989
     
    9494}
    9595
    96 template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
    97 {
    98     return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, *JSC::jsCast<JSDOMGlobalObject*>(globalObject))->storedPrototype()));
     96template<typename WrapperClass> inline JSC::JSObject* getDOMPrototype(JSC::VM& vm, JSDOMGlobalObject& globalObject)
     97{
     98    return JSC::jsCast<JSC::JSObject*>(asObject(getDOMStructure<WrapperClass>(vm, globalObject)->storedPrototype()));
    9999}
    100100
  • trunk/Source/WebCore/bindings/js/WorkerScriptController.cpp

    r215353 r216198  
    8989        ASSERT(m_workerGlobalScopeWrapper->structure()->globalObject() == m_workerGlobalScopeWrapper);
    9090        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()));
    9292
    9393        proxy->setTarget(*m_vm, m_workerGlobalScopeWrapper.get());
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r215916 r216198  
    982982    return $interface->extendedAttributes->{EnabledAtRuntime}
    983983        || $interface->extendedAttributes->{EnabledForWorld};
     984}
     985
     986sub 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;
    9841002}
    9851003
     
    18041822    # Prototype
    18051823    unless (ShouldUseGlobalObjectPrototype($interface)) {
    1806         push(@headerContent, "    static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);\n");
    1807         push(@headerContent, "    static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);\n");
     1824        push(@headerContent, "    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);\n");
     1825        push(@headerContent, "    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);\n");
    18081826    }
    18091827
     
    22702288sub GeneratePropertiesHashTable
    22712289{
    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) = @_;
    22732291
    22742292    # FIXME: These should be functions on $interface.
     
    23312349        if (NeedsRuntimeCheck($attribute)) {
    23322350            push(@$runtimeEnabledAttributes, $attribute);
     2351        }
     2352
     2353        if ($attribute->extendedAttributes->{EnabledBySetting}) {
     2354            push(@$settingsEnabledAttributes, $attribute);
    23332355        }
    23342356    }
     
    23722394        if (NeedsRuntimeCheck($function)) {
    23732395            push(@$runtimeEnabledFunctions, $function);
     2396        }
     2397
     2398        if ($function->extendedAttributes->{EnabledBySetting}) {
     2399            push(@$settingsEnabledFunctions, $function);
    23742400        }
    23752401    }
     
    31903216    my @runtimeEnabledFunctions = ();
    31913217    my @runtimeEnabledAttributes = ();
     3218    my @settingsEnabledFunctions = ();
     3219    my @settingsEnabledAttributes = ();
    31923220
    31933221    # Generate hash table for properties on the instance.
     
    31953223        \@hashKeys, \@hashSpecials,
    31963224        \@hashValue1, \@hashValue2,
    3197         \%conditionals, \@runtimeEnabledFunctions, \@runtimeEnabledAttributes);
     3225        \%conditionals,
     3226        \@runtimeEnabledFunctions, \@runtimeEnabledAttributes,
     3227        \@settingsEnabledFunctions, \@settingsEnabledAttributes);
    31983228
    31993229    $object->GenerateHashTable($hashName, $numInstanceProperties,
     
    33133343    @runtimeEnabledFunctions = ();
    33143344    @runtimeEnabledAttributes = ();
     3345    @settingsEnabledFunctions = ();
     3346    @settingsEnabledAttributes = ();
    33153347
    33163348    # Generate hash table for properties on the prototype.
     
    33183350        \@hashKeys, \@hashSpecials,
    33193351        \@hashValue1, \@hashValue2,
    3320         \%conditionals, \@runtimeEnabledFunctions, \@runtimeEnabledAttributes);
     3352        \%conditionals,
     3353        \@runtimeEnabledFunctions, \@runtimeEnabledAttributes,
     3354        \@settingsEnabledFunctions, \@settingsEnabledAttributes);
     3355
    33213356    my $hashSize = $numPrototypeProperties;
    33223357
     
    33493384
    33503385    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        }
    33523393        push(@implContent, "{\n");
    33533394        push(@implContent, "    Base::finishCreation(vm);\n");
     
    33683409            push(@implContent, "    }\n");
    33693410            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            }
    33703435        }
    33713436
     
    35233588
    35243589    unless (ShouldUseGlobalObjectPrototype($interface)) {
    3525         push(@implContent, "JSObject* ${className}::createPrototype(VM& vm, JSGlobalObject* globalObject)\n");
     3590        push(@implContent, "JSObject* ${className}::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)\n");
    35263591        push(@implContent, "{\n");
    35273592        if ($interface->parentType) {
    35283593            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");
    35303595        } else {
    35313596            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");
    35333598        }
    35343599        push(@implContent, "}\n\n");
    35353600
    3536         push(@implContent, "JSObject* ${className}::prototype(VM& vm, JSGlobalObject* globalObject)\n");
     3601        push(@implContent, "JSObject* ${className}::prototype(VM& vm, JSDOMGlobalObject& globalObject)\n");
    35373602        push(@implContent, "{\n");
    35383603        push(@implContent, "    return getDOMPrototype<${className}>(vm, globalObject);\n");
     
    60036068    my $prototypeClassName = "${className}Prototype";
    60046069
     6070    my $needsGlobalObjectInFinishCreation = NeedsSettingsCheckForPrototypeProperty($interface);
     6071
    60056072    my %structureFlags = ();
    60066073    push(@$outputArray, "class ${prototypeClassName} : public JSC::JSNonFinalObject {\n");
     
    60086075    push(@$outputArray, "    using Base = JSC::JSNonFinalObject;\n");
    60096076
    6010     push(@$outputArray, "    static ${prototypeClassName}* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)\n");
     6077    push(@$outputArray, "    static ${prototypeClassName}* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)\n");
    60116078    push(@$outputArray, "    {\n");
    60126079    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
    60146087    push(@$outputArray, "        return ptr;\n");
    60156088    push(@$outputArray, "    }\n\n");
     
    60176090    push(@$outputArray, "    DECLARE_INFO;\n");
    60186091
    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");
    60246096
    60256097    push(@$outputArray, "\nprivate:\n");
     
    60346106        } else {
    60356107            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            }
    60376113        }
    60386114    }
     
    62346310        push(@$outputArray, "    UNUSED_PARAM(globalObject);\n");
    62356311    } 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");
    62376313    }
    62386314
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.cpp

    r211892 r216198  
    4242public:
    4343    using Base = JSC::JSNonFinalObject;
    44     static JSInterfaceNamePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     44    static JSInterfaceNamePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4545    {
    4646        JSInterfaceNamePrototype* ptr = new (NotNull, JSC::allocateCell<JSInterfaceNamePrototype>(vm.heap)) JSInterfaceNamePrototype(vm, globalObject, structure);
     
    7474template<> void JSInterfaceNameConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7575{
    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);
    7777    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("InterfaceName"))), ReadOnly | DontEnum);
    7878    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    110110}
    111111
    112 JSObject* JSInterfaceName::createPrototype(VM& vm, JSGlobalObject* globalObject)
    113 {
    114     return JSInterfaceNamePrototype::create(vm, globalObject, JSInterfaceNamePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    115 }
    116 
    117 JSObject* JSInterfaceName::prototype(VM& vm, JSGlobalObject* globalObject)
     112JSObject* JSInterfaceName::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     113{
     114    return JSInterfaceNamePrototype::create(vm, &globalObject, JSInterfaceNamePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     115}
     116
     117JSObject* JSInterfaceName::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    118118{
    119119    return getDOMPrototype<JSInterfaceName>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSInterfaceName.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static InterfaceName* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSMapLike.cpp

    r215477 r216198  
    5858public:
    5959    using Base = JSC::JSNonFinalObject;
    60     static JSMapLikePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     60    static JSMapLikePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    6161    {
    6262        JSMapLikePrototype* ptr = new (NotNull, JSC::allocateCell<JSMapLikePrototype>(vm.heap)) JSMapLikePrototype(vm, globalObject, structure);
     
    9090template<> void JSMapLikeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9191{
    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);
    9393    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("MapLike"))), ReadOnly | DontEnum);
    9494    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    138138}
    139139
    140 JSObject* JSMapLike::createPrototype(VM& vm, JSGlobalObject* globalObject)
    141 {
    142     return JSMapLikePrototype::create(vm, globalObject, JSMapLikePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    143 }
    144 
    145 JSObject* JSMapLike::prototype(VM& vm, JSGlobalObject* globalObject)
     140JSObject* JSMapLike::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     141{
     142    return JSMapLikePrototype::create(vm, &globalObject, JSMapLikePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     143}
     144
     145JSObject* JSMapLike::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    146146{
    147147    return getDOMPrototype<JSMapLike>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSMapLike.h

    r213108 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static MapLike* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.cpp

    r215477 r216198  
    5555public:
    5656    using Base = JSC::JSNonFinalObject;
    57     static JSReadOnlyMapLikePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     57    static JSReadOnlyMapLikePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5858    {
    5959        JSReadOnlyMapLikePrototype* ptr = new (NotNull, JSC::allocateCell<JSReadOnlyMapLikePrototype>(vm.heap)) JSReadOnlyMapLikePrototype(vm, globalObject, structure);
     
    8787template<> void JSReadOnlyMapLikeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8888{
    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);
    9090    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("ReadOnlyMapLike"))), ReadOnly | DontEnum);
    9191    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    132132}
    133133
    134 JSObject* JSReadOnlyMapLike::createPrototype(VM& vm, JSGlobalObject* globalObject)
    135 {
    136     return JSReadOnlyMapLikePrototype::create(vm, globalObject, JSReadOnlyMapLikePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    137 }
    138 
    139 JSObject* JSReadOnlyMapLike::prototype(VM& vm, JSGlobalObject* globalObject)
     134JSObject* JSReadOnlyMapLike::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     135{
     136    return JSReadOnlyMapLikePrototype::create(vm, &globalObject, JSReadOnlyMapLikePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     137}
     138
     139JSObject* JSReadOnlyMapLike::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    140140{
    141141    return getDOMPrototype<JSReadOnlyMapLike>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSReadOnlyMapLike.h

    r213108 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static ReadOnlyMapLike* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp

    r215477 r216198  
    5252public:
    5353    using Base = JSC::JSNonFinalObject;
    54     static JSTestActiveDOMObjectPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     54    static JSTestActiveDOMObjectPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5555    {
    5656        JSTestActiveDOMObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestActiveDOMObjectPrototype>(vm.heap)) JSTestActiveDOMObjectPrototype(vm, globalObject, structure);
     
    9898template<> void JSTestActiveDOMObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9999{
    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);
    101101    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestActiveDOMObject"))), ReadOnly | DontEnum);
    102102    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    136136}
    137137
    138 JSObject* JSTestActiveDOMObject::createPrototype(VM& vm, JSGlobalObject* globalObject)
    139 {
    140     return JSTestActiveDOMObjectPrototype::create(vm, globalObject, JSTestActiveDOMObjectPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    141 }
    142 
    143 JSObject* JSTestActiveDOMObject::prototype(VM& vm, JSGlobalObject* globalObject)
     138JSObject* JSTestActiveDOMObject::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     139{
     140    return JSTestActiveDOMObjectPrototype::create(vm, &globalObject, JSTestActiveDOMObjectPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     141}
     142
     143JSObject* JSTestActiveDOMObject::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    144144{
    145145    return getDOMPrototype<JSTestActiveDOMObject>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestActiveDOMObject* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.cpp

    r215477 r216198  
    5757public:
    5858    using Base = JSC::JSNonFinalObject;
    59     static JSTestCEReactionsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     59    static JSTestCEReactionsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    6060    {
    6161        JSTestCEReactionsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsPrototype>(vm.heap)) JSTestCEReactionsPrototype(vm, globalObject, structure);
     
    8989template<> void JSTestCEReactionsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9090{
    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);
    9292    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactions"))), ReadOnly | DontEnum);
    9393    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    129129}
    130130
    131 JSObject* JSTestCEReactions::createPrototype(VM& vm, JSGlobalObject* globalObject)
    132 {
    133     return JSTestCEReactionsPrototype::create(vm, globalObject, JSTestCEReactionsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    134 }
    135 
    136 JSObject* JSTestCEReactions::prototype(VM& vm, JSGlobalObject* globalObject)
     131JSObject* JSTestCEReactions::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     132{
     133    return JSTestCEReactionsPrototype::create(vm, &globalObject, JSTestCEReactionsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     134}
     135
     136JSObject* JSTestCEReactions::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    137137{
    138138    return getDOMPrototype<JSTestCEReactions>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactions.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestCEReactions* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp

    r215477 r216198  
    5151public:
    5252    using Base = JSC::JSNonFinalObject;
    53     static JSTestCEReactionsStringifierPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     53    static JSTestCEReactionsStringifierPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5454    {
    5555        JSTestCEReactionsStringifierPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCEReactionsStringifierPrototype>(vm.heap)) JSTestCEReactionsStringifierPrototype(vm, globalObject, structure);
     
    8383template<> void JSTestCEReactionsStringifierConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8484{
    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);
    8686    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCEReactionsStringifier"))), ReadOnly | DontEnum);
    8787    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    121121}
    122122
    123 JSObject* JSTestCEReactionsStringifier::createPrototype(VM& vm, JSGlobalObject* globalObject)
    124 {
    125     return JSTestCEReactionsStringifierPrototype::create(vm, globalObject, JSTestCEReactionsStringifierPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    126 }
    127 
    128 JSObject* JSTestCEReactionsStringifier::prototype(VM& vm, JSGlobalObject* globalObject)
     123JSObject* JSTestCEReactionsStringifier::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     124{
     125    return JSTestCEReactionsStringifierPrototype::create(vm, &globalObject, JSTestCEReactionsStringifierPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     126}
     127
     128JSObject* JSTestCEReactionsStringifier::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    129129{
    130130    return getDOMPrototype<JSTestCEReactionsStringifier>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestCEReactionsStringifier* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp

    r211892 r216198  
    4343public:
    4444    using Base = JSC::JSNonFinalObject;
    45     static JSTestClassWithJSBuiltinConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     45    static JSTestClassWithJSBuiltinConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4646    {
    4747        JSTestClassWithJSBuiltinConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestClassWithJSBuiltinConstructorPrototype>(vm.heap)) JSTestClassWithJSBuiltinConstructorPrototype(vm, globalObject, structure);
     
    7575template<> void JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7676{
    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);
    7878    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestClassWithJSBuiltinConstructor"))), ReadOnly | DontEnum);
    7979    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    116116}
    117117
    118 JSObject* JSTestClassWithJSBuiltinConstructor::createPrototype(VM& vm, JSGlobalObject* globalObject)
    119 {
    120     return JSTestClassWithJSBuiltinConstructorPrototype::create(vm, globalObject, JSTestClassWithJSBuiltinConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    121 }
    122 
    123 JSObject* JSTestClassWithJSBuiltinConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
     118JSObject* JSTestClassWithJSBuiltinConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     119{
     120    return JSTestClassWithJSBuiltinConstructorPrototype::create(vm, &globalObject, JSTestClassWithJSBuiltinConstructorPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     121}
     122
     123JSObject* JSTestClassWithJSBuiltinConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    124124{
    125125    return getDOMPrototype<JSTestClassWithJSBuiltinConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestClassWithJSBuiltinConstructor* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp

    r211403 r216198  
    4242public:
    4343    using Base = JSC::JSNonFinalObject;
    44     static JSTestCustomConstructorWithNoInterfaceObjectPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     44    static JSTestCustomConstructorWithNoInterfaceObjectPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4545    {
    4646        JSTestCustomConstructorWithNoInterfaceObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomConstructorWithNoInterfaceObjectPrototype>(vm.heap)) JSTestCustomConstructorWithNoInterfaceObjectPrototype(vm, globalObject, structure);
     
    8080template<> void JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8181{
    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);
    8383    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomConstructorWithNoInterfaceObject"))), ReadOnly | DontEnum);
    8484    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    116116}
    117117
    118 JSObject* JSTestCustomConstructorWithNoInterfaceObject::createPrototype(VM& vm, JSGlobalObject* globalObject)
    119 {
    120     return JSTestCustomConstructorWithNoInterfaceObjectPrototype::create(vm, globalObject, JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    121 }
    122 
    123 JSObject* JSTestCustomConstructorWithNoInterfaceObject::prototype(VM& vm, JSGlobalObject* globalObject)
     118JSObject* JSTestCustomConstructorWithNoInterfaceObject::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     119{
     120    return JSTestCustomConstructorWithNoInterfaceObjectPrototype::create(vm, &globalObject, JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     121}
     122
     123JSObject* JSTestCustomConstructorWithNoInterfaceObject::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    124124{
    125125    return getDOMPrototype<JSTestCustomConstructorWithNoInterfaceObject>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestCustomConstructorWithNoInterfaceObject* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp

    r215477 r216198  
    4848public:
    4949    using Base = JSC::JSNonFinalObject;
    50     static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     50    static JSTestCustomNamedGetterPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5151    {
    5252        JSTestCustomNamedGetterPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestCustomNamedGetterPrototype>(vm.heap)) JSTestCustomNamedGetterPrototype(vm, globalObject, structure);
     
    8080template<> void JSTestCustomNamedGetterConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8181{
    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);
    8383    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestCustomNamedGetter"))), ReadOnly | DontEnum);
    8484    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    117117}
    118118
    119 JSObject* JSTestCustomNamedGetter::createPrototype(VM& vm, JSGlobalObject* globalObject)
    120 {
    121     return JSTestCustomNamedGetterPrototype::create(vm, globalObject, JSTestCustomNamedGetterPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    122 }
    123 
    124 JSObject* JSTestCustomNamedGetter::prototype(VM& vm, JSGlobalObject* globalObject)
     119JSObject* JSTestCustomNamedGetter::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     120{
     121    return JSTestCustomNamedGetterPrototype::create(vm, &globalObject, JSTestCustomNamedGetterPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     122}
     123
     124JSObject* JSTestCustomNamedGetter::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    125125{
    126126    return getDOMPrototype<JSTestCustomNamedGetter>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestCustomNamedGetter* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp

    r215477 r216198  
    130130public:
    131131    using Base = JSC::JSNonFinalObject;
    132     static JSTestDOMJITPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     132    static JSTestDOMJITPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    133133    {
    134134        JSTestDOMJITPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestDOMJITPrototype>(vm.heap)) JSTestDOMJITPrototype(vm, globalObject, structure);
     
    161161template<> void JSTestDOMJITConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    162162{
    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);
    164164    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestDOMJIT"))), ReadOnly | DontEnum);
    165165    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    237237}
    238238
    239 JSObject* JSTestDOMJIT::createPrototype(VM& vm, JSGlobalObject* globalObject)
    240 {
    241     return JSTestDOMJITPrototype::create(vm, globalObject, JSTestDOMJITPrototype::createStructure(vm, globalObject, JSNode::prototype(vm, globalObject)));
    242 }
    243 
    244 JSObject* JSTestDOMJIT::prototype(VM& vm, JSGlobalObject* globalObject)
     239JSObject* JSTestDOMJIT::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     240{
     241    return JSTestDOMJITPrototype::create(vm, &globalObject, JSTestDOMJITPrototype::createStructure(vm, &globalObject, JSNode::prototype(vm, globalObject)));
     242}
     243
     244JSObject* JSTestDOMJIT::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    245245{
    246246    return getDOMPrototype<JSTestDOMJIT>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.h

    r208613 r216198  
    3838    }
    3939
    40     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    41     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     40    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     41    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4242
    4343    DECLARE_INFO;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r215477 r216198  
    9595public:
    9696    using Base = JSC::JSNonFinalObject;
    97     static JSTestEventConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     97    static JSTestEventConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    9898    {
    9999        JSTestEventConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorPrototype>(vm.heap)) JSTestEventConstructorPrototype(vm, globalObject, structure);
     
    143143template<> void JSTestEventConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    144144{
    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);
    146146    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventConstructor"))), ReadOnly | DontEnum);
    147147    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     
    186186}
    187187
    188 JSObject* JSTestEventConstructor::createPrototype(VM& vm, JSGlobalObject* globalObject)
    189 {
    190     return JSTestEventConstructorPrototype::create(vm, globalObject, JSTestEventConstructorPrototype::createStructure(vm, globalObject, JSEvent::prototype(vm, globalObject)));
    191 }
    192 
    193 JSObject* JSTestEventConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
     188JSObject* JSTestEventConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     189{
     190    return JSTestEventConstructorPrototype::create(vm, &globalObject, JSTestEventConstructorPrototype::createStructure(vm, &globalObject, JSEvent::prototype(vm, globalObject)));
     191}
     192
     193JSObject* JSTestEventConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    194194{
    195195    return getDOMPrototype<JSTestEventConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h

    r208613 r216198  
    3838    }
    3939
    40     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    41     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     40    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     41    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4242
    4343    DECLARE_INFO;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp

    r215477 r216198  
    4949public:
    5050    using Base = JSC::JSNonFinalObject;
    51     static JSTestEventTargetPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     51    static JSTestEventTargetPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5252    {
    5353        JSTestEventTargetPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventTargetPrototype>(vm.heap)) JSTestEventTargetPrototype(vm, globalObject, structure);
     
    8080template<> void JSTestEventTargetConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8181{
    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);
    8383    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestEventTarget"))), ReadOnly | DontEnum);
    8484    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    117117}
    118118
    119 JSObject* JSTestEventTarget::createPrototype(VM& vm, JSGlobalObject* globalObject)
    120 {
    121     return JSTestEventTargetPrototype::create(vm, globalObject, JSTestEventTargetPrototype::createStructure(vm, globalObject, JSEventTarget::prototype(vm, globalObject)));
    122 }
    123 
    124 JSObject* JSTestEventTarget::prototype(VM& vm, JSGlobalObject* globalObject)
     119JSObject* JSTestEventTarget::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     120{
     121    return JSTestEventTargetPrototype::create(vm, &globalObject, JSTestEventTargetPrototype::createStructure(vm, &globalObject, JSEventTarget::prototype(vm, globalObject)));
     122}
     123
     124JSObject* JSTestEventTarget::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    125125{
    126126    return getDOMPrototype<JSTestEventTarget>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h

    r211247 r216198  
    3838    }
    3939
    40     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    41     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     40    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     41    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4242    static TestEventTarget* toWrapped(JSC::VM&, JSC::JSValue);
    4343    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp

    r211892 r216198  
    4444public:
    4545    using Base = JSC::JSNonFinalObject;
    46     static JSTestExceptionPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     46    static JSTestExceptionPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4747    {
    4848        JSTestExceptionPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestExceptionPrototype>(vm.heap)) JSTestExceptionPrototype(vm, globalObject, structure);
     
    9090template<> void JSTestExceptionConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9191{
    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);
    9393    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestException"))), ReadOnly | DontEnum);
    9494    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    126126}
    127127
    128 JSObject* JSTestException::createPrototype(VM& vm, JSGlobalObject* globalObject)
    129 {
    130     return JSTestExceptionPrototype::create(vm, globalObject, JSTestExceptionPrototype::createStructure(vm, globalObject, globalObject->errorPrototype()));
    131 }
    132 
    133 JSObject* JSTestException::prototype(VM& vm, JSGlobalObject* globalObject)
     128JSObject* JSTestException::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     129{
     130    return JSTestExceptionPrototype::create(vm, &globalObject, JSTestExceptionPrototype::createStructure(vm, &globalObject, globalObject.errorPrototype()));
     131}
     132
     133JSObject* JSTestException::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    134134{
    135135    return getDOMPrototype<JSTestException>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestException.h

    r211247 r216198  
    3838    }
    3939
    40     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    41     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     40    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     41    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4242    static TestException* toWrapped(JSC::VM&, JSC::JSValue);
    4343    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp

    r211892 r216198  
    4242public:
    4343    using Base = JSC::JSNonFinalObject;
    44     static JSTestGenerateIsReachablePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     44    static JSTestGenerateIsReachablePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4545    {
    4646        JSTestGenerateIsReachablePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestGenerateIsReachablePrototype>(vm.heap)) JSTestGenerateIsReachablePrototype(vm, globalObject, structure);
     
    7474template<> void JSTestGenerateIsReachableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7575{
    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);
    7777    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestGenerateIsReachable"))), ReadOnly | DontEnum);
    7878    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    110110}
    111111
    112 JSObject* JSTestGenerateIsReachable::createPrototype(VM& vm, JSGlobalObject* globalObject)
    113 {
    114     return JSTestGenerateIsReachablePrototype::create(vm, globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    115 }
    116 
    117 JSObject* JSTestGenerateIsReachable::prototype(VM& vm, JSGlobalObject* globalObject)
     112JSObject* JSTestGenerateIsReachable::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     113{
     114    return JSTestGenerateIsReachablePrototype::create(vm, &globalObject, JSTestGenerateIsReachablePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     115}
     116
     117JSObject* JSTestGenerateIsReachable::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    118118{
    119119    return getDOMPrototype<JSTestGenerateIsReachable>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestGenerateIsReachable* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h

    r211247 r216198  
    8585public:
    8686    using Base = JSC::JSNonFinalObject;
    87     static JSTestGlobalObjectPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     87    static JSTestGlobalObjectPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    8888    {
    8989        JSTestGlobalObjectPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestGlobalObjectPrototype>(vm.heap)) JSTestGlobalObjectPrototype(vm, globalObject, structure);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r215477 r216198  
    128128public:
    129129    using Base = JSC::JSNonFinalObject;
    130     static JSTestInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     130    static JSTestInterfacePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    131131    {
    132132        JSTestInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfacePrototype>(vm.heap)) JSTestInterfacePrototype(vm, globalObject, structure);
     
    249249template<> void JSTestInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    250250{
    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);
    252252    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterface"))), ReadOnly | DontEnum);
    253253    putDirect(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     
    386386}
    387387
    388 JSObject* JSTestInterface::createPrototype(VM& vm, JSGlobalObject* globalObject)
    389 {
    390     return JSTestInterfacePrototype::create(vm, globalObject, JSTestInterfacePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    391 }
    392 
    393 JSObject* JSTestInterface::prototype(VM& vm, JSGlobalObject* globalObject)
     388JSObject* JSTestInterface::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     389{
     390    return JSTestInterfacePrototype::create(vm, &globalObject, JSTestInterfacePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     391}
     392
     393JSObject* JSTestInterface::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    394394{
    395395    return getDOMPrototype<JSTestInterface>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h

    r211247 r216198  
    3939    }
    4040
    41     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    42     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     41    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     42    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4343    static TestInterface* toWrapped(JSC::VM&, JSC::JSValue);
    4444    static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp

    r211892 r216198  
    4444public:
    4545    using Base = JSC::JSNonFinalObject;
    46     static JSTestInterfaceLeadingUnderscorePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     46    static JSTestInterfaceLeadingUnderscorePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4747    {
    4848        JSTestInterfaceLeadingUnderscorePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestInterfaceLeadingUnderscorePrototype>(vm.heap)) JSTestInterfaceLeadingUnderscorePrototype(vm, globalObject, structure);
     
    7676template<> void JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7777{
    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);
    7979    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestInterfaceLeadingUnderscore"))), ReadOnly | DontEnum);
    8080    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    113113}
    114114
    115 JSObject* JSTestInterfaceLeadingUnderscore::createPrototype(VM& vm, JSGlobalObject* globalObject)
    116 {
    117     return JSTestInterfaceLeadingUnderscorePrototype::create(vm, globalObject, JSTestInterfaceLeadingUnderscorePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    118 }
    119 
    120 JSObject* JSTestInterfaceLeadingUnderscore::prototype(VM& vm, JSGlobalObject* globalObject)
     115JSObject* JSTestInterfaceLeadingUnderscore::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     116{
     117    return JSTestInterfaceLeadingUnderscorePrototype::create(vm, &globalObject, JSTestInterfaceLeadingUnderscorePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     118}
     119
     120JSObject* JSTestInterfaceLeadingUnderscore::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    121121{
    122122    return getDOMPrototype<JSTestInterfaceLeadingUnderscore>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestInterfaceLeadingUnderscore* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.cpp

    r211892 r216198  
    5151public:
    5252    using Base = JSC::JSNonFinalObject;
    53     static JSTestIterablePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     53    static JSTestIterablePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5454    {
    5555        JSTestIterablePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestIterablePrototype>(vm.heap)) JSTestIterablePrototype(vm, globalObject, structure);
     
    8383template<> void JSTestIterableConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8484{
    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);
    8686    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestIterable"))), ReadOnly | DontEnum);
    8787    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    124124}
    125125
    126 JSObject* JSTestIterable::createPrototype(VM& vm, JSGlobalObject* globalObject)
    127 {
    128     return JSTestIterablePrototype::create(vm, globalObject, JSTestIterablePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    129 }
    130 
    131 JSObject* JSTestIterable::prototype(VM& vm, JSGlobalObject* globalObject)
     126JSObject* JSTestIterable::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     127{
     128    return JSTestIterablePrototype::create(vm, &globalObject, JSTestIterablePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     129}
     130
     131JSObject* JSTestIterable::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    132132{
    133133    return getDOMPrototype<JSTestIterable>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestIterable.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestIterable* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp

    r211892 r216198  
    5151public:
    5252    using Base = JSC::JSNonFinalObject;
    53     static JSTestJSBuiltinConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     53    static JSTestJSBuiltinConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5454    {
    5555        JSTestJSBuiltinConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestJSBuiltinConstructorPrototype>(vm.heap)) JSTestJSBuiltinConstructorPrototype(vm, globalObject, structure);
     
    8383template<> void JSTestJSBuiltinConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8484{
    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);
    8686    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestJSBuiltinConstructor"))), ReadOnly | DontEnum);
    8787    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    127127}
    128128
    129 JSObject* JSTestJSBuiltinConstructor::createPrototype(VM& vm, JSGlobalObject* globalObject)
    130 {
    131     return JSTestJSBuiltinConstructorPrototype::create(vm, globalObject, JSTestJSBuiltinConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    132 }
    133 
    134 JSObject* JSTestJSBuiltinConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
     129JSObject* JSTestJSBuiltinConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     130{
     131    return JSTestJSBuiltinConstructorPrototype::create(vm, &globalObject, JSTestJSBuiltinConstructorPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     132}
     133
     134JSObject* JSTestJSBuiltinConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    135135{
    136136    return getDOMPrototype<JSTestJSBuiltinConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h

    r208613 r216198  
    3535    }
    3636
    37     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    38     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     37    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     38    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    3939    static void destroy(JSC::JSCell*);
    4040
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp

    r211892 r216198  
    4949public:
    5050    using Base = JSC::JSNonFinalObject;
    51     static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     51    static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5252    {
    5353        JSTestMediaQueryListListenerPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerPrototype>(vm.heap)) JSTestMediaQueryListListenerPrototype(vm, globalObject, structure);
     
    8181template<> void JSTestMediaQueryListListenerConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8282{
    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);
    8484    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestMediaQueryListListener"))), ReadOnly | DontEnum);
    8585    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    118118}
    119119
    120 JSObject* JSTestMediaQueryListListener::createPrototype(VM& vm, JSGlobalObject* globalObject)
    121 {
    122     return JSTestMediaQueryListListenerPrototype::create(vm, globalObject, JSTestMediaQueryListListenerPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    123 }
    124 
    125 JSObject* JSTestMediaQueryListListener::prototype(VM& vm, JSGlobalObject* globalObject)
     120JSObject* JSTestMediaQueryListListener::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     121{
     122    return JSTestMediaQueryListListenerPrototype::create(vm, &globalObject, JSTestMediaQueryListListenerPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     123}
     124
     125JSObject* JSTestMediaQueryListListener::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    126126{
    127127    return getDOMPrototype<JSTestMediaQueryListListener>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestMediaQueryListListener* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp

    r215477 r216198  
    4545public:
    4646    using Base = JSC::JSNonFinalObject;
    47     static JSTestNamedConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     47    static JSTestNamedConstructorPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4848    {
    4949        JSTestNamedConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNamedConstructorPrototype>(vm.heap)) JSTestNamedConstructorPrototype(vm, globalObject, structure);
     
    7878template<> void JSTestNamedConstructorConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    7979{
    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);
    8181    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNamedConstructor"))), ReadOnly | DontEnum);
    8282    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    112112template<> void JSTestNamedConstructorNamedConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    113113{
    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);
    115115    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Audio"))), ReadOnly | DontEnum);
    116116    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    148148}
    149149
    150 JSObject* JSTestNamedConstructor::createPrototype(VM& vm, JSGlobalObject* globalObject)
    151 {
    152     return JSTestNamedConstructorPrototype::create(vm, globalObject, JSTestNamedConstructorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    153 }
    154 
    155 JSObject* JSTestNamedConstructor::prototype(VM& vm, JSGlobalObject* globalObject)
     150JSObject* JSTestNamedConstructor::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     151{
     152    return JSTestNamedConstructorPrototype::create(vm, &globalObject, JSTestNamedConstructorPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     153}
     154
     155JSObject* JSTestNamedConstructor::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    156156{
    157157    return getDOMPrototype<JSTestNamedConstructor>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestNamedConstructor* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp

    r215477 r216198  
    5959public:
    6060    using Base = JSC::JSNonFinalObject;
    61     static JSTestNodePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     61    static JSTestNodePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    6262    {
    6363        JSTestNodePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestNodePrototype>(vm.heap)) JSTestNodePrototype(vm, globalObject, structure);
     
    101101template<> void JSTestNodeConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    102102{
    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);
    104104    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestNode"))), ReadOnly | DontEnum);
    105105    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    165165}
    166166
    167 JSObject* JSTestNode::createPrototype(VM& vm, JSGlobalObject* globalObject)
    168 {
    169     return JSTestNodePrototype::create(vm, globalObject, JSTestNodePrototype::createStructure(vm, globalObject, JSNode::prototype(vm, globalObject)));
    170 }
    171 
    172 JSObject* JSTestNode::prototype(VM& vm, JSGlobalObject* globalObject)
     167JSObject* JSTestNode::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     168{
     169    return JSTestNodePrototype::create(vm, &globalObject, JSTestNodePrototype::createStructure(vm, &globalObject, JSNode::prototype(vm, globalObject)));
     170}
     171
     172JSObject* JSTestNode::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    173173{
    174174    return getDOMPrototype<JSTestNode>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.h

    r212344 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141
    4242    DECLARE_INFO;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r215904 r216198  
    11101110#endif
    11111111JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWorldSpecificMethod(JSC::ExecState*);
     1112#if ENABLE(TEST_FEATURE)
     1113JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEnabledBySettingOperation(JSC::ExecState*);
     1114#endif
    11121115JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(JSC::ExecState*);
    11131116JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(JSC::ExecState*);
     
    13591362bool setJSTestObjEnabledAtRuntimeAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
    13601363#endif
     1364#if ENABLE(TEST_FEATURE)
     1365JSC::EncodedJSValue jsTestObjEnabledBySettingAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
     1366bool setJSTestObjEnabledBySettingAttribute(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
     1367#endif
    13611368JSC::EncodedJSValue jsTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
    13621369bool setJSTestObjTypedArrayAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
     
    14631470public:
    14641471    using Base = JSC::JSNonFinalObject;
    1465     static JSTestObjPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     1472    static JSTestObjPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    14661473    {
    14671474        JSTestObjPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestObjPrototype>(vm.heap)) JSTestObjPrototype(vm, globalObject, structure);
    1468         ptr->finishCreation(vm);
     1475        ptr->finishCreation(vm, *globalObject);
    14691476        return ptr;
    14701477    }
     
    14821489    }
    14831490
    1484     void finishCreation(JSC::VM&);
     1491    void finishCreation(JSC::VM&, JSDOMGlobalObject&);
    14851492};
    14861493
     
    16181625template<> void JSTestObjConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    16191626{
    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);
    16211628    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestObject"))), ReadOnly | DontEnum);
    16221629    putDirect(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
     
    16801687    { 0, 0, NoIntrinsic, { 0, 0 } },
    16811688#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
    16821694    { "typedArrayAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTypedArrayAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjTypedArrayAttr) } },
    16831695    { "attributeWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithGetterException) } },
     
    17531765#endif
    17541766    { "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
    17551772    { "voidMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) } },
    17561773    { "voidMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) } },
     
    19291946const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
    19301947
    1931 void JSTestObjPrototype::finishCreation(VM& vm)
     1948void JSTestObjPrototype::finishCreation(VM& vm, JSDOMGlobalObject& globalObject)
    19321949{
    19331950    Base::finishCreation(vm);
     
    19501967        VM::DeletePropertyModeScope scope(vm, VM::DeletePropertyMode::IgnoreConfigurable);
    19511968        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);
    19521985    }
    19531986#endif
     
    19762009}
    19772010
    1978 JSObject* JSTestObj::createPrototype(VM& vm, JSGlobalObject* globalObject)
    1979 {
    1980     return JSTestObjPrototype::create(vm, globalObject, JSTestObjPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    1981 }
    1982 
    1983 JSObject* JSTestObj::prototype(VM& vm, JSGlobalObject* globalObject)
     2011JSObject* JSTestObj::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     2012{
     2013    return JSTestObjPrototype::create(vm, &globalObject, JSTestObjPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     2014}
     2015
     2016JSObject* JSTestObj::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    19842017{
    19852018    return getDOMPrototype<JSTestObj>(vm, globalObject);
     
    28392872#endif
    28402873
     2874#if ENABLE(TEST_FEATURE)
     2875static inline JSValue jsTestObjEnabledBySettingAttributeGetter(ExecState&, JSTestObj&, ThrowScope& throwScope);
     2876
     2877EncodedJSValue jsTestObjEnabledBySettingAttribute(ExecState* state, EncodedJSValue thisValue, PropertyName)
     2878{
     2879    return BindingCaller<JSTestObj>::attribute<jsTestObjEnabledBySettingAttributeGetter>(state, thisValue, "enabledBySettingAttribute");
     2880}
     2881
     2882static 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
    28412893static inline JSValue jsTestObjTypedArrayAttrGetter(ExecState&, JSTestObj&, ThrowScope& throwScope);
    28422894
     
    44864538    RETURN_IF_EXCEPTION(throwScope, false);
    44874539    impl.setEnabledAtRuntimeAttribute(WTFMove(nativeValue));
     4540    return true;
     4541}
     4542
     4543#endif
     4544
     4545#if ENABLE(TEST_FEATURE)
     4546static inline bool setJSTestObjEnabledBySettingAttributeFunction(ExecState&, JSTestObj&, JSValue, ThrowScope&);
     4547
     4548bool setJSTestObjEnabledBySettingAttribute(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
     4549{
     4550    return BindingCaller<JSTestObj>::setAttribute<setJSTestObjEnabledBySettingAttributeFunction>(state, thisValue, encodedValue, "enabledBySettingAttribute");
     4551}
     4552
     4553static 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));
    44884561    return true;
    44894562}
     
    53165389    return JSValue::encode(jsUndefined());
    53175390}
     5391
     5392#if ENABLE(TEST_FEATURE)
     5393static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionEnabledBySettingOperationCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
     5394
     5395EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionEnabledBySettingOperation(ExecState* state)
     5396{
     5397    return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionEnabledBySettingOperationCaller>(state, "enabledBySettingOperation");
     5398}
     5399
     5400static 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
    53185414
    53195415static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionVoidMethodCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r212344 r216198  
    3838    }
    3939
    40     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    41     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     40    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     41    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4242    static TestObj* toWrapped(JSC::VM&, JSC::JSValue);
    4343    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp

    r215477 r216198  
    4646public:
    4747    using Base = JSC::JSNonFinalObject;
    48     static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     48    static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4949    {
    5050        JSTestOverloadedConstructorsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsPrototype>(vm.heap)) JSTestOverloadedConstructorsPrototype(vm, globalObject, structure);
     
    175175template<> void JSTestOverloadedConstructorsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    176176{
    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);
    178178    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructors"))), ReadOnly | DontEnum);
    179179    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    211211}
    212212
    213 JSObject* JSTestOverloadedConstructors::createPrototype(VM& vm, JSGlobalObject* globalObject)
    214 {
    215     return JSTestOverloadedConstructorsPrototype::create(vm, globalObject, JSTestOverloadedConstructorsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    216 }
    217 
    218 JSObject* JSTestOverloadedConstructors::prototype(VM& vm, JSGlobalObject* globalObject)
     213JSObject* JSTestOverloadedConstructors::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     214{
     215    return JSTestOverloadedConstructorsPrototype::create(vm, &globalObject, JSTestOverloadedConstructorsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     216}
     217
     218JSObject* JSTestOverloadedConstructors::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    219219{
    220220    return getDOMPrototype<JSTestOverloadedConstructors>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestOverloadedConstructors* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp

    r215477 r216198  
    4646public:
    4747    using Base = JSC::JSNonFinalObject;
    48     static JSTestOverloadedConstructorsWithSequencePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     48    static JSTestOverloadedConstructorsWithSequencePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    4949    {
    5050        JSTestOverloadedConstructorsWithSequencePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsWithSequencePrototype>(vm.heap)) JSTestOverloadedConstructorsWithSequencePrototype(vm, globalObject, structure);
     
    126126template<> void JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    127127{
    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);
    129129    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverloadedConstructorsWithSequence"))), ReadOnly | DontEnum);
    130130    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    162162}
    163163
    164 JSObject* JSTestOverloadedConstructorsWithSequence::createPrototype(VM& vm, JSGlobalObject* globalObject)
    165 {
    166     return JSTestOverloadedConstructorsWithSequencePrototype::create(vm, globalObject, JSTestOverloadedConstructorsWithSequencePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    167 }
    168 
    169 JSObject* JSTestOverloadedConstructorsWithSequence::prototype(VM& vm, JSGlobalObject* globalObject)
     164JSObject* JSTestOverloadedConstructorsWithSequence::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     165{
     166    return JSTestOverloadedConstructorsWithSequencePrototype::create(vm, &globalObject, JSTestOverloadedConstructorsWithSequencePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     167}
     168
     169JSObject* JSTestOverloadedConstructorsWithSequence::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    170170{
    171171    return getDOMPrototype<JSTestOverloadedConstructorsWithSequence>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestOverloadedConstructorsWithSequence* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp

    r215477 r216198  
    4949public:
    5050    using Base = JSC::JSNonFinalObject;
    51     static JSTestOverrideBuiltinsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     51    static JSTestOverrideBuiltinsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5252    {
    5353        JSTestOverrideBuiltinsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverrideBuiltinsPrototype>(vm.heap)) JSTestOverrideBuiltinsPrototype(vm, globalObject, structure);
     
    8181template<> void JSTestOverrideBuiltinsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8282{
    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);
    8484    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestOverrideBuiltins"))), ReadOnly | DontEnum);
    8585    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    118118}
    119119
    120 JSObject* JSTestOverrideBuiltins::createPrototype(VM& vm, JSGlobalObject* globalObject)
    121 {
    122     return JSTestOverrideBuiltinsPrototype::create(vm, globalObject, JSTestOverrideBuiltinsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    123 }
    124 
    125 JSObject* JSTestOverrideBuiltins::prototype(VM& vm, JSGlobalObject* globalObject)
     120JSObject* JSTestOverrideBuiltins::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     121{
     122    return JSTestOverrideBuiltinsPrototype::create(vm, &globalObject, JSTestOverrideBuiltinsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     123}
     124
     125JSObject* JSTestOverrideBuiltins::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    126126{
    127127    return getDOMPrototype<JSTestOverrideBuiltins>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestOverrideBuiltins* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.cpp

    r215477 r216198  
    6161public:
    6262    using Base = JSC::JSNonFinalObject;
    63     static JSTestSerializationPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     63    static JSTestSerializationPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    6464    {
    6565        JSTestSerializationPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializationPrototype>(vm.heap)) JSTestSerializationPrototype(vm, globalObject, structure);
     
    9393template<> void JSTestSerializationConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9494{
    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);
    9696    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerialization"))), ReadOnly | DontEnum);
    9797    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    136136}
    137137
    138 JSObject* JSTestSerialization::createPrototype(VM& vm, JSGlobalObject* globalObject)
    139 {
    140     return JSTestSerializationPrototype::create(vm, globalObject, JSTestSerializationPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    141 }
    142 
    143 JSObject* JSTestSerialization::prototype(VM& vm, JSGlobalObject* globalObject)
     138JSObject* JSTestSerialization::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     139{
     140    return JSTestSerializationPrototype::create(vm, &globalObject, JSTestSerializationPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     141}
     142
     143JSObject* JSTestSerialization::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    144144{
    145145    return getDOMPrototype<JSTestSerialization>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerialization.h

    r212344 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestSerialization* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.cpp

    r215477 r216198  
    4949public:
    5050    using Base = JSC::JSNonFinalObject;
    51     static JSTestSerializationInheritPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     51    static JSTestSerializationInheritPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5252    {
    5353        JSTestSerializationInheritPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializationInheritPrototype>(vm.heap)) JSTestSerializationInheritPrototype(vm, globalObject, structure);
     
    8080template<> void JSTestSerializationInheritConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8181{
    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);
    8383    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationInherit"))), ReadOnly | DontEnum);
    8484    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    118118}
    119119
    120 JSObject* JSTestSerializationInherit::createPrototype(VM& vm, JSGlobalObject* globalObject)
    121 {
    122     return JSTestSerializationInheritPrototype::create(vm, globalObject, JSTestSerializationInheritPrototype::createStructure(vm, globalObject, JSTestSerialization::prototype(vm, globalObject)));
    123 }
    124 
    125 JSObject* JSTestSerializationInherit::prototype(VM& vm, JSGlobalObject* globalObject)
     120JSObject* JSTestSerializationInherit::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     121{
     122    return JSTestSerializationInheritPrototype::create(vm, &globalObject, JSTestSerializationInheritPrototype::createStructure(vm, &globalObject, JSTestSerialization::prototype(vm, globalObject)));
     123}
     124
     125JSObject* JSTestSerializationInherit::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    126126{
    127127    return getDOMPrototype<JSTestSerializationInherit>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInherit.h

    r212344 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141
    4242    DECLARE_INFO;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp

    r215477 r216198  
    5151public:
    5252    using Base = JSC::JSNonFinalObject;
    53     static JSTestSerializationInheritFinalPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     53    static JSTestSerializationInheritFinalPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    5454    {
    5555        JSTestSerializationInheritFinalPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializationInheritFinalPrototype>(vm.heap)) JSTestSerializationInheritFinalPrototype(vm, globalObject, structure);
     
    8282template<> void JSTestSerializationInheritFinalConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    8383{
    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);
    8585    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializationInheritFinal"))), ReadOnly | DontEnum);
    8686    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    121121}
    122122
    123 JSObject* JSTestSerializationInheritFinal::createPrototype(VM& vm, JSGlobalObject* globalObject)
    124 {
    125     return JSTestSerializationInheritFinalPrototype::create(vm, globalObject, JSTestSerializationInheritFinalPrototype::createStructure(vm, globalObject, JSTestSerializationInherit::prototype(vm, globalObject)));
    126 }
    127 
    128 JSObject* JSTestSerializationInheritFinal::prototype(VM& vm, JSGlobalObject* globalObject)
     123JSObject* JSTestSerializationInheritFinal::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     124{
     125    return JSTestSerializationInheritFinalPrototype::create(vm, &globalObject, JSTestSerializationInheritFinalPrototype::createStructure(vm, &globalObject, JSTestSerializationInherit::prototype(vm, globalObject)));
     126}
     127
     128JSObject* JSTestSerializationInheritFinal::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    129129{
    130130    return getDOMPrototype<JSTestSerializationInheritFinal>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializationInheritFinal.h

    r212344 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141
    4242    DECLARE_INFO;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp

    r211892 r216198  
    6262public:
    6363    using Base = JSC::JSNonFinalObject;
    64     static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     64    static JSTestSerializedScriptValueInterfacePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    6565    {
    6666        JSTestSerializedScriptValueInterfacePrototype* ptr = new (NotNull, JSC::allocateCell<JSTestSerializedScriptValueInterfacePrototype>(vm.heap)) JSTestSerializedScriptValueInterfacePrototype(vm, globalObject, structure);
     
    9494template<> void JSTestSerializedScriptValueInterfaceConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    9595{
    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);
    9797    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestSerializedScriptValueInterface"))), ReadOnly | DontEnum);
    9898    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     
    137137}
    138138
    139 JSObject* JSTestSerializedScriptValueInterface::createPrototype(VM& vm, JSGlobalObject* globalObject)
    140 {
    141     return JSTestSerializedScriptValueInterfacePrototype::create(vm, globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    142 }
    143 
    144 JSObject* JSTestSerializedScriptValueInterface::prototype(VM& vm, JSGlobalObject* globalObject)
     139JSObject* JSTestSerializedScriptValueInterface::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     140{
     141    return JSTestSerializedScriptValueInterfacePrototype::create(vm, &globalObject, JSTestSerializedScriptValueInterfacePrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     142}
     143
     144JSObject* JSTestSerializedScriptValueInterface::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    145145{
    146146    return getDOMPrototype<JSTestSerializedScriptValueInterface>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h

    r211247 r216198  
    3939    }
    4040
    41     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    42     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     41    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     42    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4343    static TestSerializedScriptValueInterface* toWrapped(JSC::VM&, JSC::JSValue);
    4444    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

    r215477 r216198  
    8787public:
    8888    using Base = JSC::JSNonFinalObject;
    89     static JSTestTypedefsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
     89    static JSTestTypedefsPrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
    9090    {
    9191        JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure);
     
    159159template<> void JSTestTypedefsConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
    160160{
    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);
    162162    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("TestTypedefs"))), ReadOnly | DontEnum);
    163163    putDirect(vm, vm.propertyNames->length, jsNumber(3), ReadOnly | DontEnum);
     
    219219}
    220220
    221 JSObject* JSTestTypedefs::createPrototype(VM& vm, JSGlobalObject* globalObject)
    222 {
    223     return JSTestTypedefsPrototype::create(vm, globalObject, JSTestTypedefsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
    224 }
    225 
    226 JSObject* JSTestTypedefs::prototype(VM& vm, JSGlobalObject* globalObject)
     221JSObject* JSTestTypedefs::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
     222{
     223    return JSTestTypedefsPrototype::create(vm, &globalObject, JSTestTypedefsPrototype::createStructure(vm, &globalObject, globalObject.objectPrototype()));
     224}
     225
     226JSObject* JSTestTypedefs::prototype(VM& vm, JSDOMGlobalObject& globalObject)
    227227{
    228228    return getDOMPrototype<JSTestTypedefs>(vm, globalObject);
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h

    r211247 r216198  
    3737    }
    3838
    39     static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
    40     static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
     39    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
     40    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    4141    static TestTypedefs* toWrapped(JSC::VM&, JSC::JSValue);
    4242    static void destroy(JSC::JSCell*);
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r215904 r216198  
    113113
    114114    [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);
    115119
    116120    // TypedArray attribute
  • trunk/Source/WebCore/bridge/objc/objc_runtime.h

    r198023 r216198  
    109109    const String& propertyName() const { return m_item; }
    110110
    111     static ObjectPrototype* createPrototype(VM&, JSGlobalObject* globalObject)
     111    static ObjectPrototype* createPrototype(VM&, JSGlobalObject& globalObject)
    112112    {
    113         return globalObject->objectPrototype();
     113        return globalObject.objectPrototype();
    114114    }
    115115
  • trunk/Source/WebCore/bridge/runtime_array.h

    r206065 r216198  
    6969    DECLARE_INFO;
    7070
    71     static ArrayPrototype* createPrototype(VM&, JSGlobalObject* globalObject)
     71    static ArrayPrototype* createPrototype(VM&, JSGlobalObject& globalObject)
    7272    {
    73         return globalObject->arrayPrototype();
     73        return globalObject.arrayPrototype();
    7474    }
    7575
  • trunk/Source/WebCore/bridge/runtime_method.h

    r201703 r216198  
    4949    DECLARE_INFO;
    5050
    51     static FunctionPrototype* createPrototype(VM&, JSGlobalObject* globalObject)
     51    static FunctionPrototype* createPrototype(VM&, JSGlobalObject& globalObject)
    5252    {
    53         return globalObject->functionPrototype();
     53        return globalObject.functionPrototype();
    5454    }
    5555
  • trunk/Source/WebCore/bridge/runtime_object.h

    r205198 r216198  
    6464    DECLARE_INFO;
    6565
    66     static ObjectPrototype* createPrototype(VM&, JSGlobalObject* globalObject)
     66    static ObjectPrototype* createPrototype(VM&, JSGlobalObject& globalObject)
    6767    {
    68         return globalObject->objectPrototype();
     68        return globalObject.objectPrototype();
    6969    }
    7070
  • trunk/Source/WebCore/inspector/CommandLineAPIHost.cpp

    r208112 r216198  
    142142        return value;
    143143
    144     JSObject* prototype = JSCommandLineAPIHost::createPrototype(exec->vm(), globalObject);
     144    JSObject* prototype = JSCommandLineAPIHost::createPrototype(exec->vm(), *globalObject);
    145145    Structure* structure = JSCommandLineAPIHost::createStructure(exec->vm(), globalObject, prototype);
    146146    JSCommandLineAPIHost* commandLineAPIHost = JSCommandLineAPIHost::create(structure, globalObject, makeRef(*this));
Note: See TracChangeset for help on using the changeset viewer.