Title: [279554] trunk/Source/WebCore
Revision
279554
Author
[email protected]
Date
2021-07-04 11:37:56 -0700 (Sun, 04 Jul 2021)

Log Message

[WebIDL] Generate constructor's hash table in GenerateConstructorHelperMethods
https://bugs.webkit.org/show_bug.cgi?id=227668

Reviewed by Sam Weinig.

This change moves generation of constructor's hash table to GenerateConstructorHelperMethods,
right before it is used to define the constructor's s_info, which is nicer than inferring
table's name and more precise than using ConstructorHasProperties.

Also, makes $generatingLegacyFactoryFunction bool-ish and removes unused $protoClassName parameter.

No new tests, no behavior change.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateCallbackImplementationContent):
(GenerateConstructorDefinitions):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
(ConstructorHasProperties): Deleted.
* bindings/scripts/test/JS/*: Updated.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (279553 => 279554)


--- trunk/Source/WebCore/ChangeLog	2021-07-04 18:34:19 UTC (rev 279553)
+++ trunk/Source/WebCore/ChangeLog	2021-07-04 18:37:56 UTC (rev 279554)
@@ -1,3 +1,27 @@
+2021-07-04  Alexey Shvayka  <[email protected]>
+
+        [WebIDL] Generate constructor's hash table in GenerateConstructorHelperMethods
+        https://bugs.webkit.org/show_bug.cgi?id=227668
+
+        Reviewed by Sam Weinig.
+
+        This change moves generation of constructor's hash table to GenerateConstructorHelperMethods,
+        right before it is used to define the constructor's s_info, which is nicer than inferring
+        table's name and more precise than using ConstructorHasProperties.
+
+        Also, makes $generatingLegacyFactoryFunction bool-ish and removes unused $protoClassName parameter.
+
+        No new tests, no behavior change.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        (GenerateCallbackImplementationContent):
+        (GenerateConstructorDefinitions):
+        (GenerateConstructorDefinition):
+        (GenerateConstructorHelperMethods):
+        (ConstructorHasProperties): Deleted.
+        * bindings/scripts/test/JS/*: Updated.
+
 2021-07-04  Eric Carlson  <[email protected]>
 
         WebAudio auto-play policy should come from top document

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (279553 => 279554)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2021-07-04 18:34:19 UTC (rev 279553)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2021-07-04 18:37:56 UTC (rev 279554)
@@ -3296,16 +3296,6 @@
     assert("Unsupported argument: " . ref($context));
 }
 
-sub ConstructorHasProperties
-{
-    my $interface = shift;
-    return 1 if @{$interface->constants};
-    foreach my $operationOrAttribute (@{$interface->operations}, @{$interface->attributes}) {
-        return 1 if $operationOrAttribute->isStatic;
-    }
-    return 0;
-}
-
 sub PrototypeHasProperties
 {
     my $interface = shift;
@@ -4433,20 +4423,13 @@
 
     GeneratePrototypeDeclaration(\@implContent, $className, $interface) if !HeaderNeedsPrototypeDeclaration($interface);
 
-    GenerateConstructorDeclaration(\@implContent, $className, $interface) if !$interface->extendedAttributes->{LegacyNoInterfaceObject};
-
     # - Add all interface object (aka constructor) properties (constants, static attributes, static operations).
     if (!$interface->extendedAttributes->{LegacyNoInterfaceObject}) {
-        # FIXME: Generate constructor's hash table in GenerateConstructorHelperMethods, removing ConstructorHasProperties and unused $protoClassName.
-        GenerateHashTable($interface, CONTEXT_NAME_CONSTRUCTOR);
+        GenerateConstructorDeclaration(\@implContent, $className, $interface);
 
-        push(@implContent, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($interface));
-
-        my $protoClassName = "${className}Prototype";
-        GenerateConstructorDefinitions(\@implContent, $className, $protoClassName, $visibleInterfaceName, $interface);
-
+        GenerateConstructorDefinitions(\@implContent, $className, $visibleInterfaceName, $interface);
         my $legacyFactoryFunction = $interface->extendedAttributes->{LegacyFactoryFunction};
-        GenerateConstructorDefinitions(\@implContent, $className, $protoClassName, $legacyFactoryFunction, $interface, "GeneratingLegacyFactoryFunction") if $legacyFactoryFunction;
+        GenerateConstructorDefinitions(\@implContent, $className, $legacyFactoryFunction, $interface, 1) if $legacyFactoryFunction;
     }
 
     if (!$interface->isNamespaceObject) {
@@ -6269,13 +6252,8 @@
     my $numConstants = @{$constants};
     if ($numConstants > 0) {
         GenerateConstructorDeclaration($contentRef, $className, $interfaceOrCallback, $name);
+        GenerateConstructorDefinitions($contentRef, $className, $visibleName, $interfaceOrCallback);
 
-        GenerateHashTable($interfaceOrCallback, CONTEXT_NAME_CONSTRUCTOR);
-
-        push(@$contentRef, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($interfaceOrCallback));
-
-        GenerateConstructorDefinitions($contentRef, $className, "", $visibleName, $interfaceOrCallback);
-
         AddToImplIncludes("JSDOMGlobalObjectInlines.h");
         push(@$contentRef, "JSValue ${className}::getConstructor(VM& vm, const JSGlobalObject* globalObject)\n");
         push(@$contentRef, "{\n");
@@ -7409,13 +7387,13 @@
 
 sub GenerateConstructorDefinitions
 {
-    my ($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction) = @_;
+    my ($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction) = @_;
 
     if (IsConstructable($interface)) {
         my @constructors = @{$interface->constructors};
         if (@constructors > 1) {
             foreach my $constructor (@constructors) {
-                GenerateConstructorDefinition($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction, $constructor);
+                GenerateConstructorDefinition($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction, $constructor);
             }
 
             my $overloadFunctionPrefix = "construct${className}";
@@ -7431,18 +7409,18 @@
             push(@implContent, "}\n");
             push(@implContent, "JSC_ANNOTATE_HOST_FUNCTION(${className}ConstructorConstruct, ${className}DOMConstructor::construct);\n\n");
         } elsif (@constructors == 1) {
-            GenerateConstructorDefinition($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction, $constructors[0]);
+            GenerateConstructorDefinition($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction, $constructors[0]);
         } else {
-            GenerateConstructorDefinition($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction);
+            GenerateConstructorDefinition($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction);
         }
     }
 
-    GenerateConstructorHelperMethods($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction);
+    GenerateConstructorHelperMethods($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction);
 }
 
 sub GenerateConstructorDefinition
 {
-    my ($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction, $operation) = @_;
+    my ($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction, $operation) = @_;
 
     return if HasJSBuiltinConstructor($interface);
 
@@ -7518,7 +7496,7 @@
 
 sub GenerateConstructorHelperMethods
 {
-    my ($outputArray, $className, $protoClassName, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction) = @_;
+    my ($outputArray, $className, $visibleInterfaceName, $interface, $generatingLegacyFactoryFunction) = @_;
 
     my $constructorClassName = $generatingLegacyFactoryFunction ? "${className}LegacyFactoryFunction" : "${className}DOMConstructor";
     my $leastConstructorLength = 0;
@@ -7534,9 +7512,11 @@
 
     my $constructorHashTable = "nullptr";
     unless ($generatingLegacyFactoryFunction) {
+        $constructorHashTable = GenerateHashTable($interface, CONTEXT_NAME_CONSTRUCTOR);
+        push(@$outputArray, $codeGenerator->GenerateCompileTimeCheckForEnumsIfNeeded($interface));
+
         my $structureFlags = "Base::StructureFlags";
-        if (ConstructorHasProperties($interface)) {
-            $constructorHashTable = "&${className}ConstructorTable";
+        if ($constructorHashTable ne "nullptr") {
             $structureFlags .= " | JSC::HasStaticPropertyTable";
         }
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (279553 => 279554)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp	2021-07-04 18:34:19 UTC (rev 279553)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp	2021-07-04 18:37:56 UTC (rev 279554)
@@ -241,8 +241,8 @@
 
 using JSTestGlobalObjectDOMConstructor = JSDOMConstructorNotConstructable<JSTestGlobalObject>;
 
-template<> const unsigned JSTestGlobalObjectDOMConstructor::StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable;
-template<> const ClassInfo JSTestGlobalObjectDOMConstructor::s_info = { "TestGlobalObject", &Base::s_info, &JSTestGlobalObjectConstructorTable, nullptr, CREATE_METHOD_TABLE(JSTestGlobalObjectDOMConstructor) };
+template<> const unsigned JSTestGlobalObjectDOMConstructor::StructureFlags = Base::StructureFlags;
+template<> const ClassInfo JSTestGlobalObjectDOMConstructor::s_info = { "TestGlobalObject", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestGlobalObjectDOMConstructor) };
 
 template<> JSValue JSTestGlobalObjectDOMConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
 {
@@ -255,7 +255,6 @@
     putDirect(vm, vm.propertyNames->prototype, globalObject.getPrototypeDirect(vm), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
     putDirect(vm, vm.propertyNames->name, jsNontrivialString(vm, "TestGlobalObject"_s), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
-    reifyStaticProperties(vm, nullptr, JSTestGlobalObjectConstructorTableValues, *this);
 }
 
 /* Hash table for Prototype */

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (279553 => 279554)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp	2021-07-04 18:34:19 UTC (rev 279553)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp	2021-07-04 18:37:56 UTC (rev 279554)
@@ -201,6 +201,34 @@
 
 using JSTestInterfaceDOMConstructor = JSDOMConstructor<JSTestInterface>;
 
