Changeset 228063 in webkit


Ignore:
Timestamp:
Feb 4, 2018 6:19:04 PM (6 years ago)
Author:
jmarcell@apple.com
Message:

Cherry-pick r227985. rdar://problem/37145479

Location:
branches/safari-605-branch
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-605-branch/LayoutTests/ChangeLog

    r228062 r228063  
     12018-02-04  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227985. rdar://problem/37145479
     4
     5    2018-02-01  Chris Dumez  <cdumez@apple.com>
     6
     7            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
     8            https://bugs.webkit.org/show_bug.cgi?id=182392
     9            <rdar://problem/37119215>
     10
     11            Reviewed by Geoffrey Garen.
     12
     13            Rebaseline existing test now that output is slightly different.
     14
     15            * fast/events/constructors/message-event-constructor-expected.txt:
     16
    1172018-02-04  Jason Marcell  <jmarcell@apple.com>
    218
  • branches/safari-605-branch/LayoutTests/fast/events/constructors/message-event-constructor-expected.txt

    r207381 r228063  
    9494PASS new MessageEvent('eventType', { ports: NaN }).ports threw exception TypeError: Value is not a sequence.
    9595PASS new MessageEvent('eventType', { get ports() { return 123; } }).ports threw exception TypeError: Value is not a sequence.
    96 PASS new MessageEvent('eventType', { get ports() { throw 'MessageEvent Error'; } }) threw exception TypeError: Value is not a sequence.
     96PASS new MessageEvent('eventType', { get ports() { throw 'MessageEvent Error'; } }) threw exception MessageEvent Error.
    9797PASS new MessageEvent('eventType', { ports: {valueOf: function () { return [channel.port1, channel.port2, channel.port2]; } } }).ports[0] threw exception TypeError: Type error.
    9898PASS 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
  • branches/safari-605-branch/LayoutTests/imported/w3c/ChangeLog

    r228060 r228063  
     12018-02-04  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227985. rdar://problem/37145479
     4
     5    2018-02-01  Chris Dumez  <cdumez@apple.com>
     6
     7            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
     8            https://bugs.webkit.org/show_bug.cgi?id=182392
     9            <rdar://problem/37119215>
     10
     11            Reviewed by Geoffrey Garen.
     12
     13            Rebaseline WPT test now that all checks are passing.
     14
     15            * web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https-expected.txt:
     16
    1172018-02-04  Jason Marcell  <jmarcell@apple.com>
    218
  • branches/safari-605-branch/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/ServiceWorkerGlobalScope/extendable-message-event-constructor.https-expected.txt

    r226086 r228063  
    88PASS `lastEventId` is specified
    99PASS `source` is specified
    10 FAIL `ports` is specified assert_throws: function "function () {
    11       createEvent({ get ports() { throw { name: 'Error' }; } }); }" threw object "TypeError: Value is not a sequence" ("TypeError") expected object "[object Object]" ("Error")
     10PASS `ports` is specified
    1211PASS all initial values are specified
    1312
  • branches/safari-605-branch/Source/WebCore/ChangeLog

    r228062 r228063  
     12018-02-04  Jason Marcell  <jmarcell@apple.com>
     2
     3        Cherry-pick r227985. rdar://problem/37145479
     4
     5    2018-02-01  Chris Dumez  <cdumez@apple.com>
     6
     7            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
     8            https://bugs.webkit.org/show_bug.cgi?id=182392
     9            <rdar://problem/37119215>
     10
     11            Reviewed by Geoffrey Garen.
     12
     13            Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>(),
     14            given that getting the property from the object can throw an exception.
     15
     16            No new tests, rebaselined existing test.
     17
     18            * bindings/scripts/CodeGeneratorJS.pm:
     19            (GenerateDictionaryImplementationContent):
     20            * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
     21            (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
     22            * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
     23            (WebCore::convertDictionary<TestEventConstructor::Init>):
     24            * bindings/scripts/test/JS/JSTestObj.cpp:
     25            (WebCore::convertDictionary<TestObj::Dictionary>):
     26            (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
     27            (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
     28            (WebCore::convertDictionary<AlternateDictionaryName>):
     29            (WebCore::convertDictionary<TestObj::ParentDictionary>):
     30            (WebCore::convertDictionary<TestObj::ChildDictionary>):
     31            (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
     32            (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
     33            (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
     34            * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
     35            (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
     36            * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
     37            (WebCore::convertDictionary<DictionaryImplName>):
     38
    1392018-02-04  Jason Marcell  <jmarcell@apple.com>
    240
  • branches/safari-605-branch/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r226088 r228063  
    23202320
    23212321            # 4.2. Let value be an ECMAScript value, depending on Type(V):
    2322             $result .= "    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, \"${key}\"));\n";
     2322            $result .= "    JSValue ${key}Value;\n";
     2323            $result .= "    if (isNullOrUndefined)\n";
     2324            $result .= "        ${key}Value = jsUndefined();\n";
     2325            $result .= "    else {\n";
     2326            $result .= "        ${key}Value = object->get(&state, Identifier::fromString(&state, \"${key}\"));\n";
     2327            $result .= "        RETURN_IF_EXCEPTION(throwScope, { });\n";
     2328            $result .= "    }\n";
    23232329
    23242330            my $IDLType = GetIDLType($typeScope, $type);
  • branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp

    r224309 r228063  
    9191    }
    9292    TestCallbackInterface::Dictionary result;
    93     JSValue optionalMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "optionalMember"));
     93    JSValue optionalMemberValue;
     94    if (isNullOrUndefined)
     95        optionalMemberValue = jsUndefined();
     96    else {
     97        optionalMemberValue = object->get(&state, Identifier::fromString(&state, "optionalMember"));
     98        RETURN_IF_EXCEPTION(throwScope, { });
     99    }
    94100    if (!optionalMemberValue.isUndefined()) {
    95101        result.optionalMember = convert<IDLLong>(state, optionalMemberValue);
    96102        RETURN_IF_EXCEPTION(throwScope, { });
    97103    }
    98     JSValue requiredMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredMember"));
     104    JSValue requiredMemberValue;
     105    if (isNullOrUndefined)
     106        requiredMemberValue = jsUndefined();
     107    else {
     108        requiredMemberValue = object->get(&state, Identifier::fromString(&state, "requiredMember"));
     109        RETURN_IF_EXCEPTION(throwScope, { });
     110    }
    99111    if (!requiredMemberValue.isUndefined()) {
    100112        result.requiredMember = convert<IDLUSVString>(state, requiredMemberValue);
  • branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r223476 r228063  
    4848    }
    4949    TestEventConstructor::Init result;
    50     JSValue bubblesValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "bubbles"));
     50    JSValue bubblesValue;
     51    if (isNullOrUndefined)
     52        bubblesValue = jsUndefined();
     53    else {
     54        bubblesValue = object->get(&state, Identifier::fromString(&state, "bubbles"));
     55        RETURN_IF_EXCEPTION(throwScope, { });
     56    }
    5157    if (!bubblesValue.isUndefined()) {
    5258        result.bubbles = convert<IDLBoolean>(state, bubblesValue);
     
    5460    } else
    5561        result.bubbles = false;
    56     JSValue cancelableValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "cancelable"));
     62    JSValue cancelableValue;
     63    if (isNullOrUndefined)
     64        cancelableValue = jsUndefined();
     65    else {
     66        cancelableValue = object->get(&state, Identifier::fromString(&state, "cancelable"));
     67        RETURN_IF_EXCEPTION(throwScope, { });
     68    }
    5769    if (!cancelableValue.isUndefined()) {
    5870        result.cancelable = convert<IDLBoolean>(state, cancelableValue);
     
    6072    } else
    6173        result.cancelable = false;
    62     JSValue composedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "composed"));
     74    JSValue composedValue;
     75    if (isNullOrUndefined)
     76        composedValue = jsUndefined();
     77    else {
     78        composedValue = object->get(&state, Identifier::fromString(&state, "composed"));
     79        RETURN_IF_EXCEPTION(throwScope, { });
     80    }
    6381    if (!composedValue.isUndefined()) {
    6482        result.composed = convert<IDLBoolean>(state, composedValue);
     
    6684    } else
    6785        result.composed = false;
    68     JSValue attr2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "attr2"));
     86    JSValue attr2Value;
     87    if (isNullOrUndefined)
     88        attr2Value = jsUndefined();
     89    else {
     90        attr2Value = object->get(&state, Identifier::fromString(&state, "attr2"));
     91        RETURN_IF_EXCEPTION(throwScope, { });
     92    }
    6993    if (!attr2Value.isUndefined()) {
    7094        result.attr2 = convert<IDLDOMString>(state, attr2Value);
     
    7296    } else
    7397        result.attr2 = emptyString();
    74     JSValue attr3Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "attr3"));
     98    JSValue attr3Value;
     99    if (isNullOrUndefined)
     100        attr3Value = jsUndefined();
     101    else {
     102        attr3Value = object->get(&state, Identifier::fromString(&state, "attr3"));
     103        RETURN_IF_EXCEPTION(throwScope, { });
     104    }
    75105    if (!attr3Value.isUndefined()) {
    76106        result.attr3 = convert<IDLDOMString>(state, attr3Value);
  • branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r223476 r228063  
    429429    }
    430430    TestObj::Dictionary result;
    431     JSValue annotatedTypeInSequenceMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "annotatedTypeInSequenceMember"));
     431    JSValue annotatedTypeInSequenceMemberValue;
     432    if (isNullOrUndefined)
     433        annotatedTypeInSequenceMemberValue = jsUndefined();
     434    else {
     435        annotatedTypeInSequenceMemberValue = object->get(&state, Identifier::fromString(&state, "annotatedTypeInSequenceMember"));
     436        RETURN_IF_EXCEPTION(throwScope, { });
     437    }
    432438    if (!annotatedTypeInSequenceMemberValue.isUndefined()) {
    433439        result.annotatedTypeInSequenceMember = convert<IDLSequence<IDLClampAdaptor<IDLLong>>>(state, annotatedTypeInSequenceMemberValue);
    434440        RETURN_IF_EXCEPTION(throwScope, { });
    435441    }
    436     JSValue annotatedTypeInUnionMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "annotatedTypeInUnionMember"));
     442    JSValue annotatedTypeInUnionMemberValue;
     443    if (isNullOrUndefined)
     444        annotatedTypeInUnionMemberValue = jsUndefined();
     445    else {
     446        annotatedTypeInUnionMemberValue = object->get(&state, Identifier::fromString(&state, "annotatedTypeInUnionMember"));
     447        RETURN_IF_EXCEPTION(throwScope, { });
     448    }
    437449    if (!annotatedTypeInUnionMemberValue.isUndefined()) {
    438450        result.annotatedTypeInUnionMember = convert<IDLUnion<IDLDOMString, IDLClampAdaptor<IDLLong>>>(state, annotatedTypeInUnionMemberValue);
    439451        RETURN_IF_EXCEPTION(throwScope, { });
    440452    }
    441     JSValue anyTypedefValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyTypedefValue"));
     453    JSValue anyTypedefValueValue;
     454    if (isNullOrUndefined)
     455        anyTypedefValueValue = jsUndefined();
     456    else {
     457        anyTypedefValueValue = object->get(&state, Identifier::fromString(&state, "anyTypedefValue"));
     458        RETURN_IF_EXCEPTION(throwScope, { });
     459    }
    442460    if (!anyTypedefValueValue.isUndefined()) {
    443461        result.anyTypedefValue = convert<IDLAny>(state, anyTypedefValueValue);
     
    445463    } else
    446464        result.anyTypedefValue = jsUndefined();
    447     JSValue anyValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyValue"));
     465    JSValue anyValueValue;
     466    if (isNullOrUndefined)
     467        anyValueValue = jsUndefined();
     468    else {
     469        anyValueValue = object->get(&state, Identifier::fromString(&state, "anyValue"));
     470        RETURN_IF_EXCEPTION(throwScope, { });
     471    }
    448472    if (!anyValueValue.isUndefined()) {
    449473        result.anyValue = convert<IDLAny>(state, anyValueValue);
     
    451475    } else
    452476        result.anyValue = jsUndefined();
    453     JSValue anyValueWithNullDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyValueWithNullDefault"));
     477    JSValue anyValueWithNullDefaultValue;
     478    if (isNullOrUndefined)
     479        anyValueWithNullDefaultValue = jsUndefined();
     480    else {
     481        anyValueWithNullDefaultValue = object->get(&state, Identifier::fromString(&state, "anyValueWithNullDefault"));
     482        RETURN_IF_EXCEPTION(throwScope, { });
     483    }
    454484    if (!anyValueWithNullDefaultValue.isUndefined()) {
    455485        result.anyValueWithNullDefault = convert<IDLAny>(state, anyValueWithNullDefaultValue);
     
    457487    } else
    458488        result.anyValueWithNullDefault = jsNull();
    459     JSValue booleanWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithDefault"));
     489    JSValue booleanWithDefaultValue;
     490    if (isNullOrUndefined)
     491        booleanWithDefaultValue = jsUndefined();
     492    else {
     493        booleanWithDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithDefault"));
     494        RETURN_IF_EXCEPTION(throwScope, { });
     495    }
    460496    if (!booleanWithDefaultValue.isUndefined()) {
    461497        result.booleanWithDefault = convert<IDLBoolean>(state, booleanWithDefaultValue);
     
    463499    } else
    464500        result.booleanWithDefault = false;
    465     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     501    JSValue booleanWithoutDefaultValue;
     502    if (isNullOrUndefined)
     503        booleanWithoutDefaultValue = jsUndefined();
     504    else {
     505        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     506        RETURN_IF_EXCEPTION(throwScope, { });
     507    }
    466508    if (!booleanWithoutDefaultValue.isUndefined()) {
    467509        result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
    468510        RETURN_IF_EXCEPTION(throwScope, { });
    469511    }
    470     JSValue bufferSourceValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "bufferSourceValue"));
     512    JSValue bufferSourceValueValue;
     513    if (isNullOrUndefined)
     514        bufferSourceValueValue = jsUndefined();
     515    else {
     516        bufferSourceValueValue = object->get(&state, Identifier::fromString(&state, "bufferSourceValue"));
     517        RETURN_IF_EXCEPTION(throwScope, { });
     518    }
    471519    if (!bufferSourceValueValue.isUndefined()) {
    472520        result.bufferSourceValue = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, bufferSourceValueValue);
    473521        RETURN_IF_EXCEPTION(throwScope, { });
    474522    }
    475     JSValue dictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "dictionaryMember"));
     523    JSValue dictionaryMemberValue;
     524    if (isNullOrUndefined)
     525        dictionaryMemberValue = jsUndefined();
     526    else {
     527        dictionaryMemberValue = object->get(&state, Identifier::fromString(&state, "dictionaryMember"));
     528        RETURN_IF_EXCEPTION(throwScope, { });
     529    }
    476530    if (!dictionaryMemberValue.isUndefined()) {
    477531        result.dictionaryMember = convert<IDLDictionary<TestObj::DictionaryThatShouldTolerateNull>>(state, dictionaryMemberValue);
    478532        RETURN_IF_EXCEPTION(throwScope, { });
    479533    }
    480     JSValue enumerationValueWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithDefault"));
     534    JSValue enumerationValueWithDefaultValue;
     535    if (isNullOrUndefined)
     536        enumerationValueWithDefaultValue = jsUndefined();
     537    else {
     538        enumerationValueWithDefaultValue = object->get(&state, Identifier::fromString(&state, "enumerationValueWithDefault"));
     539        RETURN_IF_EXCEPTION(throwScope, { });
     540    }
    481541    if (!enumerationValueWithDefaultValue.isUndefined()) {
    482542        result.enumerationValueWithDefault = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueWithDefaultValue);
     
    484544    } else
    485545        result.enumerationValueWithDefault = TestObj::EnumType::EnumValue1;
    486     JSValue enumerationValueWithEmptyStringDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithEmptyStringDefault"));
     546    JSValue enumerationValueWithEmptyStringDefaultValue;
     547    if (isNullOrUndefined)
     548        enumerationValueWithEmptyStringDefaultValue = jsUndefined();
     549    else {
     550        enumerationValueWithEmptyStringDefaultValue = object->get(&state, Identifier::fromString(&state, "enumerationValueWithEmptyStringDefault"));
     551        RETURN_IF_EXCEPTION(throwScope, { });
     552    }
    487553    if (!enumerationValueWithEmptyStringDefaultValue.isUndefined()) {
    488554        result.enumerationValueWithEmptyStringDefault = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueWithEmptyStringDefaultValue);
     
    490556    } else
    491557        result.enumerationValueWithEmptyStringDefault = TestObj::EnumType::EmptyString;
    492     JSValue enumerationValueWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithoutDefault"));
     558    JSValue enumerationValueWithoutDefaultValue;
     559    if (isNullOrUndefined)
     560        enumerationValueWithoutDefaultValue = jsUndefined();
     561    else {
     562        enumerationValueWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "enumerationValueWithoutDefault"));
     563        RETURN_IF_EXCEPTION(throwScope, { });
     564    }
    493565    if (!enumerationValueWithoutDefaultValue.isUndefined()) {
    494566        result.enumerationValueWithoutDefault = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueWithoutDefaultValue);
    495567        RETURN_IF_EXCEPTION(throwScope, { });
    496568    }
    497     JSValue fooAliasValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "fooAlias"));
     569    JSValue fooAliasValue;
     570    if (isNullOrUndefined)
     571        fooAliasValue = jsUndefined();
     572    else {
     573        fooAliasValue = object->get(&state, Identifier::fromString(&state, "fooAlias"));
     574        RETURN_IF_EXCEPTION(throwScope, { });
     575    }
    498576    if (!fooAliasValue.isUndefined()) {
    499577        result.foo = convert<IDLAny>(state, fooAliasValue);
     
    501579    } else
    502580        result.foo = jsUndefined();
    503     JSValue fooWithDefaultAliasValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "fooWithDefaultAlias"));
     581    JSValue fooWithDefaultAliasValue;
     582    if (isNullOrUndefined)
     583        fooWithDefaultAliasValue = jsUndefined();
     584    else {
     585        fooWithDefaultAliasValue = object->get(&state, Identifier::fromString(&state, "fooWithDefaultAlias"));
     586        RETURN_IF_EXCEPTION(throwScope, { });
     587    }
    504588    if (!fooWithDefaultAliasValue.isUndefined()) {
    505589        result.fooWithDefault = convert<IDLAny>(state, fooWithDefaultAliasValue);
     
    507591    } else
    508592        result.fooWithDefault = 0;
    509     JSValue integerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "integer"));
     593    JSValue integerValue;
     594    if (isNullOrUndefined)
     595        integerValue = jsUndefined();
     596    else {
     597        integerValue = object->get(&state, Identifier::fromString(&state, "integer"));
     598        RETURN_IF_EXCEPTION(throwScope, { });
     599    }
    510600    if (!integerValue.isUndefined()) {
    511601        result.integer = convert<IDLLong>(state, integerValue);
    512602        RETURN_IF_EXCEPTION(throwScope, { });
    513603    }
    514     JSValue integerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "integerWithDefault"));
     604    JSValue integerWithDefaultValue;
     605    if (isNullOrUndefined)
     606        integerWithDefaultValue = jsUndefined();
     607    else {
     608        integerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "integerWithDefault"));
     609        RETURN_IF_EXCEPTION(throwScope, { });
     610    }
    515611    if (!integerWithDefaultValue.isUndefined()) {
    516612        result.integerWithDefault = convert<IDLLong>(state, integerWithDefaultValue);
     
    518614    } else
    519615        result.integerWithDefault = 0;
    520     JSValue largeIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "largeInteger"));
     616    JSValue largeIntegerValue;
     617    if (isNullOrUndefined)
     618        largeIntegerValue = jsUndefined();
     619    else {
     620        largeIntegerValue = object->get(&state, Identifier::fromString(&state, "largeInteger"));
     621        RETURN_IF_EXCEPTION(throwScope, { });
     622    }
    521623    if (!largeIntegerValue.isUndefined()) {
    522624        result.largeInteger = convert<IDLLongLong>(state, largeIntegerValue);
    523625        RETURN_IF_EXCEPTION(throwScope, { });
    524626    }
    525     JSValue largeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "largeIntegerWithDefault"));
     627    JSValue largeIntegerWithDefaultValue;
     628    if (isNullOrUndefined)
     629        largeIntegerWithDefaultValue = jsUndefined();
     630    else {
     631        largeIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "largeIntegerWithDefault"));
     632        RETURN_IF_EXCEPTION(throwScope, { });
     633    }
    526634    if (!largeIntegerWithDefaultValue.isUndefined()) {
    527635        result.largeIntegerWithDefault = convert<IDLLongLong>(state, largeIntegerWithDefaultValue);
     
    529637    } else
    530638        result.largeIntegerWithDefault = 0;
    531     JSValue nullableIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableIntegerWithDefault"));
     639    JSValue nullableIntegerWithDefaultValue;
     640    if (isNullOrUndefined)
     641        nullableIntegerWithDefaultValue = jsUndefined();
     642    else {
     643        nullableIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "nullableIntegerWithDefault"));
     644        RETURN_IF_EXCEPTION(throwScope, { });
     645    }
    532646    if (!nullableIntegerWithDefaultValue.isUndefined()) {
    533647        result.nullableIntegerWithDefault = convert<IDLNullable<IDLLong>>(state, nullableIntegerWithDefaultValue);
     
    535649    } else
    536650        result.nullableIntegerWithDefault = std::nullopt;
    537     JSValue nullableNodeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableNode"));
     651    JSValue nullableNodeValue;
     652    if (isNullOrUndefined)
     653        nullableNodeValue = jsUndefined();
     654    else {
     655        nullableNodeValue = object->get(&state, Identifier::fromString(&state, "nullableNode"));
     656        RETURN_IF_EXCEPTION(throwScope, { });
     657    }
    538658    if (!nullableNodeValue.isUndefined()) {
    539659        result.nullableNode = convert<IDLNullable<IDLInterface<Node>>>(state, nullableNodeValue);
     
    541661    } else
    542662        result.nullableNode = nullptr;
    543     JSValue nullableStringWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableStringWithDefault"));
     663    JSValue nullableStringWithDefaultValue;
     664    if (isNullOrUndefined)
     665        nullableStringWithDefaultValue = jsUndefined();
     666    else {
     667        nullableStringWithDefaultValue = object->get(&state, Identifier::fromString(&state, "nullableStringWithDefault"));
     668        RETURN_IF_EXCEPTION(throwScope, { });
     669    }
    544670    if (!nullableStringWithDefaultValue.isUndefined()) {
    545671        result.nullableStringWithDefault = convert<IDLNullable<IDLDOMString>>(state, nullableStringWithDefaultValue);
     
    547673    } else
    548674        result.nullableStringWithDefault = String();
    549     JSValue nullableUnionMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableUnionMember"));
     675    JSValue nullableUnionMemberValue;
     676    if (isNullOrUndefined)
     677        nullableUnionMemberValue = jsUndefined();
     678    else {
     679        nullableUnionMemberValue = object->get(&state, Identifier::fromString(&state, "nullableUnionMember"));
     680        RETURN_IF_EXCEPTION(throwScope, { });
     681    }
    550682    if (!nullableUnionMemberValue.isUndefined()) {
    551683        result.nullableUnionMember = convert<IDLNullable<IDLUnion<IDLLong, IDLInterface<Node>>>>(state, nullableUnionMemberValue);
     
    553685    } else
    554686        result.nullableUnionMember = std::nullopt;
    555     JSValue requiredBufferSourceValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredBufferSourceValue"));
     687    JSValue requiredBufferSourceValueValue;
     688    if (isNullOrUndefined)
     689        requiredBufferSourceValueValue = jsUndefined();
     690    else {
     691        requiredBufferSourceValueValue = object->get(&state, Identifier::fromString(&state, "requiredBufferSourceValue"));
     692        RETURN_IF_EXCEPTION(throwScope, { });
     693    }
    556694    if (!requiredBufferSourceValueValue.isUndefined()) {
    557695        result.requiredBufferSourceValue = convert<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>(state, requiredBufferSourceValueValue);
     
    561699        return { };
    562700    }
    563     JSValue restrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedDouble"));
     701    JSValue restrictedDoubleValue;
     702    if (isNullOrUndefined)
     703        restrictedDoubleValue = jsUndefined();
     704    else {
     705        restrictedDoubleValue = object->get(&state, Identifier::fromString(&state, "restrictedDouble"));
     706        RETURN_IF_EXCEPTION(throwScope, { });
     707    }
    564708    if (!restrictedDoubleValue.isUndefined()) {
    565709        result.restrictedDouble = convert<IDLDouble>(state, restrictedDoubleValue);
    566710        RETURN_IF_EXCEPTION(throwScope, { });
    567711    }
    568     JSValue restrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedDoubleWithDefault"));
     712    JSValue restrictedDoubleWithDefaultValue;
     713    if (isNullOrUndefined)
     714        restrictedDoubleWithDefaultValue = jsUndefined();
     715    else {
     716        restrictedDoubleWithDefaultValue = object->get(&state, Identifier::fromString(&state, "restrictedDoubleWithDefault"));
     717        RETURN_IF_EXCEPTION(throwScope, { });
     718    }
    569719    if (!restrictedDoubleWithDefaultValue.isUndefined()) {
    570720        result.restrictedDoubleWithDefault = convert<IDLDouble>(state, restrictedDoubleWithDefaultValue);
     
    572722    } else
    573723        result.restrictedDoubleWithDefault = 0;
    574     JSValue restrictedFloatValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedFloat"));
     724    JSValue restrictedFloatValue;
     725    if (isNullOrUndefined)
     726        restrictedFloatValue = jsUndefined();
     727    else {
     728        restrictedFloatValue = object->get(&state, Identifier::fromString(&state, "restrictedFloat"));
     729        RETURN_IF_EXCEPTION(throwScope, { });
     730    }
    575731    if (!restrictedFloatValue.isUndefined()) {
    576732        result.restrictedFloat = convert<IDLFloat>(state, restrictedFloatValue);
    577733        RETURN_IF_EXCEPTION(throwScope, { });
    578734    }
    579     JSValue restrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedFloatWithDefault"));
     735    JSValue restrictedFloatWithDefaultValue;
     736    if (isNullOrUndefined)
     737        restrictedFloatWithDefaultValue = jsUndefined();
     738    else {
     739        restrictedFloatWithDefaultValue = object->get(&state, Identifier::fromString(&state, "restrictedFloatWithDefault"));
     740        RETURN_IF_EXCEPTION(throwScope, { });
     741    }
    580742    if (!restrictedFloatWithDefaultValue.isUndefined()) {
    581743        result.restrictedFloatWithDefault = convert<IDLFloat>(state, restrictedFloatWithDefaultValue);
     
    583745    } else
    584746        result.restrictedFloatWithDefault = 0;
    585     JSValue sequenceOfStringsValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "sequenceOfStrings"));
     747    JSValue sequenceOfStringsValue;
     748    if (isNullOrUndefined)
     749        sequenceOfStringsValue = jsUndefined();
     750    else {
     751        sequenceOfStringsValue = object->get(&state, Identifier::fromString(&state, "sequenceOfStrings"));
     752        RETURN_IF_EXCEPTION(throwScope, { });
     753    }
    586754    if (!sequenceOfStringsValue.isUndefined()) {
    587755        result.sequenceOfStrings = convert<IDLSequence<IDLDOMString>>(state, sequenceOfStringsValue);
    588756        RETURN_IF_EXCEPTION(throwScope, { });
    589757    }
    590     JSValue smallIntegerClampedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallIntegerClamped"));
     758    JSValue smallIntegerClampedValue;
     759    if (isNullOrUndefined)
     760        smallIntegerClampedValue = jsUndefined();
     761    else {
     762        smallIntegerClampedValue = object->get(&state, Identifier::fromString(&state, "smallIntegerClamped"));
     763        RETURN_IF_EXCEPTION(throwScope, { });
     764    }
    591765    if (!smallIntegerClampedValue.isUndefined()) {
    592766        result.smallIntegerClamped = convert<IDLClampAdaptor<IDLByte>>(state, smallIntegerClampedValue);
    593767        RETURN_IF_EXCEPTION(throwScope, { });
    594768    }
    595     JSValue smallIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallIntegerWithDefault"));
     769    JSValue smallIntegerWithDefaultValue;
     770    if (isNullOrUndefined)
     771        smallIntegerWithDefaultValue = jsUndefined();
     772    else {
     773        smallIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "smallIntegerWithDefault"));
     774        RETURN_IF_EXCEPTION(throwScope, { });
     775    }
    596776    if (!smallIntegerWithDefaultValue.isUndefined()) {
    597777        result.smallIntegerWithDefault = convert<IDLByte>(state, smallIntegerWithDefaultValue);
    598778        RETURN_IF_EXCEPTION(throwScope, { });
    599779    }
    600     JSValue smallUnsignedIntegerEnforcedRangeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerEnforcedRange"));
     780    JSValue smallUnsignedIntegerEnforcedRangeValue;
     781    if (isNullOrUndefined)
     782        smallUnsignedIntegerEnforcedRangeValue = jsUndefined();
     783    else {
     784        smallUnsignedIntegerEnforcedRangeValue = object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerEnforcedRange"));
     785        RETURN_IF_EXCEPTION(throwScope, { });
     786    }
    601787    if (!smallUnsignedIntegerEnforcedRangeValue.isUndefined()) {
    602788        result.smallUnsignedIntegerEnforcedRange = convert<IDLEnforceRangeAdaptor<IDLOctet>>(state, smallUnsignedIntegerEnforcedRangeValue);
    603789        RETURN_IF_EXCEPTION(throwScope, { });
    604790    }
    605     JSValue smallUnsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerWithDefault"));
     791    JSValue smallUnsignedIntegerWithDefaultValue;
     792    if (isNullOrUndefined)
     793        smallUnsignedIntegerWithDefaultValue = jsUndefined();
     794    else {
     795        smallUnsignedIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerWithDefault"));
     796        RETURN_IF_EXCEPTION(throwScope, { });
     797    }
    606798    if (!smallUnsignedIntegerWithDefaultValue.isUndefined()) {
    607799        result.smallUnsignedIntegerWithDefault = convert<IDLOctet>(state, smallUnsignedIntegerWithDefaultValue);
     
    609801    } else
    610802        result.smallUnsignedIntegerWithDefault = 0;
    611     JSValue stringTreatNullAsEmptyStringValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringTreatNullAsEmptyString"));
     803    JSValue stringTreatNullAsEmptyStringValue;
     804    if (isNullOrUndefined)
     805        stringTreatNullAsEmptyStringValue = jsUndefined();
     806    else {
     807        stringTreatNullAsEmptyStringValue = object->get(&state, Identifier::fromString(&state, "stringTreatNullAsEmptyString"));
     808        RETURN_IF_EXCEPTION(throwScope, { });
     809    }
    612810    if (!stringTreatNullAsEmptyStringValue.isUndefined()) {
    613811        result.stringTreatNullAsEmptyString = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, stringTreatNullAsEmptyStringValue);
    614812        RETURN_IF_EXCEPTION(throwScope, { });
    615813    }
    616     JSValue stringWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithDefault"));
     814    JSValue stringWithDefaultValue;
     815    if (isNullOrUndefined)
     816        stringWithDefaultValue = jsUndefined();
     817    else {
     818        stringWithDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithDefault"));
     819        RETURN_IF_EXCEPTION(throwScope, { });
     820    }
    617821    if (!stringWithDefaultValue.isUndefined()) {
    618822        result.stringWithDefault = convert<IDLDOMString>(state, stringWithDefaultValue);
     
    620824    } else
    621825        result.stringWithDefault = ASCIILiteral("defaultString");
    622     JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     826    JSValue stringWithoutDefaultValue;
     827    if (isNullOrUndefined)
     828        stringWithoutDefaultValue = jsUndefined();
     829    else {
     830        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     831        RETURN_IF_EXCEPTION(throwScope, { });
     832    }
    623833    if (!stringWithoutDefaultValue.isUndefined()) {
    624834        result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
    625835        RETURN_IF_EXCEPTION(throwScope, { });
    626836    }
    627     JSValue unionMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unionMember"));
     837    JSValue unionMemberValue;
     838    if (isNullOrUndefined)
     839        unionMemberValue = jsUndefined();
     840    else {
     841        unionMemberValue = object->get(&state, Identifier::fromString(&state, "unionMember"));
     842        RETURN_IF_EXCEPTION(throwScope, { });
     843    }
    628844    if (!unionMemberValue.isUndefined()) {
    629845        result.unionMember = convert<IDLUnion<IDLLong, IDLInterface<Node>>>(state, unionMemberValue);
    630846        RETURN_IF_EXCEPTION(throwScope, { });
    631847    }
    632     JSValue unrestrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedDouble"));
     848    JSValue unrestrictedDoubleValue;
     849    if (isNullOrUndefined)
     850        unrestrictedDoubleValue = jsUndefined();
     851    else {
     852        unrestrictedDoubleValue = object->get(&state, Identifier::fromString(&state, "unrestrictedDouble"));
     853        RETURN_IF_EXCEPTION(throwScope, { });
     854    }
    633855    if (!unrestrictedDoubleValue.isUndefined()) {
    634856        result.unrestrictedDouble = convert<IDLUnrestrictedDouble>(state, unrestrictedDoubleValue);
    635857        RETURN_IF_EXCEPTION(throwScope, { });
    636858    }
    637     JSValue unrestrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedDoubleWithDefault"));
     859    JSValue unrestrictedDoubleWithDefaultValue;
     860    if (isNullOrUndefined)
     861        unrestrictedDoubleWithDefaultValue = jsUndefined();
     862    else {
     863        unrestrictedDoubleWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unrestrictedDoubleWithDefault"));
     864        RETURN_IF_EXCEPTION(throwScope, { });
     865    }
    638866    if (!unrestrictedDoubleWithDefaultValue.isUndefined()) {
    639867        result.unrestrictedDoubleWithDefault = convert<IDLUnrestrictedDouble>(state, unrestrictedDoubleWithDefaultValue);
     
    641869    } else
    642870        result.unrestrictedDoubleWithDefault = 0;
    643     JSValue unrestrictedFloatValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedFloat"));
     871    JSValue unrestrictedFloatValue;
     872    if (isNullOrUndefined)
     873        unrestrictedFloatValue = jsUndefined();
     874    else {
     875        unrestrictedFloatValue = object->get(&state, Identifier::fromString(&state, "unrestrictedFloat"));
     876        RETURN_IF_EXCEPTION(throwScope, { });
     877    }
    644878    if (!unrestrictedFloatValue.isUndefined()) {
    645879        result.unrestrictedFloat = convert<IDLUnrestrictedFloat>(state, unrestrictedFloatValue);
    646880        RETURN_IF_EXCEPTION(throwScope, { });
    647881    }
    648     JSValue unrestrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedFloatWithDefault"));
     882    JSValue unrestrictedFloatWithDefaultValue;
     883    if (isNullOrUndefined)
     884        unrestrictedFloatWithDefaultValue = jsUndefined();
     885    else {
     886        unrestrictedFloatWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unrestrictedFloatWithDefault"));
     887        RETURN_IF_EXCEPTION(throwScope, { });
     888    }
    649889    if (!unrestrictedFloatWithDefaultValue.isUndefined()) {
    650890        result.unrestrictedFloatWithDefault = convert<IDLUnrestrictedFloat>(state, unrestrictedFloatWithDefaultValue);
     
    652892    } else
    653893        result.unrestrictedFloatWithDefault = 0;
    654     JSValue unsignedIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedInteger"));
     894    JSValue unsignedIntegerValue;
     895    if (isNullOrUndefined)
     896        unsignedIntegerValue = jsUndefined();
     897    else {
     898        unsignedIntegerValue = object->get(&state, Identifier::fromString(&state, "unsignedInteger"));
     899        RETURN_IF_EXCEPTION(throwScope, { });
     900    }
    655901    if (!unsignedIntegerValue.isUndefined()) {
    656902        result.unsignedInteger = convert<IDLUnsignedLong>(state, unsignedIntegerValue);
    657903        RETURN_IF_EXCEPTION(throwScope, { });
    658904    }
    659     JSValue unsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedIntegerWithDefault"));
     905    JSValue unsignedIntegerWithDefaultValue;
     906    if (isNullOrUndefined)
     907        unsignedIntegerWithDefaultValue = jsUndefined();
     908    else {
     909        unsignedIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unsignedIntegerWithDefault"));
     910        RETURN_IF_EXCEPTION(throwScope, { });
     911    }
    660912    if (!unsignedIntegerWithDefaultValue.isUndefined()) {
    661913        result.unsignedIntegerWithDefault = convert<IDLUnsignedLong>(state, unsignedIntegerWithDefaultValue);
     
    663915    } else
    664916        result.unsignedIntegerWithDefault = 0;
    665     JSValue unsignedLargeIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedLargeInteger"));
     917    JSValue unsignedLargeIntegerValue;
     918    if (isNullOrUndefined)
     919        unsignedLargeIntegerValue = jsUndefined();
     920    else {
     921        unsignedLargeIntegerValue = object->get(&state, Identifier::fromString(&state, "unsignedLargeInteger"));
     922        RETURN_IF_EXCEPTION(throwScope, { });
     923    }
    666924    if (!unsignedLargeIntegerValue.isUndefined()) {
    667925        result.unsignedLargeInteger = convert<IDLUnsignedLongLong>(state, unsignedLargeIntegerValue);
    668926        RETURN_IF_EXCEPTION(throwScope, { });
    669927    }
    670     JSValue unsignedLargeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedLargeIntegerWithDefault"));
     928    JSValue unsignedLargeIntegerWithDefaultValue;
     929    if (isNullOrUndefined)
     930        unsignedLargeIntegerWithDefaultValue = jsUndefined();
     931    else {
     932        unsignedLargeIntegerWithDefaultValue = object->get(&state, Identifier::fromString(&state, "unsignedLargeIntegerWithDefault"));
     933        RETURN_IF_EXCEPTION(throwScope, { });
     934    }
    671935    if (!unsignedLargeIntegerWithDefaultValue.isUndefined()) {
    672936        result.unsignedLargeIntegerWithDefault = convert<IDLUnsignedLongLong>(state, unsignedLargeIntegerWithDefaultValue);
     
    8271091    }
    8281092    TestObj::DictionaryThatShouldNotTolerateNull result;
    829     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     1093    JSValue booleanWithoutDefaultValue;
     1094    if (isNullOrUndefined)
     1095        booleanWithoutDefaultValue = jsUndefined();
     1096    else {
     1097        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     1098        RETURN_IF_EXCEPTION(throwScope, { });
     1099    }
    8301100    if (!booleanWithoutDefaultValue.isUndefined()) {
    8311101        result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
    8321102        RETURN_IF_EXCEPTION(throwScope, { });
    8331103    }
    834     JSValue nonNullableNodeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nonNullableNode"));
     1104    JSValue nonNullableNodeValue;
     1105    if (isNullOrUndefined)
     1106        nonNullableNodeValue = jsUndefined();
     1107    else {
     1108        nonNullableNodeValue = object->get(&state, Identifier::fromString(&state, "nonNullableNode"));
     1109        RETURN_IF_EXCEPTION(throwScope, { });
     1110    }
    8351111    if (!nonNullableNodeValue.isUndefined()) {
    8361112        result.nonNullableNode = convert<IDLInterface<Node>>(state, nonNullableNodeValue);
     
    8401116        return { };
    8411117    }
    842     JSValue requiredDictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredDictionaryMember"));
     1118    JSValue requiredDictionaryMemberValue;
     1119    if (isNullOrUndefined)
     1120        requiredDictionaryMemberValue = jsUndefined();
     1121    else {
     1122        requiredDictionaryMemberValue = object->get(&state, Identifier::fromString(&state, "requiredDictionaryMember"));
     1123        RETURN_IF_EXCEPTION(throwScope, { });
     1124    }
    8431125    if (!requiredDictionaryMemberValue.isUndefined()) {
    8441126        result.requiredDictionaryMember = convert<IDLDictionary<TestObj::Dictionary>>(state, requiredDictionaryMemberValue);
     
    8481130        return { };
    8491131    }
    850     JSValue requiredEnumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue"));
     1132    JSValue requiredEnumerationValueValue;
     1133    if (isNullOrUndefined)
     1134        requiredEnumerationValueValue = jsUndefined();
     1135    else {
     1136        requiredEnumerationValueValue = object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue"));
     1137        RETURN_IF_EXCEPTION(throwScope, { });
     1138    }
    8511139    if (!requiredEnumerationValueValue.isUndefined()) {
    8521140        result.requiredEnumerationValue = convert<IDLEnumeration<TestObj::EnumType>>(state, requiredEnumerationValueValue);
     
    8701158    }
    8711159    TestObj::DictionaryThatShouldTolerateNull result;
    872     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     1160    JSValue booleanWithoutDefaultValue;
     1161    if (isNullOrUndefined)
     1162        booleanWithoutDefaultValue = jsUndefined();
     1163    else {
     1164        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     1165        RETURN_IF_EXCEPTION(throwScope, { });
     1166    }
    8731167    if (!booleanWithoutDefaultValue.isUndefined()) {
    8741168        result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
    8751169        RETURN_IF_EXCEPTION(throwScope, { });
    8761170    }
    877     JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValue"));
     1171    JSValue enumerationValueValue;
     1172    if (isNullOrUndefined)
     1173        enumerationValueValue = jsUndefined();
     1174    else {
     1175        enumerationValueValue = object->get(&state, Identifier::fromString(&state, "enumerationValue"));
     1176        RETURN_IF_EXCEPTION(throwScope, { });
     1177    }
    8781178    if (!enumerationValueValue.isUndefined()) {
    8791179        result.enumerationValue = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueValue);
     
    8941194    }
    8951195    AlternateDictionaryName result;
    896     JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     1196    JSValue booleanWithoutDefaultValue;
     1197    if (isNullOrUndefined)
     1198        booleanWithoutDefaultValue = jsUndefined();
     1199    else {
     1200        booleanWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
     1201        RETURN_IF_EXCEPTION(throwScope, { });
     1202    }
    8971203    if (!booleanWithoutDefaultValue.isUndefined()) {
    8981204        result.booleanWithoutDefault = convert<IDLBoolean>(state, booleanWithoutDefaultValue);
    8991205        RETURN_IF_EXCEPTION(throwScope, { });
    9001206    }
    901     JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValue"));
     1207    JSValue enumerationValueValue;
     1208    if (isNullOrUndefined)
     1209        enumerationValueValue = jsUndefined();
     1210    else {
     1211        enumerationValueValue = object->get(&state, Identifier::fromString(&state, "enumerationValue"));
     1212        RETURN_IF_EXCEPTION(throwScope, { });
     1213    }
    9021214    if (!enumerationValueValue.isUndefined()) {
    9031215        result.enumerationValue = convert<IDLEnumeration<TestObj::EnumType>>(state, enumerationValueValue);
     
    9181230    }
    9191231    TestObj::ParentDictionary result;
    920     JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember1"));
     1232    JSValue parentMember1Value;
     1233    if (isNullOrUndefined)
     1234        parentMember1Value = jsUndefined();
     1235    else {
     1236        parentMember1Value = object->get(&state, Identifier::fromString(&state, "parentMember1"));
     1237        RETURN_IF_EXCEPTION(throwScope, { });
     1238    }
    9211239    if (!parentMember1Value.isUndefined()) {
    9221240        result.parentMember1 = convert<IDLBoolean>(state, parentMember1Value);
    9231241        RETURN_IF_EXCEPTION(throwScope, { });
    9241242    }
    925     JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember2"));
     1243    JSValue parentMember2Value;
     1244    if (isNullOrUndefined)
     1245        parentMember2Value = jsUndefined();
     1246    else {
     1247        parentMember2Value = object->get(&state, Identifier::fromString(&state, "parentMember2"));
     1248        RETURN_IF_EXCEPTION(throwScope, { });
     1249    }
    9261250    if (!parentMember2Value.isUndefined()) {
    9271251        result.parentMember2 = convert<IDLBoolean>(state, parentMember2Value);
     
    9421266    }
    9431267    TestObj::ChildDictionary result;
    944     JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember1"));
     1268    JSValue parentMember1Value;
     1269    if (isNullOrUndefined)
     1270        parentMember1Value = jsUndefined();
     1271    else {
     1272        parentMember1Value = object->get(&state, Identifier::fromString(&state, "parentMember1"));
     1273        RETURN_IF_EXCEPTION(throwScope, { });
     1274    }
    9451275    if (!parentMember1Value.isUndefined()) {
    9461276        result.parentMember1 = convert<IDLBoolean>(state, parentMember1Value);
    9471277        RETURN_IF_EXCEPTION(throwScope, { });
    9481278    }
    949     JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember2"));
     1279    JSValue parentMember2Value;
     1280    if (isNullOrUndefined)
     1281        parentMember2Value = jsUndefined();
     1282    else {
     1283        parentMember2Value = object->get(&state, Identifier::fromString(&state, "parentMember2"));
     1284        RETURN_IF_EXCEPTION(throwScope, { });
     1285    }
    9501286    if (!parentMember2Value.isUndefined()) {
    9511287        result.parentMember2 = convert<IDLBoolean>(state, parentMember2Value);
    9521288        RETURN_IF_EXCEPTION(throwScope, { });
    9531289    }
    954     JSValue childMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "childMember1"));
     1290    JSValue childMember1Value;
     1291    if (isNullOrUndefined)
     1292        childMember1Value = jsUndefined();
     1293    else {
     1294        childMember1Value = object->get(&state, Identifier::fromString(&state, "childMember1"));
     1295        RETURN_IF_EXCEPTION(throwScope, { });
     1296    }
    9551297    if (!childMember1Value.isUndefined()) {
    9561298        result.childMember1 = convert<IDLBoolean>(state, childMember1Value);
    9571299        RETURN_IF_EXCEPTION(throwScope, { });
    9581300    }
    959     JSValue childMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "childMember2"));
     1301    JSValue childMember2Value;
     1302    if (isNullOrUndefined)
     1303        childMember2Value = jsUndefined();
     1304    else {
     1305        childMember2Value = object->get(&state, Identifier::fromString(&state, "childMember2"));
     1306        RETURN_IF_EXCEPTION(throwScope, { });
     1307    }
    9601308    if (!childMember2Value.isUndefined()) {
    9611309        result.childMember2 = convert<IDLBoolean>(state, childMember2Value);
     
    9781326    }
    9791327    TestObj::ConditionalDictionaryA result;
    980     JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     1328    JSValue stringWithoutDefaultValue;
     1329    if (isNullOrUndefined)
     1330        stringWithoutDefaultValue = jsUndefined();
     1331    else {
     1332        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     1333        RETURN_IF_EXCEPTION(throwScope, { });
     1334    }
    9811335    if (!stringWithoutDefaultValue.isUndefined()) {
    9821336        result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
     
    10011355    }
    10021356    TestObj::ConditionalDictionaryB result;
    1003     JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     1357    JSValue stringWithoutDefaultValue;
     1358    if (isNullOrUndefined)
     1359        stringWithoutDefaultValue = jsUndefined();
     1360    else {
     1361        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     1362        RETURN_IF_EXCEPTION(throwScope, { });
     1363    }
    10041364    if (!stringWithoutDefaultValue.isUndefined()) {
    10051365        result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
     
    10241384    }
    10251385    TestObj::ConditionalDictionaryC result;
    1026     JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     1386    JSValue stringWithoutDefaultValue;
     1387    if (isNullOrUndefined)
     1388        stringWithoutDefaultValue = jsUndefined();
     1389    else {
     1390        stringWithoutDefaultValue = object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
     1391        RETURN_IF_EXCEPTION(throwScope, { });
     1392    }
    10271393    if (!stringWithoutDefaultValue.isUndefined()) {
    10281394        result.stringWithoutDefault = convert<IDLDOMString>(state, stringWithoutDefaultValue);
  • branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp

    r223476 r228063  
    5252    }
    5353    TestPromiseRejectionEvent::Init result;
    54     JSValue bubblesValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "bubbles"));
     54    JSValue bubblesValue;
     55    if (isNullOrUndefined)
     56        bubblesValue = jsUndefined();
     57    else {
     58        bubblesValue = object->get(&state, Identifier::fromString(&state, "bubbles"));
     59        RETURN_IF_EXCEPTION(throwScope, { });
     60    }
    5561    if (!bubblesValue.isUndefined()) {
    5662        result.bubbles = convert<IDLBoolean>(state, bubblesValue);
     
    5864    } else
    5965        result.bubbles = false;
    60     JSValue cancelableValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "cancelable"));
     66    JSValue cancelableValue;
     67    if (isNullOrUndefined)
     68        cancelableValue = jsUndefined();
     69    else {
     70        cancelableValue = object->get(&state, Identifier::fromString(&state, "cancelable"));
     71        RETURN_IF_EXCEPTION(throwScope, { });
     72    }
    6173    if (!cancelableValue.isUndefined()) {
    6274        result.cancelable = convert<IDLBoolean>(state, cancelableValue);
     
    6476    } else
    6577        result.cancelable = false;
    66     JSValue composedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "composed"));
     78    JSValue composedValue;
     79    if (isNullOrUndefined)
     80        composedValue = jsUndefined();
     81    else {
     82        composedValue = object->get(&state, Identifier::fromString(&state, "composed"));
     83        RETURN_IF_EXCEPTION(throwScope, { });
     84    }
    6785    if (!composedValue.isUndefined()) {
    6886        result.composed = convert<IDLBoolean>(state, composedValue);
     
    7088    } else
    7189        result.composed = false;
    72     JSValue promiseValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "promise"));
     90    JSValue promiseValue;
     91    if (isNullOrUndefined)
     92        promiseValue = jsUndefined();
     93    else {
     94        promiseValue = object->get(&state, Identifier::fromString(&state, "promise"));
     95        RETURN_IF_EXCEPTION(throwScope, { });
     96    }
    7397    if (!promiseValue.isUndefined()) {
    7498        result.promise = convert<IDLPromise<IDLAny>>(state, promiseValue);
     
    78102        return { };
    79103    }
    80     JSValue reasonValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "reason"));
     104    JSValue reasonValue;
     105    if (isNullOrUndefined)
     106        reasonValue = jsUndefined();
     107    else {
     108        reasonValue = object->get(&state, Identifier::fromString(&state, "reason"));
     109        RETURN_IF_EXCEPTION(throwScope, { });
     110    }
    81111    if (!reasonValue.isUndefined()) {
    82112        result.reason = convert<IDLAny>(state, reasonValue);
  • branches/safari-605-branch/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp

    r223476 r228063  
    4848    }
    4949    DictionaryImplName result;
    50     JSValue boolMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "boolMember"));
     50    JSValue boolMemberValue;
     51    if (isNullOrUndefined)
     52        boolMemberValue = jsUndefined();
     53    else {
     54        boolMemberValue = object->get(&state, Identifier::fromString(&state, "boolMember"));
     55        RETURN_IF_EXCEPTION(throwScope, { });
     56    }
    5157    if (!boolMemberValue.isUndefined()) {
    5258        result.boolMember = convert<IDLBoolean>(state, boolMemberValue);
    5359        RETURN_IF_EXCEPTION(throwScope, { });
    5460    }
    55     JSValue enumMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumMember"));
     61    JSValue enumMemberValue;
     62    if (isNullOrUndefined)
     63        enumMemberValue = jsUndefined();
     64    else {
     65        enumMemberValue = object->get(&state, Identifier::fromString(&state, "enumMember"));
     66        RETURN_IF_EXCEPTION(throwScope, { });
     67    }
    5668    if (!enumMemberValue.isUndefined()) {
    5769        result.enumMember = convert<IDLEnumeration<TestStandaloneDictionary::EnumInStandaloneDictionaryFile>>(state, enumMemberValue);
    5870        RETURN_IF_EXCEPTION(throwScope, { });
    5971    }
    60     JSValue stringMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringMember"));
     72    JSValue stringMemberValue;
     73    if (isNullOrUndefined)
     74        stringMemberValue = jsUndefined();
     75    else {
     76        stringMemberValue = object->get(&state, Identifier::fromString(&state, "stringMember"));
     77        RETURN_IF_EXCEPTION(throwScope, { });
     78    }
    6179    if (!stringMemberValue.isUndefined()) {
    6280        result.stringMember = convert<IDLDOMString>(state, stringMemberValue);
Note: See TracChangeset for help on using the changeset viewer.