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"],