Diff
Modified: trunk/Source/WebCore/ChangeLog (276948 => 276949)
--- trunk/Source/WebCore/ChangeLog 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/ChangeLog 2021-05-04 06:34:16 UTC (rev 276949)
@@ -1,3 +1,53 @@
+2021-05-03 Frédéric Wang <[email protected]>
+
+ ASSERTION FAILED: !m_needExceptionCheck while converting IDLSequence<T>
+ https://bugs.webkit.org/show_bug.cgi?id=223789
+
+ Reviewed by Mark Lam.
+
+ Add RETURN_IF_EXCEPTION after various toJS<T> calls since they can throw exception
+ for some types T.
+
+ * bindings/js/JSDOMConvertSequences.h:
+ (WebCore::JSConverter<IDLSequence<T>>::convert): Add RETURN_IF_EXCEPTION before appending
+ the result of toJS<T>.
+ (WebCore::JSConverter<IDLFrozenArray<T>>::convert): Ditto.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateDictionaryImplementationContent): Add a throw scope and add RETURN_IF_EXCEPTION
+ before setting a dictionary value. Change the potentially unused variable.
+ (GenerateDefaultToJSONOperationDefinition): Add a RETURN_IF_EXCEPTION before setting a
+ value of the JSON object.
+ (NativeToJSValueMayThrow): Add "IDLDictionaryMember" as a possible context for which
+ exception may be thrown.
+ * bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
+ (WebCore::convertDictionaryToJS): Update expectation.
+ * bindings/scripts/test/JS/JSTestDefaultToJSON.cpp:
+ (WebCore::jsTestDefaultToJSONPrototypeFunction_toJSONBody): Ditto.
+ * bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp:
+ (WebCore::jsTestDefaultToJSONFilteredByExposedPrototypeFunction_toJSONBody): Ditto.
+ * bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp:
+ (WebCore::jsTestDefaultToJSONInheritPrototypeFunction_toJSONBody): Ditto.
+ * bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp:
+ (WebCore::jsTestDefaultToJSONInheritFinalPrototypeFunction_toJSONBody): Ditto.
+ * bindings/scripts/test/JS/JSTestDerivedDictionary.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestEmptyDictionary.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestInheritedDictionary.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestNode.cpp:
+ (WebCore::jsTestNodePrototypeFunction_toJSONBody): Ditto.
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+ * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
+ (WebCore::convertDictionaryToJS): Ditto.
+
2021-05-03 Megan Gardner <[email protected]>
Allow AppHighlight visibility to be toggled
Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h (276948 => 276949)
--- trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertSequences.h 2021-05-04 06:34:16 UTC (rev 276949)
@@ -380,8 +380,11 @@
JSC::VM& vm = JSC::getVM(&lexicalGlobalObject);
auto scope = DECLARE_THROW_SCOPE(vm);
JSC::MarkedArgumentBuffer list;
- for (auto& element : vector)
- list.append(toJS<T>(lexicalGlobalObject, globalObject, element));
+ for (auto& element : vector) {
+ auto jsValue = toJS<T>(lexicalGlobalObject, globalObject, element);
+ RETURN_IF_EXCEPTION(scope, { });
+ list.append(jsValue);
+ }
if (UNLIKELY(list.hasOverflowed())) {
throwOutOfMemoryError(&lexicalGlobalObject, scope);
return { };
@@ -414,8 +417,11 @@
JSC::VM& vm = JSC::getVM(&lexicalGlobalObject);
auto scope = DECLARE_THROW_SCOPE(vm);
JSC::MarkedArgumentBuffer list;
- for (auto& element : vector)
- list.append(toJS<T>(lexicalGlobalObject, globalObject, element));
+ for (auto& element : vector) {
+ auto jsValue = toJS<T>(lexicalGlobalObject, globalObject, element);
+ RETURN_IF_EXCEPTION(scope, { });
+ list.append(jsValue);
+ }
if (UNLIKELY(list.hasOverflowed())) {
throwOutOfMemoryError(&lexicalGlobalObject, scope);
return { };
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2021-05-04 06:34:16 UTC (rev 276949)
@@ -2685,7 +2685,8 @@
$result .= "JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const ${className}& dictionary)\n";
$result .= "{\n";
- $result .= " auto& vm = JSC::getVM(&lexicalGlobalObject);\n\n";
+ $result .= " auto& vm = JSC::getVM(&lexicalGlobalObject);\n";
+ $result .= " auto throwScope = DECLARE_THROW_SCOPE(vm);\n\n";
# 1. Let O be ! ObjectCreate(%ObjectPrototype%).
$result .= " auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());\n\n";
@@ -2731,6 +2732,7 @@
$result .= "${indent} if (!${IDLType}::isNullValue(${valueExpression})) {\n";
$result .= "${indent} auto ${key}Value = ${conversionExpression};\n";
+ $result .= "${indent} RETURN_IF_EXCEPTION(throwScope, { });\n";
$result .= "${indent} result->putDirect(vm, JSC::Identifier::fromString(vm, \"${key}\"), ${key}Value);\n";
$result .= "${indent} }\n";
} else {
@@ -2737,6 +2739,7 @@
my $conversionExpression = NativeToJSValueUsingReferences($member, $typeScope, $valueExpression, "globalObject");
$result .= "${indent} auto ${key}Value = ${conversionExpression};\n";
+ $result .= "${indent} RETURN_IF_EXCEPTION(throwScope, { });\n";
$result .= "${indent} result->putDirect(vm, JSC::Identifier::fromString(vm, \"${key}\"), ${key}Value);\n";
}
if ($needsRuntimeCheck) {
@@ -2749,7 +2752,7 @@
if (!$hasUnconditionalMember) {
$result .= " UNUSED_PARAM(dictionary);\n";
- $result .= " UNUSED_PARAM(vm);\n\n";
+ $result .= " UNUSED_VARIABLE(throwScope);\n\n";
}
$result .= " return result;\n";
@@ -5838,6 +5841,7 @@
my $attributeName = $attribute->name;
my $toJSExpression = "";
+ my $mayThrowException = 0;
if (HasCustomGetter($attribute)) {
my $implGetterFunctionName = $codeGenerator->WK_lcfirst($attribute->extendedAttributes->{ImplementedAs} || $attributeName);
$toJSExpression = "castedThis->${implGetterFunctionName}(*lexicalGlobalObject)";
@@ -5844,6 +5848,7 @@
} else {
my ($baseFunctionName, @arguments) = $codeGenerator->GetterExpression(\%implIncludes, $currentInterface->type->name, $attribute);
my $functionName = GetFullyQualifiedImplementationCallName($currentInterface, $attribute, $baseFunctionName, "impl", $conditional);
+ $mayThrowException = NativeToJSValueMayThrow($attribute);
$toJSExpression = NativeToJSValue($attribute, $currentInterface, "${functionName}(" . join(", ", @arguments) . ")", "*lexicalGlobalObject", "*castedThis->globalObject()");
}
@@ -5851,10 +5856,14 @@
if ($needsRuntimeCheck) {
my $runtimeEnableConditionalString = GenerateRuntimeEnableConditionalString($currentInterface, $attribute, "castedThis->globalObject()");
push(@$outputArray, " if (${runtimeEnableConditionalString}) {\n");
- push(@$outputArray, " result->putDirect(vm, Identifier::fromString(vm, \"${attributeName}\"), ${toJSExpression});\n");
+ push(@$outputArray, " auto ${attributeName}Value = ${toJSExpression};\n");
+ push(@$outputArray, " RETURN_IF_EXCEPTION(throwScope, { });\n") if $mayThrowException;
+ push(@$outputArray, " result->putDirect(vm, Identifier::fromString(vm, \"${attributeName}\"), ${attributeName}Value);\n");
push(@$outputArray, " }\n");
} else {
- push(@$outputArray, " result->putDirect(vm, Identifier::fromString(vm, \"${attributeName}\"), ${toJSExpression});\n");
+ push(@$outputArray, " auto ${attributeName}Value = ${toJSExpression};\n");
+ push(@$outputArray, " RETURN_IF_EXCEPTION(throwScope, { });\n") if $mayThrowException;
+ push(@$outputArray, " result->putDirect(vm, Identifier::fromString(vm, \"${attributeName}\"), ${attributeName}Value);\n");
}
if ($conditional) {
@@ -7156,7 +7165,7 @@
sub NativeToJSValueMayThrow
{
my ($context) = @_;
- my $mayThrowException = ref($context) eq "IDLAttribute" || ref($context) eq "IDLOperation";
+ return ref($context) eq "IDLAttribute" || ref($context) eq "IDLOperation" || ref($context) eq "IDLDictionaryMember";
}
sub NativeToJSValue
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -76,11 +76,13 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const ExposedToWorkerAndWindow::Dict& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLInterface<TestObj>::isNullValue(dictionary.obj)) {
- auto objValue = toJS<IDLInterface<TestObj>>(lexicalGlobalObject, globalObject, IDLInterface<TestObj>::extractValueFromNullable(dictionary.obj));
+ auto objValue = toJS<IDLInterface<TestObj>>(lexicalGlobalObject, globalObject, throwScope, IDLInterface<TestObj>::extractValueFromNullable(dictionary.obj));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "obj"), objValue);
}
return result;
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSON.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -748,27 +748,57 @@
auto& impl = castedThis->wrapped();
auto* result = constructEmptyObject(lexicalGlobalObject, castedThis->globalObject()->objectPrototype());
if (RuntimeEnabledFeatures::sharedFeatures().testRuntimeEnabledEnabled()) {
- result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute()));
+ auto longAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), longAttributeValue);
}
if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->settingsValues().testSettingEnabled) {
- result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute()));
+ auto enabledBySettingsAttributeValue = toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), enabledBySettingsAttributeValue);
}
#if ENABLE(TEST_CONDITIONAL)
- result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute()));
+ auto enabledByConditionalAttributeValue = toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), enabledByConditionalAttributeValue);
#endif
- result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute()));
+ auto firstStringAttributeValue = toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), firstStringAttributeValue);
+ auto secondLongAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), secondLongAttributeValue);
+ auto fourthUnrestrictedDoubleAttributeValue = toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), fourthUnrestrictedDoubleAttributeValue);
+ auto fifthLongClampedAttributeValue = toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), fifthLongClampedAttributeValue);
+ auto sixthTypedefAttributeValue = toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), sixthTypedefAttributeValue);
+ auto seventhDirectlyToJSONableAttributeValue = toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), seventhDirectlyToJSONableAttributeValue);
+ auto eighthIndirectlyAttributeValue = toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), eighthIndirectlyAttributeValue);
+ auto ninthOptionalDirectlyToJSONableAttributeValue = toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), ninthOptionalDirectlyToJSONableAttributeValue);
+ auto tenthFrozenArrayAttributeValue = toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), tenthFrozenArrayAttributeValue);
+ auto eleventhSequenceAttributeValue = toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), eleventhSequenceAttributeValue);
+ auto twelfthInterfaceSequenceAttributeValue = toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), twelfthInterfaceSequenceAttributeValue);
+ auto thirteenthRecordAttributeValue = toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), thirteenthRecordAttributeValue);
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONFilteredByExposed.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -248,12 +248,18 @@
UNUSED_PARAM(throwScope);
auto& impl = castedThis->wrapped();
auto* result = constructEmptyObject(lexicalGlobalObject, castedThis->globalObject()->objectPrototype());
- result->putDirect(vm, Identifier::fromString(vm, "normalAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.normalAttribute()));
+ auto normalAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.normalAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "normalAttribute"), normalAttributeValue);
if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->isDocument()) {
- result->putDirect(vm, Identifier::fromString(vm, "filteredByExposedWindowAttribute"), toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.filteredByExposedWindowAttribute()));
+ auto filteredByExposedWindowAttributeValue = toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.filteredByExposedWindowAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "filteredByExposedWindowAttribute"), filteredByExposedWindowAttributeValue);
}
if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->isWorkerGlobalScope()) {
- result->putDirect(vm, Identifier::fromString(vm, "filteredByExposedWorkerAttribute"), toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.filteredByExposedWorkerAttribute()));
+ auto filteredByExposedWorkerAttributeValue = toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.filteredByExposedWorkerAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "filteredByExposedWorkerAttribute"), filteredByExposedWorkerAttributeValue);
}
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInherit.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -229,28 +229,60 @@
auto& impl = castedThis->wrapped();
auto* result = constructEmptyObject(lexicalGlobalObject, castedThis->globalObject()->objectPrototype());
if (RuntimeEnabledFeatures::sharedFeatures().testRuntimeEnabledEnabled()) {
- result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute()));
+ auto longAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), longAttributeValue);
}
if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->settingsValues().testSettingEnabled) {
- result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute()));
+ auto enabledBySettingsAttributeValue = toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), enabledBySettingsAttributeValue);
}
#if ENABLE(TEST_CONDITIONAL)
- result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute()));
+ auto enabledByConditionalAttributeValue = toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), enabledByConditionalAttributeValue);
#endif
- result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "inheritLongAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.inheritLongAttribute()));
+ auto firstStringAttributeValue = toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), firstStringAttributeValue);
+ auto secondLongAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), secondLongAttributeValue);
+ auto fourthUnrestrictedDoubleAttributeValue = toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), fourthUnrestrictedDoubleAttributeValue);
+ auto fifthLongClampedAttributeValue = toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), fifthLongClampedAttributeValue);
+ auto sixthTypedefAttributeValue = toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), sixthTypedefAttributeValue);
+ auto seventhDirectlyToJSONableAttributeValue = toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), seventhDirectlyToJSONableAttributeValue);
+ auto eighthIndirectlyAttributeValue = toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), eighthIndirectlyAttributeValue);
+ auto ninthOptionalDirectlyToJSONableAttributeValue = toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), ninthOptionalDirectlyToJSONableAttributeValue);
+ auto tenthFrozenArrayAttributeValue = toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), tenthFrozenArrayAttributeValue);
+ auto eleventhSequenceAttributeValue = toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), eleventhSequenceAttributeValue);
+ auto twelfthInterfaceSequenceAttributeValue = toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), twelfthInterfaceSequenceAttributeValue);
+ auto thirteenthRecordAttributeValue = toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), thirteenthRecordAttributeValue);
+ auto inheritLongAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.inheritLongAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "inheritLongAttribute"), inheritLongAttributeValue);
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDefaultToJSONInheritFinal.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -263,30 +263,66 @@
auto& impl = castedThis->wrapped();
auto* result = constructEmptyObject(lexicalGlobalObject, castedThis->globalObject()->objectPrototype());
if (RuntimeEnabledFeatures::sharedFeatures().testRuntimeEnabledEnabled()) {
- result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute()));
+ auto longAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.longAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "longAttribute"), longAttributeValue);
}
if (jsCast<JSDOMGlobalObject*>(castedThis->globalObject())->scriptExecutionContext()->settingsValues().testSettingEnabled) {
- result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute()));
+ auto enabledBySettingsAttributeValue = toJS<IDLUnsignedShort>(*lexicalGlobalObject, throwScope, impl.enabledBySettingsAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "enabledBySettingsAttribute"), enabledBySettingsAttributeValue);
}
#if ENABLE(TEST_CONDITIONAL)
- result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute()));
+ auto enabledByConditionalAttributeValue = toJS<IDLEnumeration<TestDefaultToJSONEnum>>(*lexicalGlobalObject, throwScope, impl.enabledByConditionalAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "enabledByConditionalAttribute"), enabledByConditionalAttributeValue);
#endif
- result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "inheritLongAttribute"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.inheritLongAttribute()));
- result->putDirect(vm, Identifier::fromString(vm, "finalLongAttributeFoo"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.finalLongAttributeFoo()));
- result->putDirect(vm, Identifier::fromString(vm, "finalLongAttributeBar"), toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.finalLongAttributeBar()));
+ auto firstStringAttributeValue = toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.firstStringAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "firstStringAttribute"), firstStringAttributeValue);
+ auto secondLongAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.secondLongAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "secondLongAttribute"), secondLongAttributeValue);
+ auto fourthUnrestrictedDoubleAttributeValue = toJS<IDLUnrestrictedDouble>(*lexicalGlobalObject, throwScope, impl.fourthUnrestrictedDoubleAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "fourthUnrestrictedDoubleAttribute"), fourthUnrestrictedDoubleAttributeValue);
+ auto fifthLongClampedAttributeValue = toJS<IDLClampAdaptor<IDLLong>>(*lexicalGlobalObject, throwScope, impl.fifthLongClampedAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "fifthLongClampedAttribute"), fifthLongClampedAttributeValue);
+ auto sixthTypedefAttributeValue = toJS<IDLDouble>(*lexicalGlobalObject, throwScope, impl.sixthTypedefAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "sixthTypedefAttribute"), sixthTypedefAttributeValue);
+ auto seventhDirectlyToJSONableAttributeValue = toJS<IDLInterface<TestDefaultToJSONInheritFinal>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.seventhDirectlyToJSONableAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "seventhDirectlyToJSONableAttribute"), seventhDirectlyToJSONableAttributeValue);
+ auto eighthIndirectlyAttributeValue = toJS<IDLInterface<TestDefaultToJSONIndirectInheritance>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eighthIndirectlyAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "eighthIndirectlyAttribute"), eighthIndirectlyAttributeValue);
+ auto ninthOptionalDirectlyToJSONableAttributeValue = toJS<IDLNullable<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.ninthOptionalDirectlyToJSONableAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "ninthOptionalDirectlyToJSONableAttribute"), ninthOptionalDirectlyToJSONableAttributeValue);
+ auto tenthFrozenArrayAttributeValue = toJS<IDLFrozenArray<IDLBoolean>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.tenthFrozenArrayAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "tenthFrozenArrayAttribute"), tenthFrozenArrayAttributeValue);
+ auto eleventhSequenceAttributeValue = toJS<IDLSequence<IDLDOMString>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.eleventhSequenceAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "eleventhSequenceAttribute"), eleventhSequenceAttributeValue);
+ auto twelfthInterfaceSequenceAttributeValue = toJS<IDLSequence<IDLInterface<TestDefaultToJSONInheritFinal>>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.twelfthInterfaceSequenceAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "twelfthInterfaceSequenceAttribute"), twelfthInterfaceSequenceAttributeValue);
+ auto thirteenthRecordAttributeValue = toJS<IDLRecord<IDLDOMString, IDLUnsignedShort>>(*lexicalGlobalObject, *castedThis->globalObject(), throwScope, impl.thirteenthRecordAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "thirteenthRecordAttribute"), thirteenthRecordAttributeValue);
+ auto inheritLongAttributeValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.inheritLongAttribute());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "inheritLongAttribute"), inheritLongAttributeValue);
+ auto finalLongAttributeFooValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.finalLongAttributeFoo());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "finalLongAttributeFoo"), finalLongAttributeFooValue);
+ auto finalLongAttributeBarValue = toJS<IDLLong>(*lexicalGlobalObject, throwScope, impl.finalLongAttributeBar());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "finalLongAttributeBar"), finalLongAttributeBarValue);
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -180,53 +180,65 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestDerivedDictionary& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLBoolean::isNullValue(dictionary.boolMember)) {
- auto boolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ auto boolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "boolMember"), boolMemberValue);
}
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.callbackMember)) {
- auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "callbackMember"), callbackMemberValue);
}
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMember)) {
- auto partialBooleanMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ auto partialBooleanMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMember"), partialBooleanMemberValue);
}
#if ENABLE(Conditional15)
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMemberWithConditional)) {
- auto partialBooleanMemberWithConditionalValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithConditional));
+ auto partialBooleanMemberWithConditionalValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithConditional));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMemberWithConditional"), partialBooleanMemberWithConditionalValue);
}
#endif
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.partialCallbackMember)) {
- auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialCallbackMember"), partialCallbackMemberValue);
}
- auto partialRequiredLongMemberValue = toJS<IDLLong>(dictionary.partialRequiredLongMember);
+ auto partialRequiredLongMemberValue = toJS<IDLLong>(lexicalGlobalObject, throwScope, dictionary.partialRequiredLongMember);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialRequiredLongMember"), partialRequiredLongMemberValue);
if (!IDLDOMString::isNullValue(dictionary.partialStringMember)) {
- auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMember"), partialStringMemberValue);
}
if (jsCast<JSDOMGlobalObject*>(&globalObject)->scriptExecutionContext()->settingsValues().testSettingEnabled) {
if (!IDLDOMString::isNullValue(dictionary.partialStringMemberWithEnabledBySetting)) {
- auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMemberWithEnabledBySetting"), partialStringMemberWithEnabledBySettingValue);
}
}
if (!IDLUnsignedLong::isNullValue(dictionary.partialUnsignedLongMember)) {
- auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialUnsignedLongMemberWithImplementedAs"), partialUnsignedLongMemberWithImplementedAsValue);
}
if (!IDLDOMString::isNullValue(dictionary.stringMember)) {
- auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringMember"), stringMemberValue);
}
if (!IDLBoolean::isNullValue(dictionary.derivedBoolMember)) {
- auto derivedBoolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.derivedBoolMember));
+ auto derivedBoolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.derivedBoolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "derivedBoolMember"), derivedBoolMemberValue);
}
return result;
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDerivedDictionary2.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -96,23 +96,28 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestDerivedDictionary2& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLBoolean::isNullValue(dictionary.boolMember)) {
- auto boolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ auto boolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "boolMember"), boolMemberValue);
}
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.callbackMember)) {
- auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "callbackMember"), callbackMemberValue);
}
if (!IDLDOMString::isNullValue(dictionary.stringMember)) {
- auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringMember"), stringMemberValue);
}
if (!IDLBoolean::isNullValue(dictionary.derivedBoolMember2)) {
- auto derivedBoolMember2Value = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.derivedBoolMember2));
+ auto derivedBoolMember2Value = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.derivedBoolMember2));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "derivedBoolMember2"), derivedBoolMember2Value);
}
return result;
@@ -263,53 +268,65 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestDerivedDictionary2::Dictionary& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLBoolean::isNullValue(dictionary.boolMember)) {
- auto boolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ auto boolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "boolMember"), boolMemberValue);
}
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.callbackMember)) {
- auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "callbackMember"), callbackMemberValue);
}
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMember)) {
- auto partialBooleanMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ auto partialBooleanMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMember"), partialBooleanMemberValue);
}
#if ENABLE(Conditional15)
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMemberWithConditional)) {
- auto partialBooleanMemberWithConditionalValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithConditional));
+ auto partialBooleanMemberWithConditionalValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithConditional));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMemberWithConditional"), partialBooleanMemberWithConditionalValue);
}
#endif
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.partialCallbackMember)) {
- auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialCallbackMember"), partialCallbackMemberValue);
}
- auto partialRequiredLongMemberValue = toJS<IDLLong>(dictionary.partialRequiredLongMember);
+ auto partialRequiredLongMemberValue = toJS<IDLLong>(lexicalGlobalObject, throwScope, dictionary.partialRequiredLongMember);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialRequiredLongMember"), partialRequiredLongMemberValue);
if (!IDLDOMString::isNullValue(dictionary.partialStringMember)) {
- auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMember"), partialStringMemberValue);
}
if (jsCast<JSDOMGlobalObject*>(&globalObject)->scriptExecutionContext()->settingsValues().testSettingEnabled) {
if (!IDLDOMString::isNullValue(dictionary.partialStringMemberWithEnabledBySetting)) {
- auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMemberWithEnabledBySetting"), partialStringMemberWithEnabledBySettingValue);
}
}
if (!IDLUnsignedLong::isNullValue(dictionary.partialUnsignedLongMember)) {
- auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialUnsignedLongMemberWithImplementedAs"), partialUnsignedLongMemberWithImplementedAsValue);
}
if (!IDLDOMString::isNullValue(dictionary.stringMember)) {
- auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringMember"), stringMemberValue);
}
if (!IDLBoolean::isNullValue(dictionary.derivedBoolMember)) {
- auto derivedBoolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.derivedBoolMember));
+ auto derivedBoolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.derivedBoolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "derivedBoolMember"), derivedBoolMemberValue);
}
return result;
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestDictionaryWithOnlyConditionalMembers.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -63,17 +63,19 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestDictionaryWithOnlyConditionalMembers& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
#if ENABLE(TEST_CONDITIONAL)
if (!IDLDictionary<TestDictionary>::isNullValue(dictionary.conditionalMember)) {
- auto conditionalMemberValue = toJS<IDLDictionary<TestDictionary>>(lexicalGlobalObject, globalObject, IDLDictionary<TestDictionary>::extractValueFromNullable(dictionary.conditionalMember));
+ auto conditionalMemberValue = toJS<IDLDictionary<TestDictionary>>(lexicalGlobalObject, globalObject, throwScope, IDLDictionary<TestDictionary>::extractValueFromNullable(dictionary.conditionalMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "conditionalMember"), conditionalMemberValue);
}
#endif
UNUSED_PARAM(dictionary);
- UNUSED_PARAM(vm);
+ UNUSED_VARIABLE(throwScope);
return result;
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEmptyDictionary.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEmptyDictionary.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEmptyDictionary.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -46,11 +46,12 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestEmptyDictionary& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
UNUSED_PARAM(dictionary);
- UNUSED_PARAM(vm);
+ UNUSED_VARIABLE(throwScope);
return result;
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -169,49 +169,60 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestInheritedDictionary& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLBoolean::isNullValue(dictionary.boolMember)) {
- auto boolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ auto boolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "boolMember"), boolMemberValue);
}
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.callbackMember)) {
- auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "callbackMember"), callbackMemberValue);
}
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMember)) {
- auto partialBooleanMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ auto partialBooleanMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMember"), partialBooleanMemberValue);
}
#if ENABLE(Conditional15)
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMemberWithConditional)) {
- auto partialBooleanMemberWithConditionalValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithConditional));
+ auto partialBooleanMemberWithConditionalValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithConditional));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMemberWithConditional"), partialBooleanMemberWithConditionalValue);
}
#endif
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.partialCallbackMember)) {
- auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialCallbackMember"), partialCallbackMemberValue);
}
- auto partialRequiredLongMemberValue = toJS<IDLLong>(dictionary.partialRequiredLongMember);
+ auto partialRequiredLongMemberValue = toJS<IDLLong>(lexicalGlobalObject, throwScope, dictionary.partialRequiredLongMember);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialRequiredLongMember"), partialRequiredLongMemberValue);
if (!IDLDOMString::isNullValue(dictionary.partialStringMember)) {
- auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMember"), partialStringMemberValue);
}
if (jsCast<JSDOMGlobalObject*>(&globalObject)->scriptExecutionContext()->settingsValues().testSettingEnabled) {
if (!IDLDOMString::isNullValue(dictionary.partialStringMemberWithEnabledBySetting)) {
- auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMemberWithEnabledBySetting"), partialStringMemberWithEnabledBySettingValue);
}
}
if (!IDLUnsignedLong::isNullValue(dictionary.partialUnsignedLongMember)) {
- auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialUnsignedLongMemberWithImplementedAs"), partialUnsignedLongMemberWithImplementedAsValue);
}
if (!IDLDOMString::isNullValue(dictionary.stringMember)) {
- auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringMember"), stringMemberValue);
}
return result;
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInheritedDictionary2.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -83,19 +83,23 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestInheritedDictionary2& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLBoolean::isNullValue(dictionary.boolMember)) {
- auto boolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ auto boolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "boolMember"), boolMemberValue);
}
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.callbackMember)) {
- auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "callbackMember"), callbackMemberValue);
}
if (!IDLDOMString::isNullValue(dictionary.stringMember)) {
- auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringMember"), stringMemberValue);
}
return result;
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -381,7 +381,9 @@
UNUSED_PARAM(throwScope);
auto& impl = castedThis->wrapped();
auto* result = constructEmptyObject(lexicalGlobalObject, castedThis->globalObject()->objectPrototype());
- result->putDirect(vm, Identifier::fromString(vm, "name"), toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.name()));
+ auto nameValue = toJS<IDLDOMString>(*lexicalGlobalObject, throwScope, impl.name());
+ RETURN_IF_EXCEPTION(throwScope, { });
+ result->putDirect(vm, Identifier::fromString(vm, "name"), nameValue);
return JSValue::encode(result);
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -964,140 +964,186 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const TestObj::Dictionary& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLSequence<IDLClampAdaptor<IDLLong>>::isNullValue(dictionary.annotatedTypeInSequenceMember)) {
- auto annotatedTypeInSequenceMemberValue = toJS<IDLSequence<IDLClampAdaptor<IDLLong>>>(lexicalGlobalObject, globalObject, IDLSequence<IDLClampAdaptor<IDLLong>>::extractValueFromNullable(dictionary.annotatedTypeInSequenceMember));
+ auto annotatedTypeInSequenceMemberValue = toJS<IDLSequence<IDLClampAdaptor<IDLLong>>>(lexicalGlobalObject, globalObject, throwScope, IDLSequence<IDLClampAdaptor<IDLLong>>::extractValueFromNullable(dictionary.annotatedTypeInSequenceMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "annotatedTypeInSequenceMember"), annotatedTypeInSequenceMemberValue);
}
if (!IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>::isNullValue(dictionary.annotatedTypeInUnionMember)) {
- auto annotatedTypeInUnionMemberValue = toJS<IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>>(lexicalGlobalObject, globalObject, IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>::extractValueFromNullable(dictionary.annotatedTypeInUnionMember));
+ auto annotatedTypeInUnionMemberValue = toJS<IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>>(lexicalGlobalObject, globalObject, throwScope, IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>::extractValueFromNullable(dictionary.annotatedTypeInUnionMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "annotatedTypeInUnionMember"), annotatedTypeInUnionMemberValue);
}
- auto anyTypedefValueValue = toJS<IDLAny>(dictionary.anyTypedefValue);
+ auto anyTypedefValueValue = toJS<IDLAny>(lexicalGlobalObject, throwScope, dictionary.anyTypedefValue);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "anyTypedefValue"), anyTypedefValueValue);
- auto anyValueValue = toJS<IDLAny>(dictionary.anyValue);
+ auto anyValueValue = toJS<IDLAny>(lexicalGlobalObject, throwScope, dictionary.anyValue);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "anyValue"), anyValueValue);
- auto anyValueWithNullDefaultValue = toJS<IDLAny>(dictionary.anyValueWithNullDefault);
+ auto anyValueWithNullDefaultValue = toJS<IDLAny>(lexicalGlobalObject, throwScope, dictionary.anyValueWithNullDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "anyValueWithNullDefault"), anyValueWithNullDefaultValue);
- auto booleanWithDefaultValue = toJS<IDLBoolean>(dictionary.booleanWithDefault);
+ auto booleanWithDefaultValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, dictionary.booleanWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "booleanWithDefault"), booleanWithDefaultValue);
if (!IDLBoolean::isNullValue(dictionary.booleanWithoutDefault)) {
- auto booleanWithoutDefaultValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.booleanWithoutDefault));
+ auto booleanWithoutDefaultValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.booleanWithoutDefault));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "booleanWithoutDefault"), booleanWithoutDefaultValue);
}
if (!IDLUnion<IDLArrayBufferView, IDLArrayBuffer>::isNullValue(dictionary.bufferSourceValue)) {
- auto bufferSourceValueValue = toJS<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(lexicalGlobalObject, globalObject, IDLUnion<IDLArrayBufferView, IDLArrayBuffer>::extractValueFromNullable(dictionary.bufferSourceValue));
+ auto bufferSourceValueValue = toJS<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(lexicalGlobalObject, globalObject, throwScope, IDLUnion<IDLArrayBufferView, IDLArrayBuffer>::extractValueFromNullable(dictionary.bufferSourceValue));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "bufferSourceValue"), bufferSourceValueValue);
}
if (!IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>::isNullValue(dictionary.dictionaryMember)) {
- auto dictionaryMemberValue = toJS<IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>>(lexicalGlobalObject, globalObject, IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>::extractValueFromNullable(dictionary.dictionaryMember));
+ auto dictionaryMemberValue = toJS<IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>>(lexicalGlobalObject, globalObject, throwScope, IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>::extractValueFromNullable(dictionary.dictionaryMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "dictionaryMember"), dictionaryMemberValue);
}
- auto enumerationValueWithDefaultValue = toJS<IDLEnumeration<TestObj::EnumType>>(lexicalGlobalObject, dictionary.enumerationValueWithDefault);
+ auto enumerationValueWithDefaultValue = toJS<IDLEnumeration<TestObj::EnumType>>(lexicalGlobalObject, throwScope, dictionary.enumerationValueWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "enumerationValueWithDefault"), enumerationValueWithDefaultValue);
- auto enumerationValueWithEmptyStringDefaultValue = toJS<IDLEnumeration<TestObj::EnumType>>(lexicalGlobalObject, dictionary.enumerationValueWithEmptyStringDefault);
+ auto enumerationValueWithEmptyStringDefaultValue = toJS<IDLEnumeration<TestObj::EnumType>>(lexicalGlobalObject, throwScope, dictionary.enumerationValueWithEmptyStringDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "enumerationValueWithEmptyStringDefault"), enumerationValueWithEmptyStringDefaultValue);
if (!IDLEnumeration<TestObj::EnumType>::isNullValue(dictionary.enumerationValueWithoutDefault)) {
- auto enumerationValueWithoutDefaultValue = toJS<IDLEnumeration<TestObj::EnumType>>(lexicalGlobalObject, IDLEnumeration<TestObj::EnumType>::extractValueFromNullable(dictionary.enumerationValueWithoutDefault));
+ auto enumerationValueWithoutDefaultValue = toJS<IDLEnumeration<TestObj::EnumType>>(lexicalGlobalObject, throwScope, IDLEnumeration<TestObj::EnumType>::extractValueFromNullable(dictionary.enumerationValueWithoutDefault));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "enumerationValueWithoutDefault"), enumerationValueWithoutDefaultValue);
}
- auto fooAliasValue = toJS<IDLAny>(dictionary.foo);
+ auto fooAliasValue = toJS<IDLAny>(lexicalGlobalObject, throwScope, dictionary.foo);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "fooAlias"), fooAliasValue);
- auto fooWithDefaultAliasValue = toJS<IDLAny>(dictionary.fooWithDefault);
+ auto fooWithDefaultAliasValue = toJS<IDLAny>(lexicalGlobalObject, throwScope, dictionary.fooWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "fooWithDefaultAlias"), fooWithDefaultAliasValue);
if (!IDLLong::isNullValue(dictionary.integer)) {
- auto integerValue = toJS<IDLLong>(IDLLong::extractValueFromNullable(dictionary.integer));
+ auto integerValue = toJS<IDLLong>(lexicalGlobalObject, throwScope, IDLLong::extractValueFromNullable(dictionary.integer));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "integer"), integerValue);
}
- auto integerWithDefaultValue = toJS<IDLLong>(dictionary.integerWithDefault);
+ auto integerWithDefaultValue = toJS<IDLLong>(lexicalGlobalObject, throwScope, dictionary.integerWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "integerWithDefault"), integerWithDefaultValue);
if (!IDLLongLong::isNullValue(dictionary.largeInteger)) {
- auto largeIntegerValue = toJS<IDLLongLong>(IDLLongLong::extractValueFromNullable(dictionary.largeInteger));
+ auto largeIntegerValue = toJS<IDLLongLong>(lexicalGlobalObject, throwScope, IDLLongLong::extractValueFromNullable(dictionary.largeInteger));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "largeInteger"), largeIntegerValue);
}
- auto largeIntegerWithDefaultValue = toJS<IDLLongLong>(dictionary.largeIntegerWithDefault);
+ auto largeIntegerWithDefaultValue = toJS<IDLLongLong>(lexicalGlobalObject, throwScope, dictionary.largeIntegerWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "largeIntegerWithDefault"), largeIntegerWithDefaultValue);
- auto nullableEnumValue = toJS<IDLNullable<IDLEnumeration<TestObj::EnumType>>>(lexicalGlobalObject, dictionary.nullableEnum);
+ auto nullableEnumValue = toJS<IDLNullable<IDLEnumeration<TestObj::EnumType>>>(lexicalGlobalObject, throwScope, dictionary.nullableEnum);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "nullableEnum"), nullableEnumValue);
- auto nullableIntegerWithDefaultValue = toJS<IDLNullable<IDLLong>>(dictionary.nullableIntegerWithDefault);
+ auto nullableIntegerWithDefaultValue = toJS<IDLNullable<IDLLong>>(lexicalGlobalObject, throwScope, dictionary.nullableIntegerWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "nullableIntegerWithDefault"), nullableIntegerWithDefaultValue);
- auto nullableNodeValue = toJS<IDLNullable<IDLInterface<Node>>>(lexicalGlobalObject, globalObject, dictionary.nullableNode);
+ auto nullableNodeValue = toJS<IDLNullable<IDLInterface<Node>>>(lexicalGlobalObject, globalObject, throwScope, dictionary.nullableNode);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "nullableNode"), nullableNodeValue);
- auto nullableStringWithDefaultValue = toJS<IDLNullable<IDLDOMString>>(lexicalGlobalObject, dictionary.nullableStringWithDefault);
+ auto nullableStringWithDefaultValue = toJS<IDLNullable<IDLDOMString>>(lexicalGlobalObject, throwScope, dictionary.nullableStringWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "nullableStringWithDefault"), nullableStringWithDefaultValue);
- auto nullableUnionMemberValue = toJS<IDLNullable<IDLUnion<IDLLong, IDLInterface<Node>>>>(lexicalGlobalObject, globalObject, dictionary.nullableUnionMember);
+ auto nullableUnionMemberValue = toJS<IDLNullable<IDLUnion<IDLLong, IDLInterface<Node>>>>(lexicalGlobalObject, globalObject, throwScope, dictionary.nullableUnionMember);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "nullableUnionMember"), nullableUnionMemberValue);
- auto requiredBufferSourceValueValue = toJS<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(lexicalGlobalObject, globalObject, dictionary.requiredBufferSourceValue);
+ auto requiredBufferSourceValueValue = toJS<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(lexicalGlobalObject, globalObject, throwScope, dictionary.requiredBufferSourceValue);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "requiredBufferSourceValue"), requiredBufferSourceValueValue);
if (!IDLDouble::isNullValue(dictionary.restrictedDouble)) {
- auto restrictedDoubleValue = toJS<IDLDouble>(IDLDouble::extractValueFromNullable(dictionary.restrictedDouble));
+ auto restrictedDoubleValue = toJS<IDLDouble>(lexicalGlobalObject, throwScope, IDLDouble::extractValueFromNullable(dictionary.restrictedDouble));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "restrictedDouble"), restrictedDoubleValue);
}
- auto restrictedDoubleWithDefaultValue = toJS<IDLDouble>(dictionary.restrictedDoubleWithDefault);
+ auto restrictedDoubleWithDefaultValue = toJS<IDLDouble>(lexicalGlobalObject, throwScope, dictionary.restrictedDoubleWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "restrictedDoubleWithDefault"), restrictedDoubleWithDefaultValue);
if (!IDLFloat::isNullValue(dictionary.restrictedFloat)) {
- auto restrictedFloatValue = toJS<IDLFloat>(IDLFloat::extractValueFromNullable(dictionary.restrictedFloat));
+ auto restrictedFloatValue = toJS<IDLFloat>(lexicalGlobalObject, throwScope, IDLFloat::extractValueFromNullable(dictionary.restrictedFloat));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "restrictedFloat"), restrictedFloatValue);
}
- auto restrictedFloatWithDefaultValue = toJS<IDLFloat>(dictionary.restrictedFloatWithDefault);
+ auto restrictedFloatWithDefaultValue = toJS<IDLFloat>(lexicalGlobalObject, throwScope, dictionary.restrictedFloatWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "restrictedFloatWithDefault"), restrictedFloatWithDefaultValue);
if (!IDLSequence<IDLDOMString>::isNullValue(dictionary.sequenceOfStrings)) {
- auto sequenceOfStringsValue = toJS<IDLSequence<IDLDOMString>>(lexicalGlobalObject, globalObject, IDLSequence<IDLDOMString>::extractValueFromNullable(dictionary.sequenceOfStrings));
+ auto sequenceOfStringsValue = toJS<IDLSequence<IDLDOMString>>(lexicalGlobalObject, globalObject, throwScope, IDLSequence<IDLDOMString>::extractValueFromNullable(dictionary.sequenceOfStrings));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "sequenceOfStrings"), sequenceOfStringsValue);
}
if (!IDLClampAdaptor<IDLByte>::isNullValue(dictionary.smallIntegerClamped)) {
- auto smallIntegerClampedValue = toJS<IDLClampAdaptor<IDLByte>>(IDLClampAdaptor<IDLByte>::extractValueFromNullable(dictionary.smallIntegerClamped));
+ auto smallIntegerClampedValue = toJS<IDLClampAdaptor<IDLByte>>(lexicalGlobalObject, throwScope, IDLClampAdaptor<IDLByte>::extractValueFromNullable(dictionary.smallIntegerClamped));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "smallIntegerClamped"), smallIntegerClampedValue);
}
if (!IDLByte::isNullValue(dictionary.smallIntegerWithDefault)) {
- auto smallIntegerWithDefaultValue = toJS<IDLByte>(IDLByte::extractValueFromNullable(dictionary.smallIntegerWithDefault));
+ auto smallIntegerWithDefaultValue = toJS<IDLByte>(lexicalGlobalObject, throwScope, IDLByte::extractValueFromNullable(dictionary.smallIntegerWithDefault));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "smallIntegerWithDefault"), smallIntegerWithDefaultValue);
}
if (!IDLEnforceRangeAdaptor<IDLOctet>::isNullValue(dictionary.smallUnsignedIntegerEnforcedRange)) {
- auto smallUnsignedIntegerEnforcedRangeValue = toJS<IDLEnforceRangeAdaptor<IDLOctet>>(IDLEnforceRangeAdaptor<IDLOctet>::extractValueFromNullable(dictionary.smallUnsignedIntegerEnforcedRange));
+ auto smallUnsignedIntegerEnforcedRangeValue = toJS<IDLEnforceRangeAdaptor<IDLOctet>>(lexicalGlobalObject, throwScope, IDLEnforceRangeAdaptor<IDLOctet>::extractValueFromNullable(dictionary.smallUnsignedIntegerEnforcedRange));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "smallUnsignedIntegerEnforcedRange"), smallUnsignedIntegerEnforcedRangeValue);
}
- auto smallUnsignedIntegerWithDefaultValue = toJS<IDLOctet>(dictionary.smallUnsignedIntegerWithDefault);
+ auto smallUnsignedIntegerWithDefaultValue = toJS<IDLOctet>(lexicalGlobalObject, throwScope, dictionary.smallUnsignedIntegerWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "smallUnsignedIntegerWithDefault"), smallUnsignedIntegerWithDefaultValue);
if (!IDLLegacyNullToEmptyStringAdaptor<IDLDOMString>::isNullValue(dictionary.stringTreatNullAsEmptyString)) {
- auto stringTreatNullAsEmptyStringValue = toJS<IDLLegacyNullToEmptyStringAdaptor<IDLDOMString>>(lexicalGlobalObject, IDLLegacyNullToEmptyStringAdaptor<IDLDOMString>::extractValueFromNullable(dictionary.stringTreatNullAsEmptyString));
+ auto stringTreatNullAsEmptyStringValue = toJS<IDLLegacyNullToEmptyStringAdaptor<IDLDOMString>>(lexicalGlobalObject, throwScope, IDLLegacyNullToEmptyStringAdaptor<IDLDOMString>::extractValueFromNullable(dictionary.stringTreatNullAsEmptyString));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringTreatNullAsEmptyString"), stringTreatNullAsEmptyStringValue);
}
- auto stringWithDefaultValue = toJS<IDLDOMString>(lexicalGlobalObject, dictionary.stringWithDefault);
+ auto stringWithDefaultValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, dictionary.stringWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringWithDefault"), stringWithDefaultValue);
if (!IDLDOMString::isNullValue(dictionary.stringWithoutDefault)) {
- auto stringWithoutDefaultValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringWithoutDefault));
+ auto stringWithoutDefaultValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringWithoutDefault));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringWithoutDefault"), stringWithoutDefaultValue);
}
if (!IDLUnion<IDLLong, IDLInterface<Node>>::isNullValue(dictionary.unionMember)) {
- auto unionMemberValue = toJS<IDLUnion<IDLLong, IDLInterface<Node>>>(lexicalGlobalObject, globalObject, IDLUnion<IDLLong, IDLInterface<Node>>::extractValueFromNullable(dictionary.unionMember));
+ auto unionMemberValue = toJS<IDLUnion<IDLLong, IDLInterface<Node>>>(lexicalGlobalObject, globalObject, throwScope, IDLUnion<IDLLong, IDLInterface<Node>>::extractValueFromNullable(dictionary.unionMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unionMember"), unionMemberValue);
}
if (!IDLUnrestrictedDouble::isNullValue(dictionary.unrestrictedDouble)) {
- auto unrestrictedDoubleValue = toJS<IDLUnrestrictedDouble>(IDLUnrestrictedDouble::extractValueFromNullable(dictionary.unrestrictedDouble));
+ auto unrestrictedDoubleValue = toJS<IDLUnrestrictedDouble>(lexicalGlobalObject, throwScope, IDLUnrestrictedDouble::extractValueFromNullable(dictionary.unrestrictedDouble));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unrestrictedDouble"), unrestrictedDoubleValue);
}
- auto unrestrictedDoubleWithDefaultValue = toJS<IDLUnrestrictedDouble>(dictionary.unrestrictedDoubleWithDefault);
+ auto unrestrictedDoubleWithDefaultValue = toJS<IDLUnrestrictedDouble>(lexicalGlobalObject, throwScope, dictionary.unrestrictedDoubleWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unrestrictedDoubleWithDefault"), unrestrictedDoubleWithDefaultValue);
if (!IDLUnrestrictedFloat::isNullValue(dictionary.unrestrictedFloat)) {
- auto unrestrictedFloatValue = toJS<IDLUnrestrictedFloat>(IDLUnrestrictedFloat::extractValueFromNullable(dictionary.unrestrictedFloat));
+ auto unrestrictedFloatValue = toJS<IDLUnrestrictedFloat>(lexicalGlobalObject, throwScope, IDLUnrestrictedFloat::extractValueFromNullable(dictionary.unrestrictedFloat));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unrestrictedFloat"), unrestrictedFloatValue);
}
- auto unrestrictedFloatWithDefaultValue = toJS<IDLUnrestrictedFloat>(dictionary.unrestrictedFloatWithDefault);
+ auto unrestrictedFloatWithDefaultValue = toJS<IDLUnrestrictedFloat>(lexicalGlobalObject, throwScope, dictionary.unrestrictedFloatWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unrestrictedFloatWithDefault"), unrestrictedFloatWithDefaultValue);
if (!IDLUnsignedLong::isNullValue(dictionary.unsignedInteger)) {
- auto unsignedIntegerValue = toJS<IDLUnsignedLong>(IDLUnsignedLong::extractValueFromNullable(dictionary.unsignedInteger));
+ auto unsignedIntegerValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, IDLUnsignedLong::extractValueFromNullable(dictionary.unsignedInteger));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unsignedInteger"), unsignedIntegerValue);
}
- auto unsignedIntegerWithDefaultValue = toJS<IDLUnsignedLong>(dictionary.unsignedIntegerWithDefault);
+ auto unsignedIntegerWithDefaultValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, dictionary.unsignedIntegerWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unsignedIntegerWithDefault"), unsignedIntegerWithDefaultValue);
if (!IDLUnsignedLongLong::isNullValue(dictionary.unsignedLargeInteger)) {
- auto unsignedLargeIntegerValue = toJS<IDLUnsignedLongLong>(IDLUnsignedLongLong::extractValueFromNullable(dictionary.unsignedLargeInteger));
+ auto unsignedLargeIntegerValue = toJS<IDLUnsignedLongLong>(lexicalGlobalObject, throwScope, IDLUnsignedLongLong::extractValueFromNullable(dictionary.unsignedLargeInteger));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unsignedLargeInteger"), unsignedLargeIntegerValue);
}
- auto unsignedLargeIntegerWithDefaultValue = toJS<IDLUnsignedLongLong>(dictionary.unsignedLargeIntegerWithDefault);
+ auto unsignedLargeIntegerWithDefaultValue = toJS<IDLUnsignedLongLong>(lexicalGlobalObject, throwScope, dictionary.unsignedLargeIntegerWithDefault);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unsignedLargeIntegerWithDefault"), unsignedLargeIntegerWithDefaultValue);
return result;
}
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp (276948 => 276949)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp 2021-05-04 06:33:52 UTC (rev 276948)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp 2021-05-04 06:34:16 UTC (rev 276949)
@@ -239,54 +239,65 @@
JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject& globalObject, const DictionaryImplName& dictionary)
{
auto& vm = JSC::getVM(&lexicalGlobalObject);
+ auto throwScope = DECLARE_THROW_SCOPE(vm);
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
if (!IDLBoolean::isNullValue(dictionary.boolMember)) {
- auto boolMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ auto boolMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.boolMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "boolMember"), boolMemberValue);
}
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.callbackMember)) {
- auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ auto callbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.callbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "callbackMember"), callbackMemberValue);
}
if (!IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>::isNullValue(dictionary.enumMember)) {
- auto enumMemberValue = toJS<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>>(lexicalGlobalObject, IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>::extractValueFromNullable(dictionary.enumMember));
+ auto enumMemberValue = toJS<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>>(lexicalGlobalObject, throwScope, IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>::extractValueFromNullable(dictionary.enumMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "enumMember"), enumMemberValue);
}
- auto nullableUnionWithNullDefaultValueValue = toJS<IDLNullable<IDLUnion<IDLDOMString, IDLBoolean>>>(lexicalGlobalObject, globalObject, dictionary.nullableUnionWithNullDefaultValue);
+ auto nullableUnionWithNullDefaultValueValue = toJS<IDLNullable<IDLUnion<IDLDOMString, IDLBoolean>>>(lexicalGlobalObject, globalObject, throwScope, dictionary.nullableUnionWithNullDefaultValue);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "nullableUnionWithNullDefaultValue"), nullableUnionWithNullDefaultValueValue);
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMember)) {
- auto partialBooleanMemberValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ auto partialBooleanMemberValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMember"), partialBooleanMemberValue);
}
#endif
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (!IDLBoolean::isNullValue(dictionary.partialBooleanMemberWithIgnoredConditional)) {
- auto partialBooleanMemberWithIgnoredConditionalValue = toJS<IDLBoolean>(IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithIgnoredConditional));
+ auto partialBooleanMemberWithIgnoredConditionalValue = toJS<IDLBoolean>(lexicalGlobalObject, throwScope, IDLBoolean::extractValueFromNullable(dictionary.partialBooleanMemberWithIgnoredConditional));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialBooleanMemberWithIgnoredConditional"), partialBooleanMemberWithIgnoredConditionalValue);
}
#endif
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (!IDLCallbackFunction<JSVoidCallback>::isNullValue(dictionary.partialCallbackMember)) {
- auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ auto partialCallbackMemberValue = toJS<IDLCallbackFunction<JSVoidCallback>>(lexicalGlobalObject, globalObject, throwScope, IDLCallbackFunction<JSVoidCallback>::extractValueFromNullable(dictionary.partialCallbackMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialCallbackMember"), partialCallbackMemberValue);
}
#endif
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (!IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>::isNullValue(dictionary.partialEnumMember)) {
- auto partialEnumMemberValue = toJS<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>>(lexicalGlobalObject, IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>::extractValueFromNullable(dictionary.partialEnumMember));
+ auto partialEnumMemberValue = toJS<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>>(lexicalGlobalObject, throwScope, IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>::extractValueFromNullable(dictionary.partialEnumMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialEnumMember"), partialEnumMemberValue);
}
#endif
#if ENABLE(Conditional13) || ENABLE(Conditional14)
- auto partialRequiredLongMemberValue = toJS<IDLLong>(dictionary.partialRequiredLongMember);
+ auto partialRequiredLongMemberValue = toJS<IDLLong>(lexicalGlobalObject, throwScope, dictionary.partialRequiredLongMember);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialRequiredLongMember"), partialRequiredLongMemberValue);
#endif
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (!IDLDOMString::isNullValue(dictionary.partialStringMember)) {
- auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ auto partialStringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMember"), partialStringMemberValue);
}
#endif
@@ -293,7 +304,8 @@
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (jsCast<JSDOMGlobalObject*>(&globalObject)->scriptExecutionContext()->settingsValues().testSettingEnabled) {
if (!IDLDOMString::isNullValue(dictionary.partialStringMemberWithEnabledBySetting)) {
- auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ auto partialStringMemberWithEnabledBySettingValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.partialStringMemberWithEnabledBySetting));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialStringMemberWithEnabledBySetting"), partialStringMemberWithEnabledBySettingValue);
}
}
@@ -300,15 +312,18 @@
#endif
#if ENABLE(Conditional13) || ENABLE(Conditional14)
if (!IDLUnsignedLong::isNullValue(dictionary.partialUnsignedLongMember)) {
- auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ auto partialUnsignedLongMemberWithImplementedAsValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, IDLUnsignedLong::extractValueFromNullable(dictionary.partialUnsignedLongMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "partialUnsignedLongMemberWithImplementedAs"), partialUnsignedLongMemberWithImplementedAsValue);
}
#endif
if (!IDLDOMString::isNullValue(dictionary.stringMember)) {
- auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ auto stringMemberValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, IDLDOMString::extractValueFromNullable(dictionary.stringMember));
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "stringMember"), stringMemberValue);
}
- auto unionMemberWithDefaultValueValue = toJS<IDLUnion<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>, IDLDouble>>(lexicalGlobalObject, globalObject, dictionary.unionMemberWithDefaultValue);
+ auto unionMemberWithDefaultValueValue = toJS<IDLUnion<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>, IDLDouble>>(lexicalGlobalObject, globalObject, throwScope, dictionary.unionMemberWithDefaultValue);
+ RETURN_IF_EXCEPTION(throwScope, { });
result->putDirect(vm, JSC::Identifier::fromString(vm, "unionMemberWithDefaultValue"), unionMemberWithDefaultValueValue);
return result;
}