<!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>[210403] branches/safari-603-branch/Source/JavaScriptCore</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/210403">210403</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-01-05 17:47:32 -0800 (Thu, 05 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/210038">r210038</a>. rdar://problem/29759741</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari603branchSourceJavaScriptCoreChangeLog">branches/safari-603-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmJSWebAssemblycpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/JSWebAssembly.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyCompileErrorConstructorcpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyFunctioncpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyInstanceConstructorcpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyMemoryConstructorcpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyModuleConstructorcpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyRuntimeErrorConstructorcpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyTableConstructorcpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp</a></li>
<li><a href="#branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyTablePrototypecpp">branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari603branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/ChangeLog (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/ChangeLog        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/ChangeLog        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -1,5 +1,45 @@
</span><span class="cx"> 2017-01-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r210038. rdar://problem/29759741
+
+    2016-12-20  JF Bastien  &lt;jfbastien@apple.com&gt;
+
+            WebAssembly: construct 32-bit encodedJSValue properly
+            https://bugs.webkit.org/show_bug.cgi?id=166199
+
+            Reviewed by Mark Lam.
+
+            Constructing an encodedJSValue using `{ }` yields the wrong value
+            on 32-bit platforms. WebAssembly doesn't currently target 32-bit
+            platforms, but we may as well get it right.
+
+            * wasm/JSWebAssembly.cpp:
+            (JSC::webAssemblyCompileFunc):
+            (JSC::webAssemblyValidateFunc):
+            * wasm/js/JSWebAssemblyHelpers.h:
+            (JSC::toNonWrappingUint32):
+            * wasm/js/WebAssemblyCompileErrorConstructor.cpp:
+            (JSC::constructJSWebAssemblyCompileError):
+            * wasm/js/WebAssemblyFunction.cpp:
+            (JSC::callWebAssemblyFunction):
+            * wasm/js/WebAssemblyInstanceConstructor.cpp:
+            (JSC::constructJSWebAssemblyInstance):
+            * wasm/js/WebAssemblyMemoryConstructor.cpp:
+            (JSC::constructJSWebAssemblyMemory):
+            * wasm/js/WebAssemblyModuleConstructor.cpp:
+            (JSC::constructJSWebAssemblyModule):
+            * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
+            (JSC::constructJSWebAssemblyRuntimeError):
+            * wasm/js/WebAssemblyTableConstructor.cpp:
+            (JSC::constructJSWebAssemblyTable):
+            * wasm/js/WebAssemblyTablePrototype.cpp:
+            (JSC::webAssemblyTableProtoFuncLength):
+            (JSC::webAssemblyTableProtoFuncGrow):
+            (JSC::webAssemblyTableProtoFuncGet):
+            (JSC::webAssemblyTableProtoFuncSet):
+
+2017-01-05  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
</ins><span class="cx">         Merge r210026. rdar://problem/29735737
</span><span class="cx"> 
</span><span class="cx">     2016-12-20  JF Bastien  &lt;jfbastien@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmJSWebAssemblycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/JSWebAssembly.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/JSWebAssembly.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/JSWebAssembly.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     auto catchScope = DECLARE_CATCH_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     JSPromiseDeferred* promise = JSPromiseDeferred::create(exec, exec-&gt;lexicalGlobalObject());
</span><del>-    RETURN_IF_EXCEPTION(catchScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(catchScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Make this truly asynchronous:
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=166016
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     size_t byteOffset;
</span><span class="cx">     size_t byteSize;
</span><span class="cx">     uint8_t* base = getWasmBufferFromValue(exec, exec-&gt;argument(0), byteOffset, byteSize);
</span><del>-    RETURN_IF_EXCEPTION(scope, { });
</del><ins>+    RETURN_IF_EXCEPTION(scope, encodedJSValue());
</ins><span class="cx">     Wasm::Plan plan(&amp;vm, base + byteOffset, byteSize);
</span><span class="cx">     // FIXME: We might want to throw an OOM exception here if we detect that something will OOM.
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=166015
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyCompileErrorConstructorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">     JSValue message = state-&gt;argument(0);
</span><span class="cx">     auto* structure = InternalFunction::createSubclassStructure(state, state-&gt;newTarget(), asInternalFunction(state-&gt;jsCallee())-&gt;globalObject()-&gt;WebAssemblyCompileErrorStructure());
</span><del>-    RETURN_IF_EXCEPTION(scope, { });
</del><ins>+    RETURN_IF_EXCEPTION(scope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(JSWebAssemblyCompileError::create(state, structure, message, false));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyFunctioncpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">         case Wasm::Anyfunc:
</span><span class="cx">             RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><del>-        RETURN_IF_EXCEPTION(scope, { });
</del><ins>+        RETURN_IF_EXCEPTION(scope, encodedJSValue());
</ins><span class="cx">         boxedArgs.append(arg);
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyInstanceConstructorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -77,13 +77,13 @@
</span><span class="cx"> 
</span><span class="cx">     Identifier moduleKey = Identifier::fromUid(PrivateName(PrivateName::Description, &quot;WebAssemblyInstance&quot;));
</span><span class="cx">     WebAssemblyModuleRecord* moduleRecord = WebAssemblyModuleRecord::create(exec, vm, globalObject-&gt;webAssemblyModuleRecordStructure(), moduleKey, moduleInformation);
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     Structure* instanceStructure = InternalFunction::createSubclassStructure(exec, exec-&gt;newTarget(), globalObject-&gt;WebAssemblyInstanceStructure());
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     JSWebAssemblyInstance* instance = JSWebAssemblyInstance::create(vm, instanceStructure, jsModule, moduleRecord-&gt;getModuleNamespace(exec));
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     // Let funcs, memories and tables be initially-empty lists of callable JavaScript objects, WebAssembly.Memory objects and WebAssembly.Table objects, respectively.
</span><span class="cx">     // Let imports be an initially-empty list of external values.
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     for (auto&amp; import : moduleInformation.imports) {
</span><span class="cx">         // 1. Let o be the resultant value of performing Get(importObject, i.module_name).
</span><span class="cx">         JSValue importModuleValue = importObject-&gt;get(exec, import.module);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         // 2. If Type(o) is not Object, throw a TypeError.
</span><span class="cx">         if (!importModuleValue.isObject())
</span><span class="cx">             return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral(&quot;import must be an object&quot;), defaultSourceAppender, runtimeTypeForValue(importModuleValue))));
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">         // 3. Let v be the value of performing Get(o, i.item_name)
</span><span class="cx">         JSObject* object = jsCast&lt;JSObject*&gt;(importModuleValue);
</span><span class="cx">         JSValue value = object-&gt;get(exec, import.field);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">         switch (import.kind) {
</span><span class="cx">         case Wasm::ExternalKind::Function: {
</span><span class="lines">@@ -271,13 +271,13 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     moduleRecord-&gt;link(exec, instance);
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     if (verbose)
</span><span class="cx">         moduleRecord-&gt;dump();
</span><span class="cx">     JSValue startResult = moduleRecord-&gt;evaluate(exec);
</span><span class="cx">     UNUSED_PARAM(startResult);
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     return JSValue::encode(instance);
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyMemoryConstructorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -67,9 +67,9 @@
</span><span class="cx">     {
</span><span class="cx">         Identifier initial = Identifier::fromString(&amp;vm, &quot;initial&quot;);
</span><span class="cx">         JSValue minSizeValue = memoryDescriptor-&gt;get(exec, initial);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         uint32_t size = toNonWrappingUint32(exec, minSizeValue);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         if (!Wasm::PageCount::isValid(size))
</span><span class="cx">             return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral(&quot;WebAssembly.Memory 'initial' page count is too large&quot;))));
</span><span class="cx">         initialPageCount = Wasm::PageCount(size);
</span><span class="lines">@@ -79,12 +79,12 @@
</span><span class="cx">     {
</span><span class="cx">         Identifier maximum = Identifier::fromString(&amp;vm, &quot;maximum&quot;);
</span><span class="cx">         bool hasProperty = memoryDescriptor-&gt;hasProperty(exec, maximum);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         if (hasProperty) {
</span><span class="cx">             JSValue maxSizeValue = memoryDescriptor-&gt;get(exec, maximum);
</span><del>-            RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+            RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">             uint32_t size = toNonWrappingUint32(exec, maxSizeValue);
</span><del>-            RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+            RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">             if (!Wasm::PageCount::isValid(size))
</span><span class="cx">                 return JSValue::encode(throwException(exec, throwScope, createRangeError(exec, ASCIILiteral(&quot;WebAssembly.Memory 'maximum' page count is too large&quot;))));
</span><span class="cx">             maximumPageCount = Wasm::PageCount(size);
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyModuleConstructorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">     auto* structure = InternalFunction::createSubclassStructure(exec, exec-&gt;newTarget(), exec-&gt;lexicalGlobalObject()-&gt;WebAssemblyModuleStructure());
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     throwScope.release();
</span><span class="cx">     return JSValue::encode(WebAssemblyModuleConstructor::createModule(exec, structure));
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyRuntimeErrorConstructorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">     JSValue message = state-&gt;argument(0);
</span><span class="cx">     auto* structure = InternalFunction::createSubclassStructure(state, state-&gt;newTarget(), asInternalFunction(state-&gt;jsCallee())-&gt;globalObject()-&gt;WebAssemblyRuntimeErrorStructure());
</span><del>-    RETURN_IF_EXCEPTION(scope, { });
</del><ins>+    RETURN_IF_EXCEPTION(scope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(JSWebAssemblyRuntimeError::create(state, structure, message, false));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyTableConstructorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -61,9 +61,9 @@
</span><span class="cx">     {
</span><span class="cx">         Identifier elementIdent = Identifier::fromString(&amp;vm, &quot;element&quot;);
</span><span class="cx">         JSValue elementValue = memoryDescriptor-&gt;get(exec, elementIdent);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         String elementString = elementValue.toWTFString(exec);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         if (elementString != &quot;anyfunc&quot;)
</span><span class="cx">             return JSValue::encode(throwException(exec, throwScope, createTypeError(exec, ASCIILiteral(&quot;WebAssembly.Table expects its 'element' field to be the string 'anyfunc'&quot;))));
</span><span class="cx">     }
</span><span class="lines">@@ -70,19 +70,19 @@
</span><span class="cx"> 
</span><span class="cx">     Identifier initialIdent = Identifier::fromString(&amp;vm, &quot;initial&quot;);
</span><span class="cx">     JSValue initialSizeValue = memoryDescriptor-&gt;get(exec, initialIdent);
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     uint32_t initial = toNonWrappingUint32(exec, initialSizeValue);
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     std::optional&lt;uint32_t&gt; maximum;
</span><span class="cx">     Identifier maximumIdent = Identifier::fromString(&amp;vm, &quot;maximum&quot;);
</span><span class="cx">     bool hasProperty = memoryDescriptor-&gt;hasProperty(exec, maximumIdent);
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (hasProperty) {
</span><span class="cx">         JSValue maxSizeValue = memoryDescriptor-&gt;get(exec, maximumIdent);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">         maximum = toNonWrappingUint32(exec, maxSizeValue);
</span><del>-        RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">         if (initial &gt; *maximum) {
</span><span class="cx">             return JSValue::encode(throwException(exec, throwScope,
</span></span></pre></div>
<a id="branchessafari603branchSourceJavaScriptCorewasmjsWebAssemblyTablePrototypecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp (210402 => 210403)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp        2017-01-06 01:47:27 UTC (rev 210402)
+++ branches/safari-603-branch/Source/JavaScriptCore/wasm/js/WebAssemblyTablePrototype.cpp        2017-01-06 01:47:32 UTC (rev 210403)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     JSWebAssemblyTable* table = getTable(exec, vm, exec-&gt;thisValue());
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     return JSValue::encode(jsNumber(table-&gt;size()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -77,10 +77,10 @@
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     JSWebAssemblyTable* table = getTable(exec, vm, exec-&gt;thisValue());
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     uint32_t index = toNonWrappingUint32(exec, exec-&gt;argument(0));
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (!table-&gt;grow(index)) {
</span><span class="cx">         throwException(exec, throwScope,
</span><span class="cx">             createTypeError(exec, ASCIILiteral(&quot;WebAssembly.Table.prototype.grow could not grow the table&quot;)));
</span><span class="lines">@@ -96,10 +96,10 @@
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     JSWebAssemblyTable* table = getTable(exec, vm, exec-&gt;thisValue());
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     uint32_t index = toNonWrappingUint32(exec, exec-&gt;argument(0));
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx">     if (index &gt;= table-&gt;size()) {
</span><span class="cx">         throwException(exec, throwScope,
</span><span class="cx">             createRangeError(exec, ASCIILiteral(&quot;WebAssembly.Table.prototype.get expects an integer less than the size of the table&quot;)));
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     JSWebAssemblyTable* table = getTable(exec, vm, exec-&gt;thisValue());
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     JSValue value = exec-&gt;argument(1);
</span><span class="cx">     WebAssemblyFunction* function = jsDynamicCast&lt;WebAssemblyFunction*&gt;(value);
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     uint32_t index = toNonWrappingUint32(exec, exec-&gt;argument(0));
</span><del>-    RETURN_IF_EXCEPTION(throwScope, { });
</del><ins>+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</ins><span class="cx"> 
</span><span class="cx">     if (index &gt;= table-&gt;size()) {
</span><span class="cx">         throwException(exec, throwScope,
</span></span></pre>
</div>
</div>

</body>
</html>