+template<> EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSTestInterfaceDOMConstructor::construct(JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)
+{
+    VM& vm = lexicalGlobalObject->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    auto* castedThis = jsCast<JSTestInterfaceDOMConstructor*>(callFrame->jsCallee());
+    ASSERT(castedThis);
+    if (UNLIKELY(callFrame->argumentCount() < 1))
+        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
+    auto* context = castedThis->scriptExecutionContext();
+    if (UNLIKELY(!context))
+        return throwConstructorScriptExecutionContextUnavailableError(*lexicalGlobalObject, throwScope, "TestInterface");
+    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
+    auto str1 = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value());
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    EnsureStillAliveScope argument1 = callFrame->argument(1);
+    auto str2 = argument1.value().isUndefined() ? "defaultString"_s : convert<IDLDOMString>(*lexicalGlobalObject, argument1.value());
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    auto object = TestInterface::create(*context, WTFMove(str1), WTFMove(str2));
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestInterface>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
+    setSubclassStructureIfNeeded<TestInterface>(lexicalGlobalObject, callFrame, asObject(jsValue));
+    RETURN_IF_EXCEPTION(throwScope, { });
+    return JSValue::encode(jsValue);
+}
+JSC_ANNOTATE_HOST_FUNCTION(JSTestInterfaceDOMConstructorConstruct, JSTestInterfaceDOMConstructor::construct);
+
 /* Hash table for Constructor */
 
 static const struct CompactHashIndex JSTestInterfaceConstructorTableIndex[17] = {
@@ -285,34 +313,6 @@
 static_assert(TestSupplemental::CONST_IMPL == 2, "CONST_IMPL in TestSupplemental does not match value from IDL");
 #endif
 
-template<> EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSTestInterfaceDOMConstructor::construct(JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)
-{
-    VM& vm = lexicalGlobalObject->vm();
-    auto throwScope = DECLARE_THROW_SCOPE(vm);
-    auto* castedThis = jsCast<JSTestInterfaceDOMConstructor*>(callFrame->jsCallee());
-    ASSERT(castedThis);
-    if (UNLIKELY(callFrame->argumentCount() < 1))
-        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
-    auto* context = castedThis->scriptExecutionContext();
-    if (UNLIKELY(!context))
-        return throwConstructorScriptExecutionContextUnavailableError(*lexicalGlobalObject, throwScope, "TestInterface");
-    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
-    auto str1 = convert<IDLDOMString>(*lexicalGlobalObject, argument0.value());
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    EnsureStillAliveScope argument1 = callFrame->argument(1);
-    auto str2 = argument1.value().isUndefined() ? "defaultString"_s : convert<IDLDOMString>(*lexicalGlobalObject, argument1.value());
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    auto object = TestInterface::create(*context, WTFMove(str1), WTFMove(str2));
-    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestInterface>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
-    if constexpr (IsExceptionOr<decltype(object)>)
-        RETURN_IF_EXCEPTION(throwScope, { });
-    setSubclassStructureIfNeeded<TestInterface>(lexicalGlobalObject, callFrame, asObject(jsValue));
-    RETURN_IF_EXCEPTION(throwScope, { });
-    return JSValue::encode(jsValue);
-}
-JSC_ANNOTATE_HOST_FUNCTION(JSTestInterfaceDOMConstructorConstruct, JSTestInterfaceDOMConstructor::construct);
-
 template<> const unsigned JSTestInterfaceDOMConstructor::StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable;
 template<> const ClassInfo JSTestInterfaceDOMConstructor::s_info = { "TestInterface", &Base::s_info, &JSTestInterfaceConstructorTable, nullptr, CREATE_METHOD_TABLE(JSTestInterfaceDOMConstructor) };
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (279553 => 279554)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2021-07-04 18:34:19 UTC (rev 279553)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2021-07-04 18:37:56 UTC (rev 279554)
@@ -1896,6 +1896,36 @@
 
 using JSTestObjDOMConstructor = JSDOMConstructor<JSTestObj>;
 
+template<> EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSTestObjDOMConstructor::construct(JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)
+{
+    VM& vm = lexicalGlobalObject->vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    auto* castedThis = jsCast<JSTestObjDOMConstructor*>(callFrame->jsCallee());
+    ASSERT(castedThis);
+    if (UNLIKELY(callFrame->argumentCount() < 2))
+        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
+    auto* context = castedThis->scriptExecutionContext();
+    if (UNLIKELY(!context))
+        return throwConstructorScriptExecutionContextUnavailableError(*lexicalGlobalObject, throwScope, "TestObject");
+    ASSERT(context->isDocument());
+    auto& document = downcast<Document>(*context);
+    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
+    auto testCallback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "testCallback", "TestObject", nullptr); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    EnsureStillAliveScope argument1 = callFrame->uncheckedArgument(1);
+    auto testCallbackFunction = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 1, "testCallbackFunction", "TestObject", nullptr); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    auto object = TestObj::create(document, testCallback.releaseNonNull(), testCallbackFunction.releaseNonNull());
+    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
+    auto jsValue = toJSNewlyCreated<IDLInterface<TestObj>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
+    if constexpr (IsExceptionOr<decltype(object)>)
+        RETURN_IF_EXCEPTION(throwScope, { });
+    setSubclassStructureIfNeeded<TestObj>(lexicalGlobalObject, callFrame, asObject(jsValue));
+    RETURN_IF_EXCEPTION(throwScope, { });
+    return JSValue::encode(jsValue);
+}
+JSC_ANNOTATE_HOST_FUNCTION(JSTestObjDOMConstructorConstruct, JSTestObjDOMConstructor::construct);
+
 #if ENABLE(TEST_FEATURE)
 static JSValue createJSTestObjConstructor_enabledAtRuntimeAttributeStatic(VM& vm, JSObject*)
 {
@@ -2061,36 +2091,6 @@
 static_assert(TestObj::CONST_IMPL == 15, "CONST_IMPL in TestObj does not match value from IDL");
 static_assert(TestObj::readonly == 0, "readonly in TestObj does not match value from IDL");
 
-template<> EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSTestObjDOMConstructor::construct(JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame)
-{
-    VM& vm = lexicalGlobalObject->vm();
-    auto throwScope = DECLARE_THROW_SCOPE(vm);
-    auto* castedThis = jsCast<JSTestObjDOMConstructor*>(callFrame->jsCallee());
-    ASSERT(castedThis);
-    if (UNLIKELY(callFrame->argumentCount() < 2))
-        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
-    auto* context = castedThis->scriptExecutionContext();
-    if (UNLIKELY(!context))
-        return throwConstructorScriptExecutionContextUnavailableError(*lexicalGlobalObject, throwScope, "TestObject");
-    ASSERT(context->isDocument());
-    auto& document = downcast<Document>(*context);
-    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
-    auto testCallback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "testCallback", "TestObject", nullptr); });
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    EnsureStillAliveScope argument1 = callFrame->uncheckedArgument(1);
-    auto testCallbackFunction = convert<IDLCallbackFunction<JSTestCallbackFunction>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 1, "testCallbackFunction", "TestObject", nullptr); });
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    auto object = TestObj::create(document, testCallback.releaseNonNull(), testCallbackFunction.releaseNonNull());
-    static_assert(TypeOrExceptionOrUnderlyingType<decltype(object)>::isRef);
-    auto jsValue = toJSNewlyCreated<IDLInterface<TestObj>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, WTFMove(object));
-    if constexpr (IsExceptionOr<decltype(object)>)
-        RETURN_IF_EXCEPTION(throwScope, { });
-    setSubclassStructureIfNeeded<TestObj>(lexicalGlobalObject, callFrame, asObject(jsValue));
-    RETURN_IF_EXCEPTION(throwScope, { });
-    return JSValue::encode(jsValue);
-}
-JSC_ANNOTATE_HOST_FUNCTION(JSTestObjDOMConstructorConstruct, JSTestObjDOMConstructor::construct);
-
 template<> const unsigned JSTestObjDOMConstructor::StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable;
 template<> const ClassInfo JSTestObjDOMConstructor::s_info = { "TestObject", &Base::s_info, &JSTestObjConstructorTable, nullptr, CREATE_METHOD_TABLE(JSTestObjDOMConstructor) };
 

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (279553 => 279554)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp	2021-07-04 18:34:19 UTC (rev 279553)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp	2021-07-04 18:37:56 UTC (rev 279554)
@@ -165,8 +165,8 @@
 }
 JSC_ANNOTATE_HOST_FUNCTION(JSTestTypedefsDOMConstructorConstruct, JSTestTypedefsDOMConstructor::construct);
 
-template<> const unsigned JSTestTypedefsDOMConstructor::StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable;
-template<> const ClassInfo JSTestTypedefsDOMConstructor::s_info = { "TestTypedefs", &Base::s_info, &JSTestTypedefsConstructorTable, nullptr, CREATE_METHOD_TABLE(JSTestTypedefsDOMConstructor) };
+template<> const unsigned JSTestTypedefsDOMConstructor::StructureFlags = Base::StructureFlags;
+template<> const ClassInfo JSTestTypedefsDOMConstructor::s_info = { "TestTypedefs", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSTestTypedefsDOMConstructor) };
 
 template<> JSValue JSTestTypedefsDOMConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
 {
@@ -179,7 +179,6 @@
     putDirect(vm, vm.propertyNames->prototype, JSTestTypedefs::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
     putDirect(vm, vm.propertyNames->name, jsNontrivialString(vm, "TestTypedefs"_s), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
     putDirect(vm, vm.propertyNames->length, jsNumber(3), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
-    reifyStaticProperties(vm, nullptr, JSTestTypedefsConstructorTableValues, *this);
 }
 
 /* Hash table for Prototype */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to