Title: [276594] trunk/Source/WebCore
Revision
276594
Author
shvaikal...@gmail.com
Date
2021-04-26 09:30:00 -0700 (Mon, 26 Apr 2021)

Log Message

[WebIDL] Remove [CallNamedSetterOnlyForSupportedProperties] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=225049

Reviewed by Sam Weinig.

It was part of the old CSSStyleDeclaration named getter implementation,
which was removed in r275808.

No new tests, no behavior change.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateInvokeNamedPropertySetter):
(GeneratePut):
(GeneratePutByIndex):
(GenerateDefineOwnProperty):
* bindings/scripts/IDLAttributes.json:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (276593 => 276594)


--- trunk/Source/WebCore/ChangeLog	2021-04-26 16:14:23 UTC (rev 276593)
+++ trunk/Source/WebCore/ChangeLog	2021-04-26 16:30:00 UTC (rev 276594)
@@ -1,5 +1,24 @@
 2021-04-26  Alexey Shvayka  <shvaikal...@gmail.com>
 
+        [WebIDL] Remove [CallNamedSetterOnlyForSupportedProperties] extended attribute
+        https://bugs.webkit.org/show_bug.cgi?id=225049
+
+        Reviewed by Sam Weinig.
+
+        It was part of the old CSSStyleDeclaration named getter implementation,
+        which was removed in r275808.
+
+        No new tests, no behavior change.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateInvokeNamedPropertySetter):
+        (GeneratePut):
+        (GeneratePutByIndex):
+        (GenerateDefineOwnProperty):
+        * bindings/scripts/IDLAttributes.json:
+
+2021-04-26  Alexey Shvayka  <shvaikal...@gmail.com>
+
         [JSC] OrdinarySet should invoke custom [[Set]] methods
         https://bugs.webkit.org/show_bug.cgi?id=217916
 

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (276593 => 276594)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2021-04-26 16:14:23 UTC (rev 276593)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2021-04-26 16:30:00 UTC (rev 276594)
@@ -1154,17 +1154,9 @@
     push(@$outputArray, $indent . "auto nativeValue = ${nativeValue};\n");
     push(@$outputArray, $indent . "RETURN_IF_EXCEPTION(throwScope, true);\n");
 
-    push(@$outputArray, $indent . "bool isPropertySupported = true;\n") if $namedSetterOperation->extendedAttributes->{CallNamedSetterOnlyForSupportedProperties};
-
     my $namedSetterFunctionName = $namedSetterOperation->name || "setNamedItem";
     my $nativeValuePassExpression = PassArgumentExpression("nativeValue", $argument);
-
-    my @arguments = ();
-    push(@arguments, "propertyNameToString(propertyName)");
-    push(@arguments, $nativeValuePassExpression);
-    push(@arguments, "isPropertySupported") if $namedSetterOperation->extendedAttributes->{CallNamedSetterOnlyForSupportedProperties};
-
-    my $functionString = "thisObject->wrapped().${namedSetterFunctionName}(" . join(", ", @arguments) . ")";
+    my $functionString = "thisObject->wrapped().${namedSetterFunctionName}(propertyNameToString(propertyName), ${nativeValuePassExpression})";
     push(@$outputArray, $indent . "invokeFunctorPropagatingExceptionIfNecessary(*lexicalGlobalObject, throwScope, [&] { return ${functionString}; });\n");
 }
 
@@ -1222,10 +1214,6 @@
         }
 
         GenerateInvokeNamedPropertySetter($outputArray, $additionalIndent . "        ", $interface, $namedSetterOperation, "value");
-        if ($namedSetterOperation->extendedAttributes->{CallNamedSetterOnlyForSupportedProperties}) {
-            push(@$outputArray, $additionalIndent . "        if (!isPropertySupported)\n");
-            push(@$outputArray, $additionalIndent . "            RELEASE_AND_RETURN(throwScope, JSObject::put(thisObject, lexicalGlobalObject, propertyName, value, putPropertySlot));\n");
-        }
         push(@$outputArray, $additionalIndent . "        return true;\n");
 
         if (!$legacyOverrideBuiltins) {
@@ -1261,7 +1249,7 @@
     my $indexedSetterOperation = GetIndexedSetterOperation($interface);
     
     my $legacyOverrideBuiltins = $codeGenerator->InheritsExtendedAttribute($interface, "LegacyOverrideBuiltIns");
-    my $ellidesCallsToBase = ($namedSetterOperation && $legacyOverrideBuiltins) && !$interface->extendedAttributes->{Plugin} && !$namedSetterOperation->extendedAttributes->{CallNamedSetterOnlyForSupportedProperties};
+    my $ellidesCallsToBase = ($namedSetterOperation && $legacyOverrideBuiltins) && !$interface->extendedAttributes->{Plugin};
     
     push(@$outputArray, "bool ${className}::putByIndex(JSCell* cell, JSGlobalObject* lexicalGlobalObject, unsigned index, JSValue value, bool" . (!$ellidesCallsToBase ? " shouldThrow" : "") . ")\n");
     push(@$outputArray, "{\n");
@@ -1304,10 +1292,6 @@
         }
         
         GenerateInvokeNamedPropertySetter($outputArray, $additionalIndent . "    ", $interface, $namedSetterOperation, "value");
-        if ($namedSetterOperation->extendedAttributes->{CallNamedSetterOnlyForSupportedProperties}) {
-            push(@$outputArray, $additionalIndent . "    if (!isPropertySupported)\n");
-            push(@$outputArray, $additionalIndent . "        RELEASE_AND_RETURN(throwScope, JSObject::putByIndex(cell, lexicalGlobalObject, index, value, shouldThrow));\n");
-        }
         push(@$outputArray, $additionalIndent . "    return true;\n");
         
         if (!$legacyOverrideBuiltins) {
@@ -1457,10 +1441,6 @@
             
             # 2.2.2. Invoke the named property setter with P and Desc.[[Value]].
             GenerateInvokeNamedPropertySetter($outputArray, $additionalIndent . "        ", $interface, $namedSetterOperation, "propertyDescriptor.value()");
-            if ($namedSetterOperation->extendedAttributes->{CallNamedSetterOnlyForSupportedProperties}) {
-                push(@$outputArray, $additionalIndent . "    if (!isPropertySupported)\n");
-                push(@$outputArray, $additionalIndent . "        RELEASE_AND_RETURN(throwScope, JSObject::defineOwnProperty(object, lexicalGlobalObject, propertyName, propertyDescriptor, shouldThrow));\n");
-            }
             # 2.2.3. Return true.
             push(@$outputArray, $additionalIndent . "        return true;\n");
         }

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.json (276593 => 276594)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2021-04-26 16:14:23 UTC (rev 276593)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.json	2021-04-26 16:30:00 UTC (rev 276594)
@@ -48,9 +48,6 @@
         "CallbackThisObject": {
             "contextsAllowed": ["callback-function", "operation"]
         },
-        "CallNamedSetterOnlyForSupportedProperties": {
-            "contextsAllowed": ["operation"]
-        },
         "CallWith": {
             "contextsAllowed": ["attribute", "operation"],
             "values": ["Document", "ExecState", "ScriptExecutionContext", "GlobalObject", "ActiveWindow", "FirstWindow", "ResponsibleDocument", "World", "PropertyName"],
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to