Title: [228063] branches/safari-605-branch

Diff

Modified: branches/safari-605-branch/LayoutTests/ChangeLog (228062 => 228063)


--- branches/safari-605-branch/LayoutTests/ChangeLog	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/LayoutTests/ChangeLog	2018-02-05 02:19:04 UTC (rev 228063)
@@ -1,5 +1,21 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r227985. rdar://problem/37145479
+
+    2018-02-01  Chris Dumez  <cdu...@apple.com>
+
+            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
+            https://bugs.webkit.org/show_bug.cgi?id=182392
+            <rdar://problem/37119215>
+
+            Reviewed by Geoffrey Garen.
+
+            Rebaseline existing test now that output is slightly different.
+
+            * fast/events/constructors/message-event-constructor-expected.txt:
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227974. rdar://problem/37145538
 
     2018-02-01  Dean Jackson  <d...@apple.com>

Modified: branches/safari-605-branch/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt (228062 => 228063)


--- branches/safari-605-branch/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt	2018-02-05 02:19:04 UTC (rev 228063)
@@ -93,7 +93,7 @@
 PASS new MessageEvent('eventType', { ports: 18446744073709551615 }).ports threw exception TypeError: Value is not a sequence.
 PASS new MessageEvent('eventType', { ports: NaN }).ports threw exception TypeError: Value is not a sequence.
 PASS new MessageEvent('eventType', { get ports() { return 123; } }).ports threw exception TypeError: Value is not a sequence.
-PASS new MessageEvent('eventType', { get ports() { throw 'MessageEvent Error'; } }) threw exception TypeError: Value is not a sequence.
+PASS new MessageEvent('eventType', { get ports() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error.
 PASS new MessageEvent('eventType', { ports: {valueOf: function () { return [channel.port1, channel.port2, channel.port2]; } } }).ports[0] threw exception TypeError: Type error.
 PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).bubbles is true
 PASS new MessageEvent('eventType', { bubbles: true, cancelable: true, data: test_object, origin: 'wonderful', lastEventId: 'excellent', source: window, ports: [channel.port1, channel.port2, channel2.port1] }).cancelable is true

Modified: branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog (228062 => 228063)


--- branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog	2018-02-05 02:19:04 UTC (rev 228063)
@@ -1,5 +1,21 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r227985. rdar://problem/37145479
+
+    2018-02-01  Chris Dumez  <cdu...@apple.com>
+
+            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
+            https://bugs.webkit.org/show_bug.cgi?id=182392
+            <rdar://problem/37119215>
+
+            Reviewed by Geoffrey Garen.
+
+            Rebaseline WPT test now that all checks are passing.
+
+            * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https-expected.txt:
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227959. rdar://problem/37145559
 
     2018-02-01  Chris Dumez  <cdu...@apple.com>

Modified: branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https-expected.txt (228062 => 228063)


--- branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https-expected.txt	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https-expected.txt	2018-02-05 02:19:04 UTC (rev 228063)
@@ -7,7 +7,6 @@
 PASS `origin` is specified 
 PASS `lastEventId` is specified 
 PASS `source` is specified 
-FAIL `ports` is specified assert_throws: function "function () {
-      createEvent({ get ports() { throw { name: 'Error' }; } }); }" threw object "TypeError: Value is not a sequence" ("TypeError") expected object "[object Object]" ("Error")
+PASS `ports` is specified 
 PASS all initial values are specified 
 

Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog	2018-02-05 02:19:04 UTC (rev 228063)
@@ -1,5 +1,43 @@
 2018-02-04  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r227985. rdar://problem/37145479
+
+    2018-02-01  Chris Dumez  <cdu...@apple.com>
+
+            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
+            https://bugs.webkit.org/show_bug.cgi?id=182392
+            <rdar://problem/37119215>
+
+            Reviewed by Geoffrey Garen.
+
+            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>(),
+            given that getting the property from the object can throw an exception.
+
+            No new tests, rebaselined existing test.
+
+            * bindings/scripts/CodeGeneratorJS.pm:
+            (GenerateDictionaryImplementationContent):
+            * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
+            (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
+            * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+            (WebCore::convertDictionary<TestEventConstructor::Init>):
+            * bindings/scripts/test/JS/JSTestObj.cpp:
+            (WebCore::convertDictionary<TestObj::Dictionary>):
+            (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
+            (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
+            (WebCore::convertDictionary<AlternateDictionaryName>):
+            (WebCore::convertDictionary<TestObj::ParentDictionary>):
+            (WebCore::convertDictionary<TestObj::ChildDictionary>):
+            (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
+            (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
+            (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
+            * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
+            (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
+            * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
+            (WebCore::convertDictionary<DictionaryImplName>):
+
+2018-02-04  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227974. rdar://problem/37145538
 
     2018-02-01  Dean Jackson  <d...@apple.com>

Modified: branches/safari-605-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2018-02-05 02:19:04 UTC (rev 228063)
@@ -2319,7 +2319,13 @@
             my $implementedAsKey = $member->extendedAttributes->{ImplementedAs} || $key;
 
             # 4.2. Let value be an ECMAScript value, depending on Type(V):
-            $result .= "    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, \"${key}\"));\n";
+            $result .= "    JSValue ${key}Value;\n";
+            $result .= "    if (isNullOrUndefined)\n";
+            $result .= "        ${key}Value = jsUndefined();\n";
+            $result .= "    else {\n";
+            $result .= "        ${key}Value = object->get(&state, Identifier::fromString(&state, \"${key}\"));\n";
+            $result .= "        RETURN_IF_EXCEPTION(throwScope, { });\n";
+            $result .= "    }\n";
 
             my $IDLType = GetIDLType($typeScope, $type);
 

Modified: branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp	2018-02-05 02:19:04 UTC (rev 228063)
@@ -90,12 +90,24 @@
         return { };
     }
     TestCallbackInterface::Dictionary result;
-    JSValue optionalMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "optionalMember"));
+    JSValue optionalMemberValue;
+    if (isNullOrUndefined)
+        optionalMemberValue = jsUndefined();
+    else {
+        optionalMemberValue = object->get(&state, Identifier::fromString(&state, "optionalMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!optionalMemberValue.isUndefined()) {
         result.optionalMember = convert<IDLLong>(state, optionalMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue requiredMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredMember"));
+    JSValue requiredMemberValue;
+    if (isNullOrUndefined)
+        requiredMemberValue = jsUndefined();
+    else {
+        requiredMemberValue = object->get(&state, Identifier::fromString(&state, "requiredMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!requiredMemberValue.isUndefined()) {
         result.requiredMember = convert<IDLUSVString>(state, requiredMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });

Modified: branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp	2018-02-05 02:19:04 UTC (rev 228063)
@@ -47,31 +47,61 @@
         return { };
     }
     TestEventConstructor::Init result;
-    JSValue bubblesValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "bubbles"));
+    JSValue bubblesValue;
+    if (isNullOrUndefined)
+        bubblesValue = jsUndefined();
+    else {
+        bubblesValue = object->get(&state, Identifier::fromString(&state, "bubbles"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!bubblesValue.isUndefined()) {
         result.bubbles = convert<IDLBoolean>(state, bubblesValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.bubbles = false;
-    JSValue cancelableValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "cancelable"));
+    JSValue cancelableValue;
+    if (isNullOrUndefined)
+        cancelableValue = jsUndefined();
+    else {
+        cancelableValue = object->get(&state, Identifier::fromString(&state, "cancelable"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!cancelableValue.isUndefined()) {
         result.cancelable = convert<IDLBoolean>(state, cancelableValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.cancelable = false;
-    JSValue composedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "composed"));
+    JSValue composedValue;
+    if (isNullOrUndefined)
+        composedValue = jsUndefined();
+    else {
+        composedValue = object->get(&state, Identifier::fromString(&state, "composed"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!composedValue.isUndefined()) {
         result.composed = convert<IDLBoolean>(state, composedValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.composed = false;
-    JSValue attr2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "attr2"));
+    JSValue attr2Value;
+    if (isNullOrUndefined)
+        attr2Value = jsUndefined();
+    else {
+        attr2Value = object->get(&state, Identifier::fromString(&state, "attr2"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!attr2Value.isUndefined()) {
         result.attr2 = convert<IDLDOMString>(state, attr2Value);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.attr2 = emptyString();
-    JSValue attr3Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "attr3"));
+    JSValue attr3Value;
+    if (isNullOrUndefined)
+        attr3Value = jsUndefined();
+    else {
+        attr3Value = object->get(&state, Identifier::fromString(&state, "attr3"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!attr3Value.isUndefined()) {
         result.attr3 = convert<IDLDOMString>(state, attr3Value);
         RETURN_IF_EXCEPTION(throwScope, { });

Modified: branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2018-02-05 02:19:04 UTC (rev 228063)
@@ -428,131 +428,269 @@
         return { };
     }
     TestObj::Dictionary result;
-    JSValue annotatedTypeInSequenceMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "annotatedTypeInSequenceMember"));
+    JSValue annotatedTypeInSequenceMemberValue;
+    if (isNullOrUndefined)
+        annotatedTypeInSequenceMemberValue = jsUndefined();
+    else {
+        annotatedTypeInSequenceMemberValue = object->get(&state, Identifier::fromString(&state, "annotatedTypeInSequenceMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!annotatedTypeInSequenceMemberValue.isUndefined()) {
         result.annotatedTypeInSequenceMember = convert<IDLSequence<IDLClampAdaptor<IDLLong>>>(state, annotatedTypeInSequenceMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue annotatedTypeInUnionMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "annotatedTypeInUnionMember"));
+    JSValue annotatedTypeInUnionMemberValue;
+    if (isNullOrUndefined)
+        annotatedTypeInUnionMemberValue = jsUndefined();
+    else {
+        annotatedTypeInUnionMemberValue = object->get(&state, Identifier::fromString(&state, "annotatedTypeInUnionMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!annotatedTypeInUnionMemberValue.isUndefined()) {
         result.annotatedTypeInUnionMember = convert<IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>>(state, annotatedTypeInUnionMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue anyTypedefValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyTypedefValue"));
+    JSValue anyTypedefValueValue;
+    if (isNullOrUndefined)
+        anyTypedefValueValue = jsUndefined();
+    else {
+        anyTypedefValueValue = object->get(&state, Identifier::fromString(&state, "anyTypedefValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!anyTypedefValueValue.isUndefined()) {
         result.anyTypedefValue = convert<IDLAny>(state, anyTypedefValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.anyTypedefValue = jsUndefined();
-    JSValue anyValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyValue"));
+    JSValue anyValueValue;
+    if (isNullOrUndefined)
+        anyValueValue = jsUndefined();
+    else {
+        anyValueValue = object->get(&state, Identifier::fromString(&state, "anyValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!anyValueValue.isUndefined()) {
         result.anyValue = convert<IDLAny>(state, anyValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.anyValue = jsUndefined();
-    JSValue anyValueWithNullDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyValueWithNullDefault"));
+    JSValue anyValueWithNullDefaultValue;
+    if (isNullOrUndefined)
+        anyValueWithNullDefaultValue = jsUndefined();
+    else {
+        anyValueWithNullDefaultValue = object->get(&state, Identifier::fromString(&state, "anyValueWithNullDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!anyValueWithNullDefaultValue.isUndefined()) {
         result.anyValueWithNullDefault = convert<IDLAny>(state, anyValueWithNullDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.anyValueWithNullDefault = jsNull();
-    JSValue booleanWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithDefault"));
+    JSValue booleanWithDefaultValue;
+    if (isNullOrUndefined)
+        booleanWithDefaultValue = jsUndefined();
+    else {
+        booleanWithDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!booleanWithDefaultValue.isUndefined()) {
         result.booleanWithDefault = convert<IDLBoolean>(state, booleanWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.booleanWithDefault = false;
-    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+    JSValue booleanWithoutDefaultValue;
+    if (isNullOrUndefined)
+        booleanWithoutDefaultValue = jsUndefined();
+    else {
+        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!booleanWithoutDefaultValue.isUndefined()) {
         result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue bufferSourceValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "bufferSourceValue"));
+    JSValue bufferSourceValueValue;
+    if (isNullOrUndefined)
+        bufferSourceValueValue = jsUndefined();
+    else {
+        bufferSourceValueValue = object->get(&state, Identifier::fromString(&state, "bufferSourceValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!bufferSourceValueValue.isUndefined()) {
         result.bufferSourceValue = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, bufferSourceValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue dictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "dictionaryMember"));
+    JSValue dictionaryMemberValue;
+    if (isNullOrUndefined)
+        dictionaryMemberValue = jsUndefined();
+    else {
+        dictionaryMemberValue = object->get(&state, Identifier::fromString(&state, "dictionaryMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!dictionaryMemberValue.isUndefined()) {
         result.dictionaryMember = convert<IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>>(state, dictionaryMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue enumerationValueWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithDefault"));
+    JSValue enumerationValueWithDefaultValue;
+    if (isNullOrUndefined)
+        enumerationValueWithDefaultValue = jsUndefined();
+    else {
+        enumerationValueWithDefaultValue = object->get(&state, Identifier::fromString(&state, "enumerationValueWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!enumerationValueWithDefaultValue.isUndefined()) {
         result.enumerationValueWithDefault = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.enumerationValueWithDefault = TestObj::EnumType::EnumValue1;
-    JSValue enumerationValueWithEmptyStringDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithEmptyStringDefault"));
+    JSValue enumerationValueWithEmptyStringDefaultValue;
+    if (isNullOrUndefined)
+        enumerationValueWithEmptyStringDefaultValue = jsUndefined();
+    else {
+        enumerationValueWithEmptyStringDefaultValue = object->get(&state, Identifier::fromString(&state, "enumerationValueWithEmptyStringDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!enumerationValueWithEmptyStringDefaultValue.isUndefined()) {
         result.enumerationValueWithEmptyStringDefault = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueWithEmptyStringDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.enumerationValueWithEmptyStringDefault = TestObj::EnumType::EmptyString;
-    JSValue enumerationValueWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithoutDefault"));
+    JSValue enumerationValueWithoutDefaultValue;
+    if (isNullOrUndefined)
+        enumerationValueWithoutDefaultValue = jsUndefined();
+    else {
+        enumerationValueWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "enumerationValueWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!enumerationValueWithoutDefaultValue.isUndefined()) {
         result.enumerationValueWithoutDefault = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue fooAliasValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "fooAlias"));
+    JSValue fooAliasValue;
+    if (isNullOrUndefined)
+        fooAliasValue = jsUndefined();
+    else {
+        fooAliasValue = object->get(&state, Identifier::fromString(&state, "fooAlias"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!fooAliasValue.isUndefined()) {
         result.foo = convert<IDLAny>(state, fooAliasValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.foo = jsUndefined();
-    JSValue fooWithDefaultAliasValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "fooWithDefaultAlias"));
+    JSValue fooWithDefaultAliasValue;
+    if (isNullOrUndefined)
+        fooWithDefaultAliasValue = jsUndefined();
+    else {
+        fooWithDefaultAliasValue = object->get(&state, Identifier::fromString(&state, "fooWithDefaultAlias"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!fooWithDefaultAliasValue.isUndefined()) {
         result.fooWithDefault = convert<IDLAny>(state, fooWithDefaultAliasValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.fooWithDefault = 0;
-    JSValue integerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "integer"));
+    JSValue integerValue;
+    if (isNullOrUndefined)
+        integerValue = jsUndefined();
+    else {
+        integerValue = object->get(&state, Identifier::fromString(&state, "integer"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!integerValue.isUndefined()) {
         result.integer = convert<IDLLong>(state, integerValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue integerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "integerWithDefault"));
+    JSValue integerWithDefaultValue;
+    if (isNullOrUndefined)
+        integerWithDefaultValue = jsUndefined();
+    else {
+        integerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "integerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!integerWithDefaultValue.isUndefined()) {
         result.integerWithDefault = convert<IDLLong>(state, integerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.integerWithDefault = 0;
-    JSValue largeIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "largeInteger"));
+    JSValue largeIntegerValue;
+    if (isNullOrUndefined)
+        largeIntegerValue = jsUndefined();
+    else {
+        largeIntegerValue = object->get(&state, Identifier::fromString(&state, "largeInteger"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!largeIntegerValue.isUndefined()) {
         result.largeInteger = convert<IDLLongLong>(state, largeIntegerValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue largeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "largeIntegerWithDefault"));
+    JSValue largeIntegerWithDefaultValue;
+    if (isNullOrUndefined)
+        largeIntegerWithDefaultValue = jsUndefined();
+    else {
+        largeIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "largeIntegerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!largeIntegerWithDefaultValue.isUndefined()) {
         result.largeIntegerWithDefault = convert<IDLLongLong>(state, largeIntegerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.largeIntegerWithDefault = 0;
-    JSValue nullableIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableIntegerWithDefault"));
+    JSValue nullableIntegerWithDefaultValue;
+    if (isNullOrUndefined)
+        nullableIntegerWithDefaultValue = jsUndefined();
+    else {
+        nullableIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "nullableIntegerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!nullableIntegerWithDefaultValue.isUndefined()) {
         result.nullableIntegerWithDefault = convert<IDLNullable<IDLLong>>(state, nullableIntegerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.nullableIntegerWithDefault = std::nullopt;
-    JSValue nullableNodeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableNode"));
+    JSValue nullableNodeValue;
+    if (isNullOrUndefined)
+        nullableNodeValue = jsUndefined();
+    else {
+        nullableNodeValue = object->get(&state, Identifier::fromString(&state, "nullableNode"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!nullableNodeValue.isUndefined()) {
         result.nullableNode = convert<IDLNullable<IDLInterface<Node>>>(state, nullableNodeValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.nullableNode = nullptr;
-    JSValue nullableStringWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableStringWithDefault"));
+    JSValue nullableStringWithDefaultValue;
+    if (isNullOrUndefined)
+        nullableStringWithDefaultValue = jsUndefined();
+    else {
+        nullableStringWithDefaultValue = object->get(&state, Identifier::fromString(&state, "nullableStringWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!nullableStringWithDefaultValue.isUndefined()) {
         result.nullableStringWithDefault = convert<IDLNullable<IDLDOMString>>(state, nullableStringWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.nullableStringWithDefault = String();
-    JSValue nullableUnionMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableUnionMember"));
+    JSValue nullableUnionMemberValue;
+    if (isNullOrUndefined)
+        nullableUnionMemberValue = jsUndefined();
+    else {
+        nullableUnionMemberValue = object->get(&state, Identifier::fromString(&state, "nullableUnionMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!nullableUnionMemberValue.isUndefined()) {
         result.nullableUnionMember = convert<IDLNullable<IDLUnion<IDLLong, IDLInterface<Node>>>>(state, nullableUnionMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.nullableUnionMember = std::nullopt;
-    JSValue requiredBufferSourceValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredBufferSourceValue"));
+    JSValue requiredBufferSourceValueValue;
+    if (isNullOrUndefined)
+        requiredBufferSourceValueValue = jsUndefined();
+    else {
+        requiredBufferSourceValueValue = object->get(&state, Identifier::fromString(&state, "requiredBufferSourceValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!requiredBufferSourceValueValue.isUndefined()) {
         result.requiredBufferSourceValue = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, requiredBufferSourceValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -560,114 +698,240 @@
         throwRequiredMemberTypeError(state, throwScope, "requiredBufferSourceValue", "TestDictionary", "(ArrayBufferView or ArrayBuffer)");
         return { };
     }
-    JSValue restrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedDouble"));
+    JSValue restrictedDoubleValue;
+    if (isNullOrUndefined)
+        restrictedDoubleValue = jsUndefined();
+    else {
+        restrictedDoubleValue = object->get(&state, Identifier::fromString(&state, "restrictedDouble"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!restrictedDoubleValue.isUndefined()) {
         result.restrictedDouble = convert<IDLDouble>(state, restrictedDoubleValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue restrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedDoubleWithDefault"));
+    JSValue restrictedDoubleWithDefaultValue;
+    if (isNullOrUndefined)
+        restrictedDoubleWithDefaultValue = jsUndefined();
+    else {
+        restrictedDoubleWithDefaultValue = object->get(&state, Identifier::fromString(&state, "restrictedDoubleWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!restrictedDoubleWithDefaultValue.isUndefined()) {
         result.restrictedDoubleWithDefault = convert<IDLDouble>(state, restrictedDoubleWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.restrictedDoubleWithDefault = 0;
-    JSValue restrictedFloatValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedFloat"));
+    JSValue restrictedFloatValue;
+    if (isNullOrUndefined)
+        restrictedFloatValue = jsUndefined();
+    else {
+        restrictedFloatValue = object->get(&state, Identifier::fromString(&state, "restrictedFloat"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!restrictedFloatValue.isUndefined()) {
         result.restrictedFloat = convert<IDLFloat>(state, restrictedFloatValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue restrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedFloatWithDefault"));
+    JSValue restrictedFloatWithDefaultValue;
+    if (isNullOrUndefined)
+        restrictedFloatWithDefaultValue = jsUndefined();
+    else {
+        restrictedFloatWithDefaultValue = object->get(&state, Identifier::fromString(&state, "restrictedFloatWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!restrictedFloatWithDefaultValue.isUndefined()) {
         result.restrictedFloatWithDefault = convert<IDLFloat>(state, restrictedFloatWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.restrictedFloatWithDefault = 0;
-    JSValue sequenceOfStringsValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "sequenceOfStrings"));
+    JSValue sequenceOfStringsValue;
+    if (isNullOrUndefined)
+        sequenceOfStringsValue = jsUndefined();
+    else {
+        sequenceOfStringsValue = object->get(&state, Identifier::fromString(&state, "sequenceOfStrings"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!sequenceOfStringsValue.isUndefined()) {
         result.sequenceOfStrings = convert<IDLSequence<IDLDOMString>>(state, sequenceOfStringsValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue smallIntegerClampedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallIntegerClamped"));
+    JSValue smallIntegerClampedValue;
+    if (isNullOrUndefined)
+        smallIntegerClampedValue = jsUndefined();
+    else {
+        smallIntegerClampedValue = object->get(&state, Identifier::fromString(&state, "smallIntegerClamped"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!smallIntegerClampedValue.isUndefined()) {
         result.smallIntegerClamped = convert<IDLClampAdaptor<IDLByte>>(state, smallIntegerClampedValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue smallIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallIntegerWithDefault"));
+    JSValue smallIntegerWithDefaultValue;
+    if (isNullOrUndefined)
+        smallIntegerWithDefaultValue = jsUndefined();
+    else {
+        smallIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "smallIntegerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!smallIntegerWithDefaultValue.isUndefined()) {
         result.smallIntegerWithDefault = convert<IDLByte>(state, smallIntegerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue smallUnsignedIntegerEnforcedRangeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerEnforcedRange"));
+    JSValue smallUnsignedIntegerEnforcedRangeValue;
+    if (isNullOrUndefined)
+        smallUnsignedIntegerEnforcedRangeValue = jsUndefined();
+    else {
+        smallUnsignedIntegerEnforcedRangeValue = object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerEnforcedRange"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!smallUnsignedIntegerEnforcedRangeValue.isUndefined()) {
         result.smallUnsignedIntegerEnforcedRange = convert<IDLEnforceRangeAdaptor<IDLOctet>>(state, smallUnsignedIntegerEnforcedRangeValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue smallUnsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerWithDefault"));
+    JSValue smallUnsignedIntegerWithDefaultValue;
+    if (isNullOrUndefined)
+        smallUnsignedIntegerWithDefaultValue = jsUndefined();
+    else {
+        smallUnsignedIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!smallUnsignedIntegerWithDefaultValue.isUndefined()) {
         result.smallUnsignedIntegerWithDefault = convert<IDLOctet>(state, smallUnsignedIntegerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.smallUnsignedIntegerWithDefault = 0;
-    JSValue stringTreatNullAsEmptyStringValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringTreatNullAsEmptyString"));
+    JSValue stringTreatNullAsEmptyStringValue;
+    if (isNullOrUndefined)
+        stringTreatNullAsEmptyStringValue = jsUndefined();
+    else {
+        stringTreatNullAsEmptyStringValue = object->get(&state, Identifier::fromString(&state, "stringTreatNullAsEmptyString"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringTreatNullAsEmptyStringValue.isUndefined()) {
         result.stringTreatNullAsEmptyString = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, stringTreatNullAsEmptyStringValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue stringWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithDefault"));
+    JSValue stringWithDefaultValue;
+    if (isNullOrUndefined)
+        stringWithDefaultValue = jsUndefined();
+    else {
+        stringWithDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringWithDefaultValue.isUndefined()) {
         result.stringWithDefault = convert<IDLDOMString>(state, stringWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.stringWithDefault = ASCIILiteral("defaultString");
-    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+    JSValue stringWithoutDefaultValue;
+    if (isNullOrUndefined)
+        stringWithoutDefaultValue = jsUndefined();
+    else {
+        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringWithoutDefaultValue.isUndefined()) {
         result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue unionMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unionMember"));
+    JSValue unionMemberValue;
+    if (isNullOrUndefined)
+        unionMemberValue = jsUndefined();
+    else {
+        unionMemberValue = object->get(&state, Identifier::fromString(&state, "unionMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unionMemberValue.isUndefined()) {
         result.unionMember = convert<IDLUnion<IDLLong, IDLInterface<Node>>>(state, unionMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue unrestrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedDouble"));
+    JSValue unrestrictedDoubleValue;
+    if (isNullOrUndefined)
+        unrestrictedDoubleValue = jsUndefined();
+    else {
+        unrestrictedDoubleValue = object->get(&state, Identifier::fromString(&state, "unrestrictedDouble"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unrestrictedDoubleValue.isUndefined()) {
         result.unrestrictedDouble = convert<IDLUnrestrictedDouble>(state, unrestrictedDoubleValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue unrestrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedDoubleWithDefault"));
+    JSValue unrestrictedDoubleWithDefaultValue;
+    if (isNullOrUndefined)
+        unrestrictedDoubleWithDefaultValue = jsUndefined();
+    else {
+        unrestrictedDoubleWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unrestrictedDoubleWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unrestrictedDoubleWithDefaultValue.isUndefined()) {
         result.unrestrictedDoubleWithDefault = convert<IDLUnrestrictedDouble>(state, unrestrictedDoubleWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.unrestrictedDoubleWithDefault = 0;
-    JSValue unrestrictedFloatValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedFloat"));
+    JSValue unrestrictedFloatValue;
+    if (isNullOrUndefined)
+        unrestrictedFloatValue = jsUndefined();
+    else {
+        unrestrictedFloatValue = object->get(&state, Identifier::fromString(&state, "unrestrictedFloat"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unrestrictedFloatValue.isUndefined()) {
         result.unrestrictedFloat = convert<IDLUnrestrictedFloat>(state, unrestrictedFloatValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue unrestrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedFloatWithDefault"));
+    JSValue unrestrictedFloatWithDefaultValue;
+    if (isNullOrUndefined)
+        unrestrictedFloatWithDefaultValue = jsUndefined();
+    else {
+        unrestrictedFloatWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unrestrictedFloatWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unrestrictedFloatWithDefaultValue.isUndefined()) {
         result.unrestrictedFloatWithDefault = convert<IDLUnrestrictedFloat>(state, unrestrictedFloatWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.unrestrictedFloatWithDefault = 0;
-    JSValue unsignedIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedInteger"));
+    JSValue unsignedIntegerValue;
+    if (isNullOrUndefined)
+        unsignedIntegerValue = jsUndefined();
+    else {
+        unsignedIntegerValue = object->get(&state, Identifier::fromString(&state, "unsignedInteger"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unsignedIntegerValue.isUndefined()) {
         result.unsignedInteger = convert<IDLUnsignedLong>(state, unsignedIntegerValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue unsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedIntegerWithDefault"));
+    JSValue unsignedIntegerWithDefaultValue;
+    if (isNullOrUndefined)
+        unsignedIntegerWithDefaultValue = jsUndefined();
+    else {
+        unsignedIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unsignedIntegerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unsignedIntegerWithDefaultValue.isUndefined()) {
         result.unsignedIntegerWithDefault = convert<IDLUnsignedLong>(state, unsignedIntegerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.unsignedIntegerWithDefault = 0;
-    JSValue unsignedLargeIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedLargeInteger"));
+    JSValue unsignedLargeIntegerValue;
+    if (isNullOrUndefined)
+        unsignedLargeIntegerValue = jsUndefined();
+    else {
+        unsignedLargeIntegerValue = object->get(&state, Identifier::fromString(&state, "unsignedLargeInteger"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unsignedLargeIntegerValue.isUndefined()) {
         result.unsignedLargeInteger = convert<IDLUnsignedLongLong>(state, unsignedLargeIntegerValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue unsignedLargeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedLargeIntegerWithDefault"));
+    JSValue unsignedLargeIntegerWithDefaultValue;
+    if (isNullOrUndefined)
+        unsignedLargeIntegerWithDefaultValue = jsUndefined();
+    else {
+        unsignedLargeIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unsignedLargeIntegerWithDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!unsignedLargeIntegerWithDefaultValue.isUndefined()) {
         result.unsignedLargeIntegerWithDefault = convert<IDLUnsignedLongLong>(state, unsignedLargeIntegerWithDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -826,12 +1090,24 @@
         return { };
     }
     TestObj::DictionaryThatShouldNotTolerateNull result;
-    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+    JSValue booleanWithoutDefaultValue;
+    if (isNullOrUndefined)
+        booleanWithoutDefaultValue = jsUndefined();
+    else {
+        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!booleanWithoutDefaultValue.isUndefined()) {
         result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue nonNullableNodeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nonNullableNode"));
+    JSValue nonNullableNodeValue;
+    if (isNullOrUndefined)
+        nonNullableNodeValue = jsUndefined();
+    else {
+        nonNullableNodeValue = object->get(&state, Identifier::fromString(&state, "nonNullableNode"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!nonNullableNodeValue.isUndefined()) {
         result.nonNullableNode = convert<IDLInterface<Node>>(state, nonNullableNodeValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -839,7 +1115,13 @@
         throwRequiredMemberTypeError(state, throwScope, "nonNullableNode", "TestDictionaryThatShouldNotTolerateNull", "Node");
         return { };
     }
-    JSValue requiredDictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredDictionaryMember"));
+    JSValue requiredDictionaryMemberValue;
+    if (isNullOrUndefined)
+        requiredDictionaryMemberValue = jsUndefined();
+    else {
+        requiredDictionaryMemberValue = object->get(&state, Identifier::fromString(&state, "requiredDictionaryMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!requiredDictionaryMemberValue.isUndefined()) {
         result.requiredDictionaryMember = convert<IDLDictionary<TestObj::Dictionary>>(state, requiredDictionaryMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -847,7 +1129,13 @@
         throwRequiredMemberTypeError(state, throwScope, "requiredDictionaryMember", "TestDictionaryThatShouldNotTolerateNull", "TestDictionary");
         return { };
     }
-    JSValue requiredEnumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue"));
+    JSValue requiredEnumerationValueValue;
+    if (isNullOrUndefined)
+        requiredEnumerationValueValue = jsUndefined();
+    else {
+        requiredEnumerationValueValue = object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!requiredEnumerationValueValue.isUndefined()) {
         result.requiredEnumerationValue = convert<IDLEnumeration<TestObj::EnumType>>(state, requiredEnumerationValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -869,12 +1157,24 @@
         return { };
     }
     TestObj::DictionaryThatShouldTolerateNull result;
-    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+    JSValue booleanWithoutDefaultValue;
+    if (isNullOrUndefined)
+        booleanWithoutDefaultValue = jsUndefined();
+    else {
+        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!booleanWithoutDefaultValue.isUndefined()) {
         result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValue"));
+    JSValue enumerationValueValue;
+    if (isNullOrUndefined)
+        enumerationValueValue = jsUndefined();
+    else {
+        enumerationValueValue = object->get(&state, Identifier::fromString(&state, "enumerationValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!enumerationValueValue.isUndefined()) {
         result.enumerationValue = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -893,12 +1193,24 @@
         return { };
     }
     AlternateDictionaryName result;
-    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+    JSValue booleanWithoutDefaultValue;
+    if (isNullOrUndefined)
+        booleanWithoutDefaultValue = jsUndefined();
+    else {
+        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!booleanWithoutDefaultValue.isUndefined()) {
         result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValue"));
+    JSValue enumerationValueValue;
+    if (isNullOrUndefined)
+        enumerationValueValue = jsUndefined();
+    else {
+        enumerationValueValue = object->get(&state, Identifier::fromString(&state, "enumerationValue"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!enumerationValueValue.isUndefined()) {
         result.enumerationValue = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -917,12 +1229,24 @@
         return { };
     }
     TestObj::ParentDictionary result;
-    JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember1"));
+    JSValue parentMember1Value;
+    if (isNullOrUndefined)
+        parentMember1Value = jsUndefined();
+    else {
+        parentMember1Value = object->get(&state, Identifier::fromString(&state, "parentMember1"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!parentMember1Value.isUndefined()) {
         result.parentMember1 = convert<IDLBoolean>(state, parentMember1Value);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember2"));
+    JSValue parentMember2Value;
+    if (isNullOrUndefined)
+        parentMember2Value = jsUndefined();
+    else {
+        parentMember2Value = object->get(&state, Identifier::fromString(&state, "parentMember2"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!parentMember2Value.isUndefined()) {
         result.parentMember2 = convert<IDLBoolean>(state, parentMember2Value);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -941,22 +1265,46 @@
         return { };
     }
     TestObj::ChildDictionary result;
-    JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember1"));
+    JSValue parentMember1Value;
+    if (isNullOrUndefined)
+        parentMember1Value = jsUndefined();
+    else {
+        parentMember1Value = object->get(&state, Identifier::fromString(&state, "parentMember1"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!parentMember1Value.isUndefined()) {
         result.parentMember1 = convert<IDLBoolean>(state, parentMember1Value);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember2"));
+    JSValue parentMember2Value;
+    if (isNullOrUndefined)
+        parentMember2Value = jsUndefined();
+    else {
+        parentMember2Value = object->get(&state, Identifier::fromString(&state, "parentMember2"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!parentMember2Value.isUndefined()) {
         result.parentMember2 = convert<IDLBoolean>(state, parentMember2Value);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue childMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "childMember1"));
+    JSValue childMember1Value;
+    if (isNullOrUndefined)
+        childMember1Value = jsUndefined();
+    else {
+        childMember1Value = object->get(&state, Identifier::fromString(&state, "childMember1"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!childMember1Value.isUndefined()) {
         result.childMember1 = convert<IDLBoolean>(state, childMember1Value);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue childMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "childMember2"));
+    JSValue childMember2Value;
+    if (isNullOrUndefined)
+        childMember2Value = jsUndefined();
+    else {
+        childMember2Value = object->get(&state, Identifier::fromString(&state, "childMember2"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!childMember2Value.isUndefined()) {
         result.childMember2 = convert<IDLBoolean>(state, childMember2Value);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -977,7 +1325,13 @@
         return { };
     }
     TestObj::ConditionalDictionaryA result;
-    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+    JSValue stringWithoutDefaultValue;
+    if (isNullOrUndefined)
+        stringWithoutDefaultValue = jsUndefined();
+    else {
+        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringWithoutDefaultValue.isUndefined()) {
         result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -1000,7 +1354,13 @@
         return { };
     }
     TestObj::ConditionalDictionaryB result;
-    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+    JSValue stringWithoutDefaultValue;
+    if (isNullOrUndefined)
+        stringWithoutDefaultValue = jsUndefined();
+    else {
+        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringWithoutDefaultValue.isUndefined()) {
         result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -1023,7 +1383,13 @@
         return { };
     }
     TestObj::ConditionalDictionaryC result;
-    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+    JSValue stringWithoutDefaultValue;
+    if (isNullOrUndefined)
+        stringWithoutDefaultValue = jsUndefined();
+    else {
+        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringWithoutDefaultValue.isUndefined()) {
         result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
         RETURN_IF_EXCEPTION(throwScope, { });

Modified: branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp	2018-02-05 02:19:04 UTC (rev 228063)
@@ -51,25 +51,49 @@
         return { };
     }
     TestPromiseRejectionEvent::Init result;
-    JSValue bubblesValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "bubbles"));
+    JSValue bubblesValue;
+    if (isNullOrUndefined)
+        bubblesValue = jsUndefined();
+    else {
+        bubblesValue = object->get(&state, Identifier::fromString(&state, "bubbles"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!bubblesValue.isUndefined()) {
         result.bubbles = convert<IDLBoolean>(state, bubblesValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.bubbles = false;
-    JSValue cancelableValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "cancelable"));
+    JSValue cancelableValue;
+    if (isNullOrUndefined)
+        cancelableValue = jsUndefined();
+    else {
+        cancelableValue = object->get(&state, Identifier::fromString(&state, "cancelable"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!cancelableValue.isUndefined()) {
         result.cancelable = convert<IDLBoolean>(state, cancelableValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.cancelable = false;
-    JSValue composedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "composed"));
+    JSValue composedValue;
+    if (isNullOrUndefined)
+        composedValue = jsUndefined();
+    else {
+        composedValue = object->get(&state, Identifier::fromString(&state, "composed"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!composedValue.isUndefined()) {
         result.composed = convert<IDLBoolean>(state, composedValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     } else
         result.composed = false;
-    JSValue promiseValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "promise"));
+    JSValue promiseValue;
+    if (isNullOrUndefined)
+        promiseValue = jsUndefined();
+    else {
+        promiseValue = object->get(&state, Identifier::fromString(&state, "promise"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!promiseValue.isUndefined()) {
         result.promise = convert<IDLPromise<IDLAny>>(state, promiseValue);
         RETURN_IF_EXCEPTION(throwScope, { });
@@ -77,7 +101,13 @@
         throwRequiredMemberTypeError(state, throwScope, "promise", "TestPromiseRejectionEventInit", "Promise");
         return { };
     }
-    JSValue reasonValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "reason"));
+    JSValue reasonValue;
+    if (isNullOrUndefined)
+        reasonValue = jsUndefined();
+    else {
+        reasonValue = object->get(&state, Identifier::fromString(&state, "reason"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!reasonValue.isUndefined()) {
         result.reason = convert<IDLAny>(state, reasonValue);
         RETURN_IF_EXCEPTION(throwScope, { });

Modified: branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp (228062 => 228063)


--- branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp	2018-02-05 02:19:01 UTC (rev 228062)
+++ branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp	2018-02-05 02:19:04 UTC (rev 228063)
@@ -47,17 +47,35 @@
         return { };
     }
     DictionaryImplName result;
-    JSValue boolMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "boolMember"));
+    JSValue boolMemberValue;
+    if (isNullOrUndefined)
+        boolMemberValue = jsUndefined();
+    else {
+        boolMemberValue = object->get(&state, Identifier::fromString(&state, "boolMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!boolMemberValue.isUndefined()) {
         result.boolMember = convert<IDLBoolean>(state, boolMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue enumMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumMember"));
+    JSValue enumMemberValue;
+    if (isNullOrUndefined)
+        enumMemberValue = jsUndefined();
+    else {
+        enumMemberValue = object->get(&state, Identifier::fromString(&state, "enumMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!enumMemberValue.isUndefined()) {
         result.enumMember = convert<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>>(state, enumMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
     }
-    JSValue stringMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringMember"));
+    JSValue stringMemberValue;
+    if (isNullOrUndefined)
+        stringMemberValue = jsUndefined();
+    else {
+        stringMemberValue = object->get(&state, Identifier::fromString(&state, "stringMember"));
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
     if (!stringMemberValue.isUndefined()) {
         result.stringMember = convert<IDLDOMString>(state, stringMemberValue);
         RETURN_IF_EXCEPTION(throwScope, { });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to