<!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>[206870] trunk/Source</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/206870">206870</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2016-10-06 10:59:33 -0700 (Thu, 06 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebCore][JSC] Use new @throwTypeError and @throwRangeError intrinsics
https://bugs.webkit.org/show_bug.cgi?id=163001

Reviewed by Keith Miller.

Source/JavaScriptCore:

Previously, the argument of @throwXXXError intrinsics must be string literal.
But it is error-prone restriction. This patch relaxes the restriction to accept
arbitrary values. To keep emitted bytecode small, if the argument is string literal,
we generate the same bytecode as before. If the argument is not string literal,
we evaluate it and perform to_string before passing to throw_static_error.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitThrowStaticError):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emit_intrinsic_throwTypeError):
(JSC::BytecodeIntrinsicNode::emit_intrinsic_throwRangeError):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):

Source/WebCore:

Replace `throw new @XXXError(...)` to @throwXXXError intrinsic.
It reduces the size of bytecode sequence and facilitate inlining.

No behavior change.

* Modules/fetch/FetchHeaders.js:
(initializeFetchHeaders):
* Modules/fetch/FetchInternals.js:
(fillFetchHeaders):
* Modules/fetch/FetchRequest.js:
(initializeFetchRequest):
* Modules/fetch/FetchResponse.js:
(initializeFetchResponse):
(clone):
* Modules/mediastream/NavigatorUserMedia.js:
(webkitGetUserMedia):
* Modules/mediastream/RTCPeerConnection.js:
(initializeRTCPeerConnection):
(getLocalStreams):
(getStreamById):
(addStream):
* Modules/streams/ReadableStream.js:
(initializeReadableStream):
(getReader):
* Modules/streams/ReadableStreamDefaultController.js:
(enqueue):
(error):
(close):
* Modules/streams/ReadableStreamDefaultReader.js:
(releaseLock):
* Modules/streams/ReadableStreamInternals.js:
(privateInitializeReadableStreamDefaultReader):
(privateInitializeReadableStreamDefaultController):
(doStructuredClone):
(readableStreamError):
* Modules/streams/StreamInternals.js:
(validateAndNormalizeQueuingStrategy):
(enqueueValueWithSize):
* Modules/streams/WritableStream.js:
(initializeWritableStream):
(state):
* xml/XMLHttpRequest.js:
(response):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp">trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchHeadersjs">trunk/Source/WebCore/Modules/fetch/FetchHeaders.js</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchInternalsjs">trunk/Source/WebCore/Modules/fetch/FetchInternals.js</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchRequestjs">trunk/Source/WebCore/Modules/fetch/FetchRequest.js</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchResponsejs">trunk/Source/WebCore/Modules/fetch/FetchResponse.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamNavigatorUserMediajs">trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionjs">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamjs">trunk/Source/WebCore/Modules/streams/ReadableStream.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamDefaultControllerjs">trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamDefaultReaderjs">trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsReadableStreamInternalsjs">trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsStreamInternalsjs">trunk/Source/WebCore/Modules/streams/StreamInternals.js</a></li>
<li><a href="#trunkSourceWebCoreModulesstreamsWritableStreamjs">trunk/Source/WebCore/Modules/streams/WritableStream.js</a></li>
<li><a href="#trunkSourceWebCorexmlXMLHttpRequestjs">trunk/Source/WebCore/xml/XMLHttpRequest.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-10-06  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        [WebCore][JSC] Use new @throwTypeError and @throwRangeError intrinsics
+        https://bugs.webkit.org/show_bug.cgi?id=163001
+
+        Reviewed by Keith Miller.
+
+        Previously, the argument of @throwXXXError intrinsics must be string literal.
+        But it is error-prone restriction. This patch relaxes the restriction to accept
+        arbitrary values. To keep emitted bytecode small, if the argument is string literal,
+        we generate the same bytecode as before. If the argument is not string literal,
+        we evaluate it and perform to_string before passing to throw_static_error.
+
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitThrowStaticError):
+        * bytecompiler/BytecodeGenerator.h:
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::BytecodeIntrinsicNode::emit_intrinsic_throwTypeError):
+        (JSC::BytecodeIntrinsicNode::emit_intrinsic_throwRangeError):
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::parseBlock):
+
</ins><span class="cx"> 2016-10-05  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JSC] Add @throwXXXError bytecode intrinsic
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -3905,6 +3905,15 @@
</span><span class="cx">     return localScopeDepth() + m_finallyDepth;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void BytecodeGenerator::emitThrowStaticError(ErrorType errorType, RegisterID* raw)
+{
+    RefPtr&lt;RegisterID&gt; message = newTemporary();
+    emitToString(message.get(), raw);
+    emitOpcode(op_throw_static_error);
+    instructions().append(message-&gt;index());
+    instructions().append(static_cast&lt;unsigned&gt;(errorType));
+}
+
</ins><span class="cx"> void BytecodeGenerator::emitThrowStaticError(ErrorType errorType, const Identifier&amp; message)
</span><span class="cx"> {
</span><span class="cx">     emitOpcode(op_throw_static_error);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -662,6 +662,7 @@
</span><span class="cx">             emitUnaryNoDstOp(op_throw, exc);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        void emitThrowStaticError(ErrorType, RegisterID*);
</ins><span class="cx">         void emitThrowStaticError(ErrorType, const Identifier&amp; message);
</span><span class="cx">         void emitThrowReferenceError(const String&amp; message);
</span><span class="cx">         void emitThrowTypeError(const String&amp; message);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -901,11 +901,14 @@
</span><span class="cx"> RegisterID* BytecodeIntrinsicNode::emit_intrinsic_throwTypeError(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><span class="cx">     ArgumentListNode* node = m_args-&gt;m_listNode;
</span><del>-    ASSERT(node-&gt;m_expr-&gt;isString());
-    const Identifier&amp; ident = static_cast&lt;StringNode*&gt;(node-&gt;m_expr)-&gt;value();
</del><span class="cx">     ASSERT(!node-&gt;m_next);
</span><del>-
-    generator.emitThrowTypeError(ident);
</del><ins>+    if (node-&gt;m_expr-&gt;isString()) {
+        const Identifier&amp; ident = static_cast&lt;StringNode*&gt;(node-&gt;m_expr)-&gt;value();
+        generator.emitThrowTypeError(ident);
+    } else {
+        RefPtr&lt;RegisterID&gt; message = generator.emitNode(node);
+        generator.emitThrowStaticError(ErrorType::TypeError, message.get());
+    }
</ins><span class="cx">     return dst;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -912,11 +915,15 @@
</span><span class="cx"> RegisterID* BytecodeIntrinsicNode::emit_intrinsic_throwRangeError(BytecodeGenerator&amp; generator, RegisterID* dst)
</span><span class="cx"> {
</span><span class="cx">     ArgumentListNode* node = m_args-&gt;m_listNode;
</span><del>-    ASSERT(node-&gt;m_expr-&gt;isString());
-    const Identifier&amp; ident = static_cast&lt;StringNode*&gt;(node-&gt;m_expr)-&gt;value();
</del><span class="cx">     ASSERT(!node-&gt;m_next);
</span><ins>+    if (node-&gt;m_expr-&gt;isString()) {
+        const Identifier&amp; ident = static_cast&lt;StringNode*&gt;(node-&gt;m_expr)-&gt;value();
+        generator.emitThrowRangeError(ident);
+    } else {
+        RefPtr&lt;RegisterID&gt; message = generator.emitNode(node);
+        generator.emitThrowStaticError(ErrorType::RangeError, message.get());
+    }
</ins><span class="cx"> 
</span><del>-    generator.emitThrowRangeError(ident);
</del><span class="cx">     return dst;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGByteCodeParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -4660,6 +4660,7 @@
</span><span class="cx">             LAST_OPCODE(op_throw);
</span><span class="cx">             
</span><span class="cx">         case op_throw_static_error:
</span><ins>+            addToGraph(Phantom, get(VirtualRegister(currentInstruction[1].u.operand))); // Keep argument live.
</ins><span class="cx">             addToGraph(ThrowStaticError);
</span><span class="cx">             flushForTerminal();
</span><span class="cx">             addToGraph(Unreachable);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/ChangeLog        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2016-10-06  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        [WebCore][JSC] Use new @throwTypeError and @throwRangeError intrinsics
+        https://bugs.webkit.org/show_bug.cgi?id=163001
+
+        Reviewed by Keith Miller.
+
+        Replace `throw new @XXXError(...)` to @throwXXXError intrinsic.
+        It reduces the size of bytecode sequence and facilitate inlining.
+
+        No behavior change.
+
+        * Modules/fetch/FetchHeaders.js:
+        (initializeFetchHeaders):
+        * Modules/fetch/FetchInternals.js:
+        (fillFetchHeaders):
+        * Modules/fetch/FetchRequest.js:
+        (initializeFetchRequest):
+        * Modules/fetch/FetchResponse.js:
+        (initializeFetchResponse):
+        (clone):
+        * Modules/mediastream/NavigatorUserMedia.js:
+        (webkitGetUserMedia):
+        * Modules/mediastream/RTCPeerConnection.js:
+        (initializeRTCPeerConnection):
+        (getLocalStreams):
+        (getStreamById):
+        (addStream):
+        * Modules/streams/ReadableStream.js:
+        (initializeReadableStream):
+        (getReader):
+        * Modules/streams/ReadableStreamDefaultController.js:
+        (enqueue):
+        (error):
+        (close):
+        * Modules/streams/ReadableStreamDefaultReader.js:
+        (releaseLock):
+        * Modules/streams/ReadableStreamInternals.js:
+        (privateInitializeReadableStreamDefaultReader):
+        (privateInitializeReadableStreamDefaultController):
+        (doStructuredClone):
+        (readableStreamError):
+        * Modules/streams/StreamInternals.js:
+        (validateAndNormalizeQueuingStrategy):
+        (enqueueValueWithSize):
+        * Modules/streams/WritableStream.js:
+        (initializeWritableStream):
+        (state):
+        * xml/XMLHttpRequest.js:
+        (response):
+
</ins><span class="cx"> 2016-10-06  John Wilander  &lt;wilander@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update Resource Load Statistics
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchHeadersjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchHeaders.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchHeaders.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/fetch/FetchHeaders.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">         return this;
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(headersInit))
</span><del>-        throw new @TypeError(&quot;headersInit must be an object&quot;);
</del><ins>+        @throwTypeError(&quot;headersInit must be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     @fillFetchHeaders(this, headersInit);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchInternals.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchInternals.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/fetch/FetchInternals.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">         for (let i = 0; i &lt; headersInit.length; i++) {
</span><span class="cx">             let header = headersInit[i];
</span><span class="cx">             if (header.length !== 2)
</span><del>-                throw new @TypeError(&quot;headersInit sequence items should contain two values&quot;);
</del><ins>+                @throwTypeError(&quot;headersInit sequence items should contain two values&quot;);
</ins><span class="cx">             @Headers.prototype.@appendFromJS.@call(headers, header[0], header[1]);
</span><span class="cx">         }
</span><span class="cx">         return this;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchRequestjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchRequest.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">     if (init === @undefined)
</span><span class="cx">         init = { };
</span><span class="cx">     else if (!@isObject(init))
</span><del>-        throw new @TypeError(&quot;Request init must be an object&quot;);
</del><ins>+        @throwTypeError(&quot;Request init must be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let headers = this.@initializeWith(input, init);
</span><span class="cx">     @assert(headers instanceof @Headers);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchResponsejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchResponse.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -32,11 +32,11 @@
</span><span class="cx">     if (init === @undefined)
</span><span class="cx">         init = { };
</span><span class="cx">     else if (!@isObject(init))
</span><del>-        throw new @TypeError(&quot;Response init must be an object&quot;);
</del><ins>+        @throwTypeError(&quot;Response init must be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let status = (init.status !== @undefined) ? @toNumber(init.status) : 200;
</span><span class="cx">     if (status &lt; 200  || status &gt; 599)
</span><del>-        throw new @RangeError(&quot;Status must be between 200 and 599&quot;);
</del><ins>+        @throwRangeError(&quot;Status must be between 200 and 599&quot;);
</ins><span class="cx"> 
</span><span class="cx">     let statusText = (init.statusText !== @undefined) ? init.statusText : &quot;OK&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (body !== @undefined &amp;&amp; body !== null) {
</span><span class="cx">         if (status == 101 || status == 204 || status == 205 || status == 304)
</span><del>-            throw new @TypeError(&quot;Response cannot have a body with the given status&quot;);
</del><ins>+            @throwTypeError(&quot;Response cannot have a body with the given status&quot;);
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: Use @isReadableStream once it is no longer guarded by READABLE_STREAM_API guard.
</span><span class="cx">         let isBodyReadableStream = (@isObject(body) &amp;&amp; !!body.@readableStreamController);
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">         throw @makeThisTypeError(&quot;Response&quot;, &quot;clone&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (@Response.prototype.@isDisturbed.@call(this) || (this.@body &amp;&amp; @isReadableStreamLocked(this.@body)))
</span><del>-        throw new @TypeError(&quot;Cannot clone a disturbed Response&quot;);
</del><ins>+        @throwTypeError(&quot;Cannot clone a disturbed Response&quot;);
</ins><span class="cx"> 
</span><span class="cx">     var cloned = @Response.prototype.@cloneForJS.@call(this);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamNavigatorUserMediajs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -34,15 +34,15 @@
</span><span class="cx">         throw @makeThisTypeError(&quot;Navigator&quot;, &quot;webkitGetUserMedia&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (arguments.length &lt; 3)
</span><del>-        throw new @TypeError(&quot;Not enough arguments&quot;);
</del><ins>+        @throwTypeError(&quot;Not enough arguments&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (options !== @Object(options))
</span><del>-        throw new @TypeError(&quot;Argument 1 (options) to Navigator.webkitGetUserMedia must be an object&quot;);
</del><ins>+        @throwTypeError(&quot;Argument 1 (options) to Navigator.webkitGetUserMedia must be an object&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (typeof successCallback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Argument 2 ('successCallback') to Navigator.webkitGetUserMedia must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Argument 2 ('successCallback') to Navigator.webkitGetUserMedia must be a function&quot;);
</ins><span class="cx">     if (typeof errorCallback !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;Argument 3 ('errorCallback') to Navigator.webkitGetUserMedia must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.mediaDevices.@getUserMedia(options).@then(successCallback, errorCallback);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -35,10 +35,10 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (arguments.length &lt; 1)
</span><del>-        throw new @TypeError(&quot;Not enough arguments&quot;);
</del><ins>+        @throwTypeError(&quot;Not enough arguments&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (!@isObject(configuration))
</span><del>-        throw new @TypeError(&quot;RTCPeerConnection argument must be a valid Dictionary&quot;);
</del><ins>+        @throwTypeError(&quot;RTCPeerConnection argument must be a valid Dictionary&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Handle errors in a better way than catching and re-throwing (http://webkit.org/b/158936)
</span><span class="cx">     try {
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     } catch (e) {
</span><span class="cx">         const message = e.name === &quot;TypeMismatchError&quot; ? &quot;Invalid RTCPeerConnection constructor arguments&quot;
</span><span class="cx">             : &quot;Error creating RTCPeerConnection&quot;;
</span><del>-        throw new @TypeError(message);
</del><ins>+        @throwTypeError(message);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     this.@operations = [];
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isRTCPeerConnection(this))
</span><del>-        throw new @TypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</del><ins>+        @throwTypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return this.@localStreams.slice();
</span><span class="cx"> }
</span><span class="lines">@@ -70,10 +70,10 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isRTCPeerConnection(this))
</span><del>-        throw new @TypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</del><ins>+        @throwTypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (arguments.length &lt; 1)
</span><del>-        throw new @TypeError(&quot;Not enough arguments&quot;);
</del><ins>+        @throwTypeError(&quot;Not enough arguments&quot;);
</ins><span class="cx"> 
</span><span class="cx">     const streamId = @String(streamIdArg);
</span><span class="cx"> 
</span><span class="lines">@@ -87,13 +87,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isRTCPeerConnection(this))
</span><del>-        throw new @TypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</del><ins>+        @throwTypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (arguments.length &lt; 1)
</span><del>-        throw new @TypeError(&quot;Not enough arguments&quot;);
</del><ins>+        @throwTypeError(&quot;Not enough arguments&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (!(stream instanceof @MediaStream))
</span><del>-        throw new @TypeError(&quot;Argument 1 ('stream') to RTCPeerConnection.addStream must be an instance of MediaStream&quot;);
</del><ins>+        @throwTypeError(&quot;Argument 1 ('stream') to RTCPeerConnection.addStream must be an instance of MediaStream&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (this.@localStreams.find(localStream =&gt; localStream.id === stream.id))
</span><span class="cx">         return;
</span><span class="lines">@@ -107,13 +107,13 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isRTCPeerConnection(this))
</span><del>-        throw new @TypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</del><ins>+        @throwTypeError(&quot;Function should be called on an RTCPeerConnection&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (arguments.length &lt; 1)
</span><del>-        throw new @TypeError(&quot;Not enough arguments&quot;);
</del><ins>+        @throwTypeError(&quot;Not enough arguments&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (!(stream instanceof @MediaStream))
</span><del>-        throw new @TypeError(&quot;Argument 1 ('stream') to RTCPeerConnection.removeStream must be an instance of MediaStream&quot;);
</del><ins>+        @throwTypeError(&quot;Argument 1 ('stream') to RTCPeerConnection.removeStream must be an instance of MediaStream&quot;);
</ins><span class="cx"> 
</span><span class="cx">     const indexOfStreamToRemove = this.@localStreams.findIndex(localStream =&gt; localStream.id === stream.id);
</span><span class="cx">     if (indexOfStreamToRemove === -1)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStream.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStream.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/streams/ReadableStream.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -36,10 +36,10 @@
</span><span class="cx">          strategy = { highWaterMark: 1, size: function() { return 1; } };
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(underlyingSource))
</span><del>-        throw new @TypeError(&quot;ReadableStream constructor takes an object as first argument&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStream constructor takes an object as first argument&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (strategy !== @undefined &amp;&amp; !@isObject(strategy))
</span><del>-        throw new @TypeError(&quot;ReadableStream constructor takes an object as second argument, if any&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStream constructor takes an object as second argument, if any&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.@state = @streamReadable;
</span><span class="cx">     this.@reader = @undefined;
</span><span class="lines">@@ -53,13 +53,13 @@
</span><span class="cx"> 
</span><span class="cx">     if (typeString === &quot;bytes&quot;) {
</span><span class="cx">          // FIXME: Implement support of ReadableByteStreamController.
</span><del>-        throw new @TypeError(&quot;ReadableByteStreamController is not implemented&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableByteStreamController is not implemented&quot;);
</ins><span class="cx">     } else if (type === @undefined) {
</span><span class="cx">         if (strategy.highWaterMark === @undefined)
</span><span class="cx">             strategy.highWaterMark = 1;
</span><span class="cx">         this.@readableStreamController = new @ReadableStreamDefaultController(this, underlyingSource, strategy.size, strategy.highWaterMark);
</span><span class="cx">     } else
</span><del>-        throw new @RangeError(&quot;Invalid type for underlying source&quot;);
</del><ins>+        @throwRangeError(&quot;Invalid type for underlying source&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return this;
</span><span class="cx"> }
</span><span class="lines">@@ -89,13 +89,13 @@
</span><span class="cx"> 
</span><span class="cx">     if (options.mode === 'byob') {
</span><span class="cx">         // FIXME: Update once ReadableByteStreamContoller and ReadableStreamBYOBReader are implemented.
</span><del>-        throw new @TypeError(&quot;ReadableStreamBYOBReader is not implemented&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStreamBYOBReader is not implemented&quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (options.mode === @undefined)
</span><span class="cx">         return new @ReadableStreamDefaultReader(this);
</span><span class="cx"> 
</span><del>-    throw new @RangeError(&quot;Invalid mode is specified&quot;);
</del><ins>+    @throwRangeError(&quot;Invalid mode is specified&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function pipeThrough(streams, options)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamDefaultControllerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultController.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -33,10 +33,10 @@
</span><span class="cx">         throw @makeThisTypeError(&quot;ReadableStreamDefaultController&quot;, &quot;enqueue&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (this.@closeRequested)
</span><del>-        throw new @TypeError(&quot;ReadableStreamDefaultController is requested to close&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStreamDefaultController is requested to close&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (this.@controlledReadableStream.@state !== @streamReadable)
</span><del>-        throw new @TypeError(&quot;ReadableStream is not readable&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStream is not readable&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return @readableStreamDefaultControllerEnqueue(this, chunk);
</span><span class="cx"> }
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx">     const stream = this.@controlledReadableStream;
</span><span class="cx">     if (stream.@state !== @streamReadable)
</span><del>-        throw new @TypeError(&quot;ReadableStream is not readable&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStream is not readable&quot;);
</ins><span class="cx"> 
</span><span class="cx">     @readableStreamError(stream, error);
</span><span class="cx"> }
</span><span class="lines">@@ -63,10 +63,10 @@
</span><span class="cx">         throw @makeThisTypeError(&quot;ReadableStreamDefaultController&quot;, &quot;close&quot;);
</span><span class="cx"> 
</span><span class="cx">     if (this.@closeRequested)
</span><del>-        throw new @TypeError(&quot;ReadableStreamDefaultController is already requested to close&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStreamDefaultController is already requested to close&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (this.@controlledReadableStream.@state !== @streamReadable)
</span><del>-        throw new @TypeError(&quot;ReadableStream is not readable&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStream is not readable&quot;);
</ins><span class="cx"> 
</span><span class="cx">     @readableStreamDefaultControllerClose(this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamDefaultReaderjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamDefaultReader.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">          return;
</span><span class="cx"> 
</span><span class="cx">     if (this.@readRequests.length)
</span><del>-        throw new @TypeError(&quot;There are still pending read requests, cannot release the lock&quot;);
</del><ins>+        @throwTypeError(&quot;There are still pending read requests, cannot release the lock&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (stream.@state === @streamReadable)
</span><span class="cx">         this.@closedPromiseCapability.@reject.@call(@undefined, new @TypeError(&quot;releasing lock of reader whose stream is still in readable state&quot;));
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsReadableStreamInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/streams/ReadableStreamInternals.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -32,9 +32,9 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isReadableStream(stream))
</span><del>-       throw new @TypeError(&quot;ReadableStreamDefaultReader needs a ReadableStream&quot;);
</del><ins>+       @throwTypeError(&quot;ReadableStreamDefaultReader needs a ReadableStream&quot;);
</ins><span class="cx">     if (@isReadableStreamLocked(stream))
</span><del>-       throw new @TypeError(&quot;ReadableStream is locked&quot;);
</del><ins>+       @throwTypeError(&quot;ReadableStream is locked&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.@readRequests = [];
</span><span class="cx">     this.@ownerReadableStream = stream;
</span><span class="lines">@@ -58,11 +58,11 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isReadableStream(stream))
</span><del>-        throw new @TypeError(&quot;ReadableStreamDefaultController needs a ReadableStream&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStreamDefaultController needs a ReadableStream&quot;);
</ins><span class="cx"> 
</span><span class="cx">     // readableStreamController is initialized with null value.
</span><span class="cx">     if (stream.@readableStreamController !== null)
</span><del>-        throw new @TypeError(&quot;ReadableStream already has a controller&quot;);
</del><ins>+        @throwTypeError(&quot;ReadableStream already has a controller&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.@controlledReadableStream = stream;
</span><span class="cx">     this.@underlyingSource = underlyingSource;
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx">     if (@ArrayBuffer.@isView(object))
</span><span class="cx">         return @structuredCloneArrayBufferView(object);
</span><span class="cx"> 
</span><del>-    throw new @TypeError(&quot;structuredClone not implemented for: &quot; + object);
</del><ins>+    @throwTypeError(&quot;structuredClone not implemented for: &quot; + object);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function readableStreamTeePullFunction(teeState, reader, shouldClone)
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx">         reader.@readRequests = [];
</span><span class="cx">     } else
</span><span class="cx">         // FIXME: Implement ReadableStreamBYOBReader.
</span><del>-        throw new @TypeError(&quot;Only ReadableStreamDefaultReader is currently supported&quot;);
</del><ins>+        @throwTypeError(&quot;Only ReadableStreamDefaultReader is currently supported&quot;);
</ins><span class="cx"> 
</span><span class="cx">     reader.@closedPromiseCapability.@reject.@call(@undefined, error);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsStreamInternalsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/StreamInternals.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/StreamInternals.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/streams/StreamInternals.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (size !== @undefined &amp;&amp; typeof size !== &quot;function&quot;)
</span><del>-        throw new @TypeError(&quot;size parameter must be a function&quot;);
</del><ins>+        @throwTypeError(&quot;size parameter must be a function&quot;);
</ins><span class="cx"> 
</span><span class="cx">     const normalizedStrategy = { };
</span><span class="cx"> 
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">     normalizedStrategy.highWaterMark = @Number(highWaterMark);
</span><span class="cx"> 
</span><span class="cx">     if (@isNaN(normalizedStrategy.highWaterMark) || normalizedStrategy.highWaterMark &lt; 0)
</span><del>-        throw new @RangeError(&quot;highWaterMark value is negative or not a number&quot;);
</del><ins>+        @throwRangeError(&quot;highWaterMark value is negative or not a number&quot;);
</ins><span class="cx"> 
</span><span class="cx">     return normalizedStrategy;
</span><span class="cx"> }
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> 
</span><span class="cx">     size = @Number(size);
</span><span class="cx">     if (!@isFinite(size) || size &lt; 0)
</span><del>-        throw new @RangeError(&quot;size has an incorrect value&quot;);
</del><ins>+        @throwRangeError(&quot;size has an incorrect value&quot;);
</ins><span class="cx">     queue.content.@push({ value: value, size: size });
</span><span class="cx">     queue.size += size;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsWritableStreamjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/streams/WritableStream.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/WritableStream.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/Modules/streams/WritableStream.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -36,10 +36,10 @@
</span><span class="cx">         strategy = { highWaterMark: 0, size: function() { return 1; } };
</span><span class="cx"> 
</span><span class="cx">     if (!@isObject(underlyingSink))
</span><del>-        throw new @TypeError(&quot;WritableStream constructor takes an object as first argument&quot;);
</del><ins>+        @throwTypeError(&quot;WritableStream constructor takes an object as first argument&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (!@isObject(strategy))
</span><del>-        throw new @TypeError(&quot;WritableStream constructor takes an object as second argument, if any&quot;);
</del><ins>+        @throwTypeError(&quot;WritableStream constructor takes an object as second argument, if any&quot;);
</ins><span class="cx"> 
</span><span class="cx">     this.@underlyingSink = underlyingSink;
</span><span class="cx">     this.@closedPromiseCapability = @newPromiseCapability(@Promise);
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx">     &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (!@isWritableStream(this))
</span><del>-        throw new @TypeError(&quot;The WritableStream.state getter can only be used on instances of WritableStream&quot;);
</del><ins>+        @throwTypeError(&quot;The WritableStream.state getter can only be used on instances of WritableStream&quot;);
</ins><span class="cx"> 
</span><span class="cx">     switch(this.@state) {
</span><span class="cx">     case @streamClosed:
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXMLHttpRequestjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLHttpRequest.js (206869 => 206870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLHttpRequest.js        2016-10-06 17:40:12 UTC (rev 206869)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.js        2016-10-06 17:59:33 UTC (rev 206870)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Add a helper routine for that kind of checks.
</span><span class="cx">     if (!(this instanceof @XMLHttpRequest))
</span><del>-        throw new @TypeError(&quot;The XMLHttpRequest.response getter can only be used on instances of XMLHttpRequest&quot;);
</del><ins>+        @throwTypeError(&quot;The XMLHttpRequest.response getter can only be used on instances of XMLHttpRequest&quot;);
</ins><span class="cx"> 
</span><span class="cx">     if (@XMLHttpRequest.prototype.@responseCacheIsValid.@call(this))
</span><span class="cx">         return this.@response;
</span></span></pre>
</div>
</div>

</body>
</html>