<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206390] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206390">206390</a></dd>
<dt>Author</dt> <dd>ryanhaddad@apple.com</dd>
<dt>Date</dt> <dd>2016-09-26 13:39:57 -0700 (Mon, 26 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Rebaseline bindings tests after <a href="http://trac.webkit.org/projects/webkit/changeset/206386">r206386</a>.

Unreviewed test gardening.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequencecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/ChangeLog        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-09-26  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
+
+        Rebaseline bindings tests after r206386.
+
+        Unreviewed test gardening.
+
+        * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+        * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+        * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+        * bindings/scripts/test/JS/JSTestNode.cpp:
+        * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
+        * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+
</ins><span class="cx"> 2016-09-26  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ASSERTION FAILED: m_origin || m_type == CachedResource::MainResource
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestActiveDOMObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -224,8 +224,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto message = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.postMessage(WTFMove(message));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCustomNamedGettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -201,8 +201,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto str = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.anotherFunction(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -85,8 +85,7 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx"> 
</span><span class="cx">     AtomicString eventType = state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     TestEventConstructorInit eventInit;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -214,8 +214,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto index = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.item(WTFMove(index)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -286,8 +286,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setRegularAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -306,8 +305,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setPublicAndPrivateAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -327,8 +325,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setPublicAndPrivateConditionalAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -349,8 +346,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setEnabledAtRuntimeAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -376,8 +372,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto testParam = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.regularOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -397,8 +392,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto testParam = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.enabledAtRuntimeOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -420,8 +414,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto testParam = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.enabledAtRuntimeOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -231,11 +231,9 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto str1 = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto str2 = state-&gt;argument(1).isUndefined() ? ASCIILiteral(&quot;defaultString&quot;) : state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     ScriptExecutionContext* context = castedThis-&gt;scriptExecutionContext();
</span><span class="cx">     if (UNLIKELY(!context))
</span><span class="cx">         return throwConstructorScriptExecutionContextUnavailableError(*state, throwScope, &quot;TestInterface&quot;);
</span><span class="lines">@@ -666,8 +664,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     TestInterface::setImplementsStaticAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -688,8 +685,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setImplementsStr2(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -746,8 +742,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     WebCore::TestSupplemental::setSupplementalStaticAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -768,8 +763,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     WebCore::TestSupplemental::setSupplementalStr2(impl, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -860,8 +854,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(1));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;objArg&quot;, &quot;TestInterface&quot;, &quot;implementsMethod2&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -938,8 +931,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(1));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;objArg&quot;, &quot;TestInterface&quot;, &quot;supplementalMethod2&quot;, &quot;TestObj&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNamedConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -91,14 +91,11 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto str1 = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto str2 = state-&gt;argument(1).isUndefined() ? ASCIILiteral(&quot;defaultString&quot;) : state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto str3 = state-&gt;argument(2).isUndefined() ? String() : state-&gt;uncheckedArgument(2).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto object = TestNamedConstructor::createForJSConstructor(*castedThis-&gt;document(), WTFMove(str1), WTFMove(str2), WTFMove(str3), ec);
</span><span class="cx">     if (UNLIKELY(ec)) {
</span><span class="cx">         setDOMException(state, throwScope, ec);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -219,8 +219,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setName(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestNondeterministiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -370,8 +370,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNondeterministicWriteableAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -390,8 +389,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNondeterministicExceptionAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -410,8 +408,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNondeterministicGetterExceptionAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -431,8 +428,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNondeterministicSetterExceptionAttr(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -526,98 +526,67 @@
</span><span class="cx">         return Nullopt;
</span><span class="cx">     }
</span><span class="cx">     auto enumerationValueWithoutDefault = convertOptional&lt;TestObj::EnumType&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValueWithoutDefault&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto enumerationValueWithDefault = convertOptional&lt;TestObj::EnumType&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValueWithDefault&quot;)), TestObj::EnumType::EnumValue1);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto enumerationValueWithEmptyStringDefault = convertOptional&lt;TestObj::EnumType&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValueWithEmptyStringDefault&quot;)), TestObj::EnumType::EmptyString);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto stringWithDefault = convertOptional&lt;String&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithDefault&quot;)), &quot;defaultString&quot;);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto stringWithoutDefault = convertOptional&lt;String&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithoutDefault&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto booleanWithDefault = convertOptional&lt;bool&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithDefault&quot;)), false);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto booleanWithoutDefault = convertOptional&lt;bool&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto sequenceOfStrings = convertOptional&lt;Vector&lt;String&gt;&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;sequenceOfStrings&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto restrictedDouble = convertOptional&lt;double&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedDouble&quot;)), ShouldAllowNonFinite::No);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unrestrictedDouble = convertOptional&lt;double&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedDouble&quot;)), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto restrictedDoubleWithDefault = convertOptional&lt;double&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedDoubleWithDefault&quot;)), ShouldAllowNonFinite::No, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unrestrictedDoubleWithDefault = convertOptional&lt;double&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedDoubleWithDefault&quot;)), ShouldAllowNonFinite::Yes, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto restrictedFloat = convertOptional&lt;float&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedFloat&quot;)), ShouldAllowNonFinite::No);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unrestrictedFloat = convertOptional&lt;float&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedFloat&quot;)), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto restrictedFloatWithDefault = convertOptional&lt;float&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;restrictedFloatWithDefault&quot;)), ShouldAllowNonFinite::No, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unrestrictedFloatWithDefault = convertOptional&lt;float&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unrestrictedFloatWithDefault&quot;)), ShouldAllowNonFinite::Yes, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto smallIntegerClamped = convertOptional&lt;int8_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallIntegerClamped&quot;)), Clamp);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto smallIntegerWithDefault = convertOptional&lt;int8_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallIntegerWithDefault&quot;)), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto smallUnsignedIntegerEnforcedRange = convertOptional&lt;uint8_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallUnsignedIntegerEnforcedRange&quot;)), EnforceRange);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto smallUnsignedIntegerWithDefault = convertOptional&lt;uint8_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;smallUnsignedIntegerWithDefault&quot;)), NormalConversion, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto integer = convertOptional&lt;int32_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;integer&quot;)), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto integerWithDefault = convertOptional&lt;int32_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;integerWithDefault&quot;)), NormalConversion, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unsignedInteger = convertOptional&lt;uint32_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedInteger&quot;)), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unsignedIntegerWithDefault = convertOptional&lt;uint32_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedIntegerWithDefault&quot;)), NormalConversion, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto largeInteger = convertOptional&lt;int64_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;largeInteger&quot;)), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto largeIntegerWithDefault = convertOptional&lt;int64_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;largeIntegerWithDefault&quot;)), NormalConversion, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unsignedLargeInteger = convertOptional&lt;uint64_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedLargeInteger&quot;)), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto unsignedLargeIntegerWithDefault = convertOptional&lt;uint64_t&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;unsignedLargeIntegerWithDefault&quot;)), NormalConversion, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto* nullableNode = convertWrapperType&lt;Node, JSNode&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;nullableNode&quot;)), IsNullable::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto anyValue = convertOptional&lt;JSC::JSValue&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;anyValue&quot;)), jsUndefined());
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto anyTypedefValue = convertOptional&lt;JSC::JSValue&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;anyTypedefValue&quot;)), jsUndefined());
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto dictionaryMember = convertDictionary&lt;TestObj::DictionaryThatShouldTolerateNull&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;dictionaryMember&quot;)));
</span><span class="cx">     return TestObj::Dictionary { WTFMove(enumerationValueWithoutDefault), WTFMove(enumerationValueWithDefault), WTFMove(enumerationValueWithEmptyStringDefault), WTFMove(stringWithDefault), WTFMove(stringWithoutDefault), WTFMove(booleanWithDefault), WTFMove(booleanWithoutDefault), WTFMove(sequenceOfStrings), WTFMove(restrictedDouble), WTFMove(unrestrictedDouble), WTFMove(restrictedDoubleWithDefault), WTFMove(unrestrictedDoubleWithDefault), WTFMove(restrictedFloat), WTFMove(unrestrictedFloat), WTFMove(restrictedFloatWithDefault), WTFMove(unrestrictedFloatWithDefault), WTFMove(smallIntegerClamped), WTFMove(smallIntegerWithDefault), WTFMove(smallUnsignedIntegerEnforcedRange), WTFMove(smallUnsignedIntegerWithDefault), WTFMove(integer), WTFMove(integerWithDefault), WTFMove(unsignedInteger), WTFMove(unsignedIntegerWithDefault), WTFMove(largeInteger), WTFMove(largeIntegerWithDefault), WTFMove(unsignedLargeInteger), WTFMove(unsignedLargeIntegerWithDefault), WT
 FMove(nullableNode), WTFMove(anyValue), WTFMove(anyTypedefValue), dictionaryMember.value() };
</span><span class="cx"> }
</span><span class="lines">@@ -632,14 +601,11 @@
</span><span class="cx">         return Nullopt;
</span><span class="cx">     }
</span><span class="cx">     auto requiredEnumerationValue = convert&lt;TestObj::EnumType&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;requiredEnumerationValue&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto booleanWithoutDefault = convertOptional&lt;bool&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto* nonNullableNode = convertWrapperType&lt;Node, JSNode&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;nonNullableNode&quot;)), IsNullable::No);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto requiredDictionaryMember = convertDictionary&lt;TestObj::Dictionary&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;requiredDictionaryMember&quot;)));
</span><span class="cx">     return TestObj::DictionaryThatShouldNotTolerateNull { WTFMove(requiredEnumerationValue), WTFMove(booleanWithoutDefault), *nonNullableNode, requiredDictionaryMember.value() };
</span><span class="cx"> }
</span><span class="lines">@@ -656,8 +622,7 @@
</span><span class="cx">         return Nullopt;
</span><span class="cx">     }
</span><span class="cx">     auto enumerationValue = convertOptional&lt;TestObj::EnumType&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValue&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto booleanWithoutDefault = convertOptional&lt;bool&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;)));
</span><span class="cx">     return TestObj::DictionaryThatShouldTolerateNull { WTFMove(enumerationValue), WTFMove(booleanWithoutDefault) };
</span><span class="cx"> }
</span><span class="lines">@@ -674,8 +639,7 @@
</span><span class="cx">         return Nullopt;
</span><span class="cx">     }
</span><span class="cx">     auto enumerationValue = convertOptional&lt;TestObj::EnumType&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;enumerationValue&quot;)));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return Nullopt;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, Nullopt);
</ins><span class="cx">     auto booleanWithoutDefault = convertOptional&lt;bool&gt;(state, object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;booleanWithoutDefault&quot;)));
</span><span class="cx">     return AlternateDictionaryName { WTFMove(enumerationValue), WTFMove(booleanWithoutDefault) };
</span><span class="cx"> }
</span><span class="lines">@@ -3096,8 +3060,7 @@
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     JSValue value = JSValue::decode(encodedValue);
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     TestObj::setStaticStringAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3132,8 +3095,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = parse&lt;TestObj::EnumType&gt;(*state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="cx">         return false;
</span><span class="cx">     impl.setEnumAttr(nativeValue.value());
</span><span class="lines">@@ -3154,8 +3116,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int8_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setByteAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3174,8 +3135,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;uint8_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setOctetAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3194,8 +3154,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int16_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3214,8 +3173,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int16_t&gt;(*state, value, Clamp);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setClampedShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3234,8 +3192,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int16_t&gt;(*state, value, EnforceRange);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setEnforceRangeShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3254,8 +3211,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;uint16_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setUnsignedShortAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3274,8 +3230,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3294,8 +3249,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int64_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setLongLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3314,8 +3268,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;uint64_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3334,8 +3287,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3354,8 +3306,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToUSVString(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setUsvstringAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3443,8 +3394,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToStringTreatingNullAsEmptyString(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringAttrTreatingNullAsEmptyString(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3463,8 +3413,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToUSVStringTreatingNullAsEmptyString(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setUsvstringAttrTreatingNullAsEmptyString(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3483,8 +3432,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = parse&lt;AlternateEnumName&gt;(*state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="cx">         return false;
</span><span class="cx">     impl.setImplementationEnumAttr(nativeValue.value());
</span><span class="lines">@@ -3527,8 +3475,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setCreate(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3547,8 +3494,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedstringattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3567,8 +3513,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToUSVString(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvstringattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3587,8 +3532,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3607,8 +3551,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;uint32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3627,8 +3570,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3647,8 +3589,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedurlattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3667,8 +3608,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToUSVString(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::reflectedusvurlattrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3687,8 +3627,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentStringAttrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3707,8 +3646,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3727,8 +3665,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3747,8 +3684,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttributeWithoutSynchronization(WebCore::HTMLNames::customContentURLAttrAttr, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3768,8 +3704,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setEnabledAtRuntimeAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3789,8 +3724,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = toFloat32Array(value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     if (UNLIKELY(!nativeValue)) {
</span><span class="cx">         throwAttributeTypeError(*state, throwScope, &quot;TestObject&quot;, &quot;typedArrayAttr&quot;, &quot;Float32Array&quot;);
</span><span class="cx">         return false;
</span><span class="lines">@@ -3813,8 +3747,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttrWithGetterException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3833,8 +3766,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttrWithGetterExceptionWithMessage(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3854,8 +3786,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttrWithSetterException(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="cx">     return true;
</span><span class="lines">@@ -3876,8 +3807,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCodeWithMessage ec;
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttrWithSetterExceptionWithMessage(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="cx">     return true;
</span><span class="lines">@@ -3897,8 +3827,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringAttrWithGetterException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -3918,8 +3847,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringAttrWithSetterException(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="cx">     return true;
</span><span class="lines">@@ -3987,8 +3915,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setWithScriptStateAttribute(*state, WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4007,8 +3934,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setWithCallWithAndSetterCallWithAttribute(*state, activeDOMWindow(state), firstDOMWindow(state), WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4197,8 +4123,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setConditionalAttr1(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4219,8 +4144,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setConditionalAttr2(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4241,8 +4165,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setConditionalAttr3(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4384,8 +4307,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setBlueberry(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4404,8 +4326,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setId(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4440,8 +4361,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNullableLongSettableAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4460,8 +4380,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToStringWithUndefinedOrNullCheck(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNullableStringSettableAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4480,8 +4399,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToUSVStringWithUndefinedOrNullCheck(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNullableUSVStringSettableAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4500,8 +4418,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setNullableStringValue(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4520,8 +4437,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = parse&lt;TestObj::Optional&gt;(*state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     if (UNLIKELY(!nativeValue))
</span><span class="cx">         return false;
</span><span class="cx">     impl.setAttributeWithReservedEnumType(nativeValue.value());
</span><span class="lines">@@ -4543,8 +4459,7 @@
</span><span class="cx">     Ref&lt;TestNode&gt; forwardedImpl = castedThis-&gt;wrapped().putForwardsAttribute();
</span><span class="cx">     auto&amp; impl = forwardedImpl.get();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setName(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4566,8 +4481,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     auto&amp; impl = *forwardedImpl;
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setName(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4586,8 +4500,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = valueToUSVString(state, value);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringifierAttribute(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4622,8 +4535,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto testParam = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.enabledAtRuntimeOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -4645,8 +4557,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto testParam = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.enabledAtRuntimeOperation(WTFMove(testParam));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -4703,11 +4614,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(2));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 2, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;voidMethodWithArgs&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -4744,11 +4653,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto byteArg = convert&lt;int8_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(2));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 2, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;byteMethodWithArgs&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -4785,11 +4692,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto octetArg = convert&lt;uint8_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(2));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 2, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;octetMethodWithArgs&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -4826,11 +4731,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(2));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 2, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;longMethodWithArgs&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -4867,11 +4770,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(2));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 2, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;objMethodWithArgs&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -4908,8 +4809,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arg = valueToStringTreatingNullAsEmptyString(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithArgTreatingNullAsEmptyString(WTFMove(arg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -4928,8 +4828,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto resolver = JSXPathNSResolver::toWrapped(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!resolver))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 0, &quot;resolver&quot;, &quot;TestObject&quot;, &quot;methodWithXPathNSResolverParameter&quot;, &quot;XPathNSResolver&quot;);
</span><span class="cx">     impl.methodWithXPathNSResolverParameter(*resolver);
</span><span class="lines">@@ -4974,8 +4873,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto index = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(WTFMove(index)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -4996,8 +4894,7 @@
</span><span class="cx">     auto enumArgValue = state-&gt;uncheckedArgument(0);
</span><span class="cx">     TestObj::EnumType enumArg;
</span><span class="cx">     auto optionalValue = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!optionalValue))
</span><span class="cx">         return throwArgumentMustBeEnumError(*state, throwScope, 0, &quot;enumArg&quot;, &quot;TestObject&quot;, &quot;methodWithEnumArg&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</span><span class="cx">     enumArg = optionalValue.value();
</span><span class="lines">@@ -5020,8 +4917,7 @@
</span><span class="cx">     Optional&lt;TestObj::EnumType&gt; enumArg;
</span><span class="cx">     if (!enumArgValue.isUndefined()) {
</span><span class="cx">         enumArg = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</span><del>-        if (UNLIKELY(throwScope.exception()))
-            return JSValue::encode(jsUndefined());
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         if (UNLIKELY(!enumArg))
</span><span class="cx">             return throwArgumentMustBeEnumError(*state, throwScope, 0, &quot;enumArg&quot;, &quot;TestObject&quot;, &quot;methodWithOptionalEnumArg&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</span><span class="cx">     }
</span><span class="lines">@@ -5046,8 +4942,7 @@
</span><span class="cx">         enumArg = TestObj::EnumType::EnumValue1;
</span><span class="cx">     } else {
</span><span class="cx">         auto optionalValue = parse&lt;TestObj::EnumType&gt;(*state, enumArgValue);
</span><del>-        if (UNLIKELY(throwScope.exception()))
-            return JSValue::encode(jsUndefined());
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         if (UNLIKELY(!optionalValue))
</span><span class="cx">             return throwArgumentMustBeEnumError(*state, throwScope, 0, &quot;enumArg&quot;, &quot;TestObject&quot;, &quot;methodWithOptionalEnumArgAndDefaultValue&quot;, expectedEnumerationValues&lt;TestObj::EnumType&gt;());
</span><span class="cx">         enumArg = optionalValue.value();
</span><span class="lines">@@ -5071,8 +4966,7 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(1));
</span><span class="cx">     if (UNLIKELY(!objArg))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;methodThatRequiresAllArgsAndThrows&quot;, &quot;TestObj&quot;);
</span><span class="lines">@@ -5096,8 +4990,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto str = valueToUSVString(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithUSVStringArg(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5116,8 +5009,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto str = valueToUSVStringWithUndefinedOrNullCheck(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithNullableUSVStringArg(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5136,8 +5028,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto str = valueToUSVStringTreatingNullAsEmptyString(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithUSVStringArgTreatingNullAsEmptyString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5156,8 +5047,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto serializedArg = SerializedScriptValue::create(state, state-&gt;uncheckedArgument(0), 0, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.serializedValue(WTFMove(serializedArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5255,8 +5145,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto argument = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsStringWithCache(state, impl.privateMethod(WTFMove(argument)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -5275,8 +5164,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto argument = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsStringWithCache(state, impl.publicAndPrivateMethod(WTFMove(argument)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -5295,14 +5183,12 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto type = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto listener = JSEventListener::create(state-&gt;uncheckedArgument(1), *castedThis, false, currentWorld(state));
</span><span class="cx">     if (UNLIKELY(!listener))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;listener&quot;, &quot;TestObject&quot;, &quot;addEventListener&quot;, &quot;EventListener&quot;);
</span><span class="cx">     auto useCapture = state-&gt;argument(2).toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.addEventListener(WTFMove(type), *listener, WTFMove(useCapture));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5321,14 +5207,12 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto type = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto listener = JSEventListener::create(state-&gt;uncheckedArgument(1), *castedThis, false, currentWorld(state));
</span><span class="cx">     if (UNLIKELY(!listener))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 1, &quot;listener&quot;, &quot;TestObject&quot;, &quot;removeEventListener&quot;, &quot;EventListener&quot;);
</span><span class="cx">     auto useCapture = state-&gt;argument(2).toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.removeEventListener(WTFMove(type), *listener, WTFMove(useCapture));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5360,8 +5244,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptStateObj(*state));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5397,8 +5280,7 @@
</span><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptStateObjException(*state, ec));
</span><span class="cx"> 
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5456,8 +5338,7 @@
</span><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateObjException(*state, *context, ec));
</span><span class="cx"> 
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5476,8 +5357,7 @@
</span><span class="cx">     if (!context)
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.withScriptExecutionContextAndScriptStateWithSpaces(*state, *context));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5562,8 +5442,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto opt = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalArg(WTFMove(opt));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5580,8 +5459,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto opt = state-&gt;argument(0).isUndefined() ? 666 : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalArgAndDefaultValue(WTFMove(opt));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5600,11 +5478,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto nonOpt = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto opt = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithNonOptionalArgAndOptionalArg(WTFMove(nonOpt), WTFMove(opt));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5623,14 +5499,11 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto nonOpt = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto opt1 = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto opt2 = state-&gt;argument(2).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(2), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithNonOptionalArgAndTwoOptionalArgs(WTFMove(nonOpt), WTFMove(opt1), WTFMove(opt2));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5647,8 +5520,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? String() : state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5665,8 +5537,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? String() : valueToUSVString(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalUSVString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5683,8 +5554,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? nullAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalAtomicString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5701,8 +5571,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? ASCIILiteral(&quot;foo&quot;) : state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalStringAndDefaultValue(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5719,8 +5588,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? AtomicString(&quot;foo&quot;, AtomicString::ConstructFromLiteral) : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalAtomicStringAndDefaultValue(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5737,8 +5605,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? String() : state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalStringIsNull(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5755,8 +5622,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalStringIsUndefined(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5773,8 +5639,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? nullAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalAtomicStringIsNull(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5791,8 +5656,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? emptyString() : state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalStringIsEmptyString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5809,8 +5673,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? emptyString() : valueToUSVString(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalUSVStringIsEmptyString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5827,8 +5690,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto str = state-&gt;argument(0).isUndefined() ? emptyAtom : state-&gt;uncheckedArgument(0).toString(state)-&gt;toAtomicString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalAtomicStringIsEmptyString(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5845,8 +5707,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto number = convert&lt;double&gt;(*state, state-&gt;argument(0), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalDoubleIsNaN(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5863,8 +5724,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto number = convert&lt;float&gt;(*state, state-&gt;argument(0), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalFloatIsNaN(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5881,8 +5741,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;int64_t&gt;() : convert&lt;int64_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalLongLong(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5899,8 +5758,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto number = convert&lt;int64_t&gt;(*state, state-&gt;argument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalLongLongIsZero(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5917,8 +5775,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto number = state-&gt;argument(0).isUndefined() ? Optional&lt;uint64_t&gt;() : convert&lt;uint64_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalUnsignedLongLong(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5935,8 +5792,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto number = convert&lt;uint64_t&gt;(*state, state-&gt;argument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalUnsignedLongLongIsZero(WTFMove(number));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5953,8 +5809,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto array = state-&gt;argument(0).isUndefined() ? Optional&lt;Vector&lt;String&gt;&gt;() : toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalSequence(WTFMove(array));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5971,8 +5826,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto array = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalSequenceIsEmpty(WTFMove(array));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -5989,8 +5843,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto b = state-&gt;argument(0).isUndefined() ? Optional&lt;bool&gt;() : state-&gt;uncheckedArgument(0).toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalBoolean(WTFMove(b));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6007,8 +5860,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto b = state-&gt;argument(0).toBoolean(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithOptionalBooleanIsFalse(WTFMove(b));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6085,8 +5937,7 @@
</span><span class="cx">     RefPtr&lt;XPathNSResolver&gt; resolver = nullptr;
</span><span class="cx">     if (!state-&gt;argument(0).isUndefinedOrNull()) {
</span><span class="cx">         resolver = JSXPathNSResolver::toWrapped(*state, state-&gt;uncheckedArgument(0));
</span><del>-        if (UNLIKELY(throwScope.exception()))
-            return JSValue::encode(jsUndefined());
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         if (UNLIKELY(!resolver))
</span><span class="cx">             return throwArgumentTypeError(*state, throwScope, 0, &quot;resolver&quot;, &quot;TestObject&quot;, &quot;methodWithOptionalXPathNSResolver&quot;, &quot;XPathNSResolver&quot;);
</span><span class="cx">     }
</span><span class="lines">@@ -6128,8 +5979,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto nonCallback = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!state-&gt;uncheckedArgument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, throwScope, 1, &quot;callback&quot;, &quot;TestObject&quot;, &quot;methodWithNonCallbackArgAndCallbackArg&quot;);
</span><span class="cx">     auto callback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><span class="lines">@@ -6192,8 +6042,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto nonCallback = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!state-&gt;uncheckedArgument(1).isFunction()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, throwScope, 1, &quot;callback&quot;, &quot;TestObject&quot;, &quot;methodWithNonCallbackArgAndCallbackFunctionArg&quot;);
</span><span class="cx">     auto callback = JSTestCallbackFunction::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><span class="lines">@@ -6325,8 +6174,7 @@
</span><span class="cx">             return throwArgumentTypeError(*state, throwScope, 0, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;overloadedMethod&quot;, &quot;TestObj&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(1).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(objArg), WTFMove(strArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6351,8 +6199,7 @@
</span><span class="cx">             return throwArgumentTypeError(*state, throwScope, 0, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;overloadedMethod&quot;, &quot;TestObj&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(objArg), WTFMove(longArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6371,8 +6218,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(strArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6391,8 +6237,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto longArg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(longArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6454,8 +6299,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arrayArg = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(arrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6494,8 +6338,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arrayArg = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(arrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6514,8 +6357,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arrayArg = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(arrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6534,8 +6376,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethod(WTFMove(strArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6616,8 +6457,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto strArg = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     TestObj* objArg = nullptr;
</span><span class="cx">     if (!state-&gt;argument(1).isUndefinedOrNull()) {
</span><span class="cx">         objArg = JSTestObj::toWrapped(state-&gt;uncheckedArgument(1));
</span><span class="lines">@@ -6648,8 +6488,7 @@
</span><span class="cx">             return throwArgumentTypeError(*state, throwScope, 0, &quot;objArg&quot;, &quot;TestObject&quot;, &quot;overloadedMethodWithOptionalParameter&quot;, &quot;TestObj&quot;);
</span><span class="cx">     }
</span><span class="cx">     auto longArg = state-&gt;argument(1).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.overloadedMethodWithOptionalParameter(WTFMove(objArg), WTFMove(longArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6694,8 +6533,7 @@
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">     UNUSED_PARAM(throwScope);
</span><span class="cx">     auto arg = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsNumber(TestObj::classMethodWithOptional(WTFMove(arg)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -6719,8 +6557,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arg = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     TestObj::overloadedMethod1(WTFMove(arg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6736,8 +6573,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto type = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     TestObj::overloadedMethod1(WTFMove(type));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6779,11 +6615,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto objArgsShort = convert&lt;uint16_t&gt;(*state, state-&gt;uncheckedArgument(0), Clamp);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArgsLong = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(1), Clamp);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.classMethodWithClamp(WTFMove(objArgsShort), WTFMove(objArgsLong));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6802,11 +6636,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto objArgsShort = convert&lt;uint16_t&gt;(*state, state-&gt;uncheckedArgument(0), EnforceRange);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto objArgsLong = convert&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(1), EnforceRange);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.classMethodWithEnforceRange(WTFMove(objArgsShort), WTFMove(objArgsLong));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6825,8 +6657,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto unsignedLongSequence = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithUnsignedLongSequence(WTFMove(unsignedLongSequence));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6846,8 +6677,7 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto values = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringArrayFunction(WTFMove(values), ec));
</span><span class="cx"> 
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="lines">@@ -6891,11 +6721,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arrayArg = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto nullableArrayArg = toNativeArray&lt;uint32_t&gt;(*state, state-&gt;uncheckedArgument(1));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.methodWithAndWithoutNullableSequence(WTFMove(arrayArg), WTFMove(nullableArrayArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -6914,8 +6742,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto elementId = AtomicString(state-&gt;uncheckedArgument(0).toString(state)-&gt;toExistingAtomicString(state));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.getElementById(WTFMove(elementId)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -6997,8 +6824,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto value = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.convert3(WTFMove(value));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7017,8 +6843,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto value = valueToStringWithUndefinedOrNullCheck(state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.convert4(WTFMove(value));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7082,11 +6907,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto head = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto tail = toArguments&lt;VariadicHelper&lt;JSC::JSValue, String&gt;&gt;(*state, 1);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.variadicStringMethod(WTFMove(head), WTFMove(tail.arguments.value()));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7105,11 +6928,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto head = convert&lt;double&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto tail = toArguments&lt;VariadicHelper&lt;JSC::JSValue, double&gt;&gt;(*state, 1);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.variadicDoubleMethod(WTFMove(head), WTFMove(tail.arguments.value()));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7151,11 +6972,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto a = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto b = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(1), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.any(WTFMove(a), WTFMove(b));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7205,8 +7024,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto a = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::No);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.testPromiseFunctionWithFloatArgument(WTFMove(a), WTFMove(promise));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7256,8 +7074,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto a = state-&gt;argument(0).isUndefined() ? Optional&lt;int32_t&gt;() : convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.testPromiseFunctionWithOptionalIntArgument(WTFMove(a), WTFMove(promise));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7284,8 +7101,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto a = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::No);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.testPromiseOverloadedFunction(WTFMove(a), WTFMove(promise));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7417,8 +7233,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto str = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.conditionalOverload(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7440,8 +7255,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto a = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.conditionalOverload(WTFMove(a));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7483,8 +7297,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto str = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.singleConditionalOverload(WTFMove(str));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7504,8 +7317,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto a = convert&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0), NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.singleConditionalOverload(WTFMove(a));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -7543,8 +7355,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto init = convertDictionary&lt;TestObj::Dictionary&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.attachShadowRoot(init.value());
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -75,8 +75,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arrayBuffer = toArrayBuffer(state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!arrayBuffer))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 0, &quot;arrayBuffer&quot;, &quot;TestOverloadedConstructors&quot;, nullptr, &quot;ArrayBuffer&quot;);
</span><span class="cx">     auto object = TestOverloadedConstructors::create(*arrayBuffer);
</span><span class="lines">@@ -93,8 +92,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arrayBufferView = toArrayBufferView(state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!arrayBufferView))
</span><span class="cx">         return throwArgumentTypeError(*state, throwScope, 0, &quot;arrayBufferView&quot;, &quot;TestOverloadedConstructors&quot;, nullptr, &quot;ArrayBufferView&quot;);
</span><span class="cx">     auto object = TestOverloadedConstructors::create(*arrayBufferView);
</span><span class="lines">@@ -127,8 +125,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto string = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto object = TestOverloadedConstructors::create(WTFMove(string));
</span><span class="cx">     return JSValue::encode(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object)));
</span><span class="cx"> }
</span><span class="lines">@@ -141,8 +138,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     ASSERT(castedThis);
</span><span class="cx">     auto longArgs = toArguments&lt;VariadicHelper&lt;JSC::JSValue, int32_t&gt;&gt;(*state, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto object = TestOverloadedConstructors::create(WTFMove(longArgs));
</span><span class="cx">     return JSValue::encode(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object)));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorsWithSequencecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -72,8 +72,7 @@
</span><span class="cx">     auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsWithSequenceConstructor*&gt;(state-&gt;callee());
</span><span class="cx">     ASSERT(castedThis);
</span><span class="cx">     auto sequenceOfStrings = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto object = TestOverloadedConstructorsWithSequence::create(WTFMove(sequenceOfStrings));
</span><span class="cx">     return JSValue::encode(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object)));
</span><span class="cx"> }
</span><span class="lines">@@ -88,8 +87,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto string = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto object = TestOverloadedConstructorsWithSequence::create(WTFMove(string));
</span><span class="cx">     return JSValue::encode(toJSNewlyCreated(state, castedThis-&gt;globalObject(), WTFMove(object)));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestOverrideBuiltinscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -210,8 +210,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto name = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = toJS(state, castedThis-&gt;globalObject(), impl.namedItem(WTFMove(name)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -260,8 +260,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setValue(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -280,8 +279,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setCachedValue(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (206389 => 206390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-09-26 20:39:51 UTC (rev 206389)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-09-26 20:39:57 UTC (rev 206390)
</span><span class="lines">@@ -132,8 +132,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 2))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto hello = state-&gt;uncheckedArgument(0).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (UNLIKELY(!state-&gt;uncheckedArgument(1).isObject()))
</span><span class="cx">         return throwArgumentMustBeFunctionError(*state, throwScope, 1, &quot;testCallback&quot;, &quot;TestTypedefs&quot;, nullptr);
</span><span class="cx">     auto testCallback = JSTestCallback::create(asObject(state-&gt;uncheckedArgument(1)), castedThis-&gt;globalObject());
</span><span class="lines">@@ -369,8 +368,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;uint64_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setUnsignedLongLongAttr(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -389,8 +387,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = SerializedScriptValue::create(state, value, 0, 0);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setImmutableSerializedScriptValue(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -409,8 +406,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttrWithGetterException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -430,8 +426,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto nativeValue = convert&lt;int32_t&gt;(*state, value, NormalConversion);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setAttrWithSetterException(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="cx">     return true;
</span><span class="lines">@@ -451,8 +446,7 @@
</span><span class="cx">     }
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringAttrWithGetterException(WTFMove(nativeValue));
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -472,8 +466,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto nativeValue = value.toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return false;
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, false);
</ins><span class="cx">     impl.setStringAttrWithSetterException(WTFMove(nativeValue), ec);
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="cx">     return true;
</span><span class="lines">@@ -497,8 +490,7 @@
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><span class="cx">     auto x = state-&gt;argument(0).isUndefined() ? Vector&lt;int32_t&gt;() : toNativeArray&lt;int32_t&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.func(WTFMove(x));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -517,20 +509,15 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 3))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto width = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(0), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto height = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(1), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto blur = convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(2), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto color = state-&gt;argument(3).isUndefined() ? String() : state-&gt;uncheckedArgument(3).toWTFString(state);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto alpha = state-&gt;argument(4).isUndefined() ? Optional&lt;float&gt;() : convert&lt;float&gt;(*state, state-&gt;uncheckedArgument(4), ShouldAllowNonFinite::Yes);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.setShadow(WTFMove(width), WTFMove(height), WTFMove(blur), WTFMove(color), WTFMove(alpha));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -549,8 +536,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto sequenceArg = toRefPtrNativeArray&lt;SerializedScriptValue, JSSerializedScriptValue&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsNumber(impl.methodWithSequenceArg(WTFMove(sequenceArg)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="lines">@@ -569,8 +555,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto sequenceArg = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.nullableSequenceArg(WTFMove(sequenceArg));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -589,11 +574,9 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto arg1 = convert&lt;uint64_t&gt;(*state, state-&gt;uncheckedArgument(0), Clamp);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     auto arg2 = state-&gt;argument(1).isUndefined() ? Optional&lt;uint64_t&gt;() : convert&lt;uint64_t&gt;(*state, state-&gt;uncheckedArgument(1), Clamp);
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     impl.funcWithClamp(WTFMove(arg1), WTFMove(arg2));
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="lines">@@ -628,8 +611,7 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto values = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringSequenceFunction(WTFMove(values), ec));
</span><span class="cx"> 
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="lines">@@ -651,8 +633,7 @@
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     ExceptionCode ec = 0;
</span><span class="cx">     auto values = toNativeArray&lt;String&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsArray(state, castedThis-&gt;globalObject(), impl.stringSequenceFunction2(WTFMove(values), ec));
</span><span class="cx"> 
</span><span class="cx">     setDOMException(state, throwScope, ec);
</span><span class="lines">@@ -673,8 +654,7 @@
</span><span class="cx">     if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
</span><span class="cx">     auto sequenceArg = toRefPtrNativeArray&lt;TestEventTarget, JSTestEventTarget&gt;(*state, state-&gt;uncheckedArgument(0));
</span><del>-    if (UNLIKELY(throwScope.exception()))
-        return JSValue::encode(jsUndefined());
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(WTFMove(sequenceArg)));
</span><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>