<!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>[207411] 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/207411">207411</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2016-10-17 09:59:06 -0700 (Mon, 17 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use the reject() helper function for conditionally throwing TypeErrors.
https://bugs.webkit.org/show_bug.cgi?id=163491

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In some places where we may conditionally throw a TypeError (e.g. when in strict
mode), we already use the reject() helper function to conditionally throw the
TypeError.  Doing so makes the code mode compact.  This patch applies this idiom
consistently in all places that throws TypeError where appropriate.

This patch also does the following:
1. Make the reject() helper function take an ASCIILiteral instead of a const char*
   because we always pass it a literal string anyway.
2. Change the reject helper() to take a ThrowScope&amp;.  This allows the thrown
   error to be attributed to its caller.
3. When an error message string is instantiated repeatedly in more than 1 place,
   create a common copy of that literal string in JSObject.cpp (if one doesn't
   already exist) and use that common string in all those places.
4. Since I was auditing call sites of throwTypeError() to check if they should be
   using the reject() helper instead, I also fixed those up to pass the error
   message as an ASCIILiteral where appropriate.
5. In functions that I touched, change the code to not recompute the VM&amp; when it
   is already available.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ArrayPrototype.cpp:
(JSC::shift):
(JSC::unshift):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncReverse):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/GetterSetter.cpp:
(JSC::callSetter):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::setLengthWithArrayStorage):
(JSC::JSArray::pop):
* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
(JSC::JSValue::putToPrimitiveByIndex):
* runtime/JSDataView.cpp:
(JSC::JSDataView::put):
(JSC::JSDataView::defineOwnProperty):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndex):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView&lt;Adaptor&gt;::defineOwnProperty):
(JSC::JSGenericTypedArrayView&lt;Adaptor&gt;::deleteProperty):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::defineOwnProperty):
* runtime/JSObject.cpp:
(JSC::ordinarySetSlow):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
(JSC::validateAndApplyPropertyDescriptor):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::putInline):
* runtime/JSProxy.cpp:
(JSC::JSProxy::setPrototype):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTablePut):
* runtime/Lookup.h:
(JSC::putEntry):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::defineOwnProperty):
* runtime/RegExpObject.h:
(JSC::RegExpObject::setLastIndex):
* runtime/Reject.h:
(JSC::reject):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayValueMap::putDirect):
(JSC::SparseArrayEntry::put):
* runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::StringObject::putByIndex):
* runtime/SymbolConstructor.cpp:
(JSC::symbolConstructorKeyFor):

Source/WebCore:

No new tests because this patch does not introduce new behavior.

* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createRsaKeyGenParams):
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::invokeMethod):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeArrayPrototypecpp">trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp">trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeGetterSettercpp">trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArraycpp">trunk/Source/JavaScriptCore/runtime/JSArray.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBuffercpp">trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSCJSValuecpp">trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSDataViewcpp">trunk/Source/JavaScriptCore/runtime/JSDataView.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctioncpp">trunk/Source/JavaScriptCore/runtime/JSFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewInlinesh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewPrototypeFunctionsh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSModuleNamespaceObjectcpp">trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjecth">trunk/Source/JavaScriptCore/runtime/JSObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectInlinesh">trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSProxycpp">trunk/Source/JavaScriptCore/runtime/JSProxy.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSSymbolTableObjecth">trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeLookuph">trunk/Source/JavaScriptCore/runtime/Lookup.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpObjectcpp">trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpObjecth">trunk/Source/JavaScriptCore/runtime/RegExpObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRejecth">trunk/Source/JavaScriptCore/runtime/Reject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSparseArrayValueMapcpp">trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStringObjectcpp">trunk/Source/JavaScriptCore/runtime/StringObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSymbolConstructorcpp">trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoAlgorithmDictionarycpp">trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebridgecc_instancecpp">trunk/Source/WebCore/bridge/c/c_instance.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -1,3 +1,100 @@
</span><ins>+2016-10-17  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Use the reject() helper function for conditionally throwing TypeErrors.
+        https://bugs.webkit.org/show_bug.cgi?id=163491
+
+        Reviewed by Filip Pizlo.
+
+        In some places where we may conditionally throw a TypeError (e.g. when in strict
+        mode), we already use the reject() helper function to conditionally throw the
+        TypeError.  Doing so makes the code mode compact.  This patch applies this idiom
+        consistently in all places that throws TypeError where appropriate.
+
+        This patch also does the following:
+        1. Make the reject() helper function take an ASCIILiteral instead of a const char*
+           because we always pass it a literal string anyway.
+        2. Change the reject helper() to take a ThrowScope&amp;.  This allows the thrown
+           error to be attributed to its caller.
+        3. When an error message string is instantiated repeatedly in more than 1 place,
+           create a common copy of that literal string in JSObject.cpp (if one doesn't
+           already exist) and use that common string in all those places.
+        4. Since I was auditing call sites of throwTypeError() to check if they should be
+           using the reject() helper instead, I also fixed those up to pass the error
+           message as an ASCIILiteral where appropriate.
+        5. In functions that I touched, change the code to not recompute the VM&amp; when it
+           is already available.
+
+        * jit/JITOperations.cpp:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+        * runtime/ArrayPrototype.cpp:
+        (JSC::shift):
+        (JSC::unshift):
+        (JSC::arrayProtoFuncPop):
+        (JSC::arrayProtoFuncReverse):
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+        * runtime/GetterSetter.cpp:
+        (JSC::callSetter):
+        * runtime/JSArray.cpp:
+        (JSC::JSArray::defineOwnProperty):
+        (JSC::JSArray::setLengthWithArrayStorage):
+        (JSC::JSArray::pop):
+        * runtime/JSArrayBuffer.cpp:
+        (JSC::JSArrayBuffer::put):
+        (JSC::JSArrayBuffer::defineOwnProperty):
+        * runtime/JSCJSValue.cpp:
+        (JSC::JSValue::putToPrimitive):
+        (JSC::JSValue::putToPrimitiveByIndex):
+        * runtime/JSDataView.cpp:
+        (JSC::JSDataView::put):
+        (JSC::JSDataView::defineOwnProperty):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::put):
+        (JSC::JSFunction::defineOwnProperty):
+        * runtime/JSGenericTypedArrayView.h:
+        (JSC::JSGenericTypedArrayView::setIndex):
+        * runtime/JSGenericTypedArrayViewInlines.h:
+        (JSC::JSGenericTypedArrayView&lt;Adaptor&gt;::defineOwnProperty):
+        (JSC::JSGenericTypedArrayView&lt;Adaptor&gt;::deleteProperty):
+        * runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
+        (JSC::speciesConstruct):
+        (JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
+        * runtime/JSModuleNamespaceObject.cpp:
+        (JSC::JSModuleNamespaceObject::defineOwnProperty):
+        * runtime/JSObject.cpp:
+        (JSC::ordinarySetSlow):
+        (JSC::JSObject::putInlineSlow):
+        (JSC::JSObject::setPrototypeWithCycleCheck):
+        (JSC::JSObject::defineOwnIndexedProperty):
+        (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
+        (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
+        (JSC::validateAndApplyPropertyDescriptor):
+        * runtime/JSObject.h:
+        * runtime/JSObjectInlines.h:
+        (JSC::JSObject::putInline):
+        * runtime/JSProxy.cpp:
+        (JSC::JSProxy::setPrototype):
+        * runtime/JSSymbolTableObject.h:
+        (JSC::symbolTablePut):
+        * runtime/Lookup.h:
+        (JSC::putEntry):
+        * runtime/RegExpObject.cpp:
+        (JSC::RegExpObject::defineOwnProperty):
+        * runtime/RegExpObject.h:
+        (JSC::RegExpObject::setLastIndex):
+        * runtime/Reject.h:
+        (JSC::reject):
+        * runtime/SparseArrayValueMap.cpp:
+        (JSC::SparseArrayValueMap::putEntry):
+        (JSC::SparseArrayValueMap::putDirect):
+        (JSC::SparseArrayEntry::put):
+        * runtime/StringObject.cpp:
+        (JSC::StringObject::put):
+        (JSC::StringObject::putByIndex):
+        * runtime/SymbolConstructor.cpp:
+        (JSC::symbolConstructorKeyFor):
+
</ins><span class="cx"> 2016-10-16  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Air::IRC needs to place all Tmps on some worklist, even if they have no interference edges
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -1866,7 +1866,7 @@
</span><span class="cx">         return false;
</span><span class="cx">     bool couldDelete = baseObj-&gt;methodTable(vm)-&gt;deleteProperty(baseObj, exec, Identifier::fromUid(&amp;vm, uid));
</span><span class="cx">     if (!couldDelete &amp;&amp; exec-&gt;codeBlock()-&gt;isStrictMode())
</span><del>-        throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+        throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">     return couldDelete;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1897,7 +1897,7 @@
</span><span class="cx">         couldDelete = baseObj-&gt;methodTable(vm)-&gt;deleteProperty(baseObj, exec, property);
</span><span class="cx">     }
</span><span class="cx">     if (!couldDelete &amp;&amp; exec-&gt;codeBlock()-&gt;isStrictMode())
</span><del>-        throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+        throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">     return couldDelete;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -784,7 +784,7 @@
</span><span class="cx">     bool couldDelete = baseObject-&gt;methodTable()-&gt;deleteProperty(baseObject, exec, codeBlock-&gt;identifier(pc[3].u.operand));
</span><span class="cx">     LLINT_CHECK_EXCEPTION();
</span><span class="cx">     if (!couldDelete &amp;&amp; codeBlock-&gt;isStrictMode())
</span><del>-        LLINT_THROW(createTypeError(exec, &quot;Unable to delete property.&quot;));
</del><ins>+        LLINT_THROW(createTypeError(exec, UnableToDeletePropertyError));
</ins><span class="cx">     LLINT_RETURN(jsBoolean(couldDelete));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -915,7 +915,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (!couldDelete &amp;&amp; exec-&gt;codeBlock()-&gt;isStrictMode())
</span><del>-        LLINT_THROW(createTypeError(exec, &quot;Unable to delete property.&quot;));
</del><ins>+        LLINT_THROW(createTypeError(exec, UnableToDeletePropertyError));
</ins><span class="cx">     
</span><span class="cx">     LLINT_RETURN(jsBoolean(couldDelete));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeArrayPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -299,13 +299,13 @@
</span><span class="cx">             thisObj-&gt;putByIndexInline(exec, to, value, true);
</span><span class="cx">             RETURN_IF_EXCEPTION(scope, void());
</span><span class="cx">         } else if (!thisObj-&gt;methodTable(vm)-&gt;deletePropertyByIndex(thisObj, exec, to)) {
</span><del>-            throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+            throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     for (unsigned k = length; k &gt; length - count; --k) {
</span><span class="cx">         if (!thisObj-&gt;methodTable(vm)-&gt;deletePropertyByIndex(thisObj, exec, k - 1)) {
</span><del>-            throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+            throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx">             RETURN_IF_EXCEPTION(scope, void());
</span><span class="cx">             thisObj-&gt;putByIndexInline(exec, to, value, true);
</span><span class="cx">         } else if (!thisObj-&gt;methodTable(vm)-&gt;deletePropertyByIndex(thisObj, exec, to)) {
</span><del>-            throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+            throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">         RETURN_IF_EXCEPTION(scope, void());
</span><span class="lines">@@ -692,7 +692,7 @@
</span><span class="cx">         result = thisObj-&gt;get(exec, length - 1);
</span><span class="cx">         RETURN_IF_EXCEPTION(scope, encodedJSValue());
</span><span class="cx">         if (!thisObj-&gt;methodTable(vm)-&gt;deletePropertyByIndex(thisObj, exec, length - 1)) {
</span><del>-            throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+            throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">             return JSValue::encode(jsUndefined());
</span><span class="cx">         }
</span><span class="cx">         putLength(exec, vm, thisObj, jsNumber(length - 1));
</span><span class="lines">@@ -805,7 +805,7 @@
</span><span class="cx">             RETURN_IF_EXCEPTION(scope, encodedJSValue());
</span><span class="cx">         } else if (!thisObject-&gt;methodTable(vm)-&gt;deletePropertyByIndex(thisObject, exec, lower)) {
</span><span class="cx">             if (!scope.exception())
</span><del>-                throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+                throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">             return JSValue::encode(JSValue());
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -814,7 +814,7 @@
</span><span class="cx">             RETURN_IF_EXCEPTION(scope, encodedJSValue());
</span><span class="cx">         } else if (!thisObject-&gt;methodTable(vm)-&gt;deletePropertyByIndex(thisObject, exec, upper)) {
</span><span class="cx">             if (!scope.exception())
</span><del>-                throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+                throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">             return JSValue::encode(JSValue());
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCommonSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -631,16 +631,16 @@
</span><span class="cx">     
</span><span class="cx">     uint32_t i;
</span><span class="cx">     if (subscript.getUInt32(i))
</span><del>-        couldDelete = baseObject-&gt;methodTable()-&gt;deletePropertyByIndex(baseObject, exec, i);
</del><ins>+        couldDelete = baseObject-&gt;methodTable(vm)-&gt;deletePropertyByIndex(baseObject, exec, i);
</ins><span class="cx">     else {
</span><span class="cx">         CHECK_EXCEPTION();
</span><span class="cx">         auto property = subscript.toPropertyKey(exec);
</span><span class="cx">         CHECK_EXCEPTION();
</span><del>-        couldDelete = baseObject-&gt;methodTable()-&gt;deleteProperty(baseObject, exec, property);
</del><ins>+        couldDelete = baseObject-&gt;methodTable(vm)-&gt;deleteProperty(baseObject, exec, property);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (!couldDelete &amp;&amp; exec-&gt;codeBlock()-&gt;isStrictMode())
</span><del>-        THROW(createTypeError(exec, &quot;Unable to delete property.&quot;));
</del><ins>+        THROW(createTypeError(exec, UnableToDeletePropertyError));
</ins><span class="cx">     
</span><span class="cx">     RETURN(jsBoolean(couldDelete));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeGetterSettercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/GetterSetter.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -93,11 +93,8 @@
</span><span class="cx"> 
</span><span class="cx">     GetterSetter* getterSetterObj = jsCast&lt;GetterSetter*&gt;(getterSetter);
</span><span class="cx"> 
</span><del>-    if (getterSetterObj-&gt;isSetterNull()) {
-        if (ecmaMode == StrictMode)
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
-    }
</del><ins>+    if (getterSetterObj-&gt;isSetterNull())
+        return reject(exec, scope, ecmaMode == StrictMode, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">     JSObject* setter = getterSetterObj-&gt;setter();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArray.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArray.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSArray.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -129,22 +129,22 @@
</span><span class="cx">     JSArray* array = jsCast&lt;JSArray*&gt;(object);
</span><span class="cx"> 
</span><span class="cx">     // 3. If P is &quot;length&quot;, then
</span><del>-    if (propertyName == exec-&gt;propertyNames().length) {
</del><ins>+    if (propertyName == vm.propertyNames-&gt;length) {
</ins><span class="cx">         // All paths through length definition call the default [[DefineOwnProperty]], hence:
</span><span class="cx">         // from ES5.1 8.12.9 7.a.
</span><span class="cx">         if (descriptor.configurablePresent() &amp;&amp; descriptor.configurable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to change configurable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError));
</ins><span class="cx">         // from ES5.1 8.12.9 7.b.
</span><span class="cx">         if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to change enumerable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError));
</ins><span class="cx"> 
</span><span class="cx">         // a. If the [[Value]] field of Desc is absent, then
</span><span class="cx">         // a.i. Return the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing &quot;length&quot;, Desc, and Throw as arguments.
</span><span class="cx">         if (descriptor.isAccessorDescriptor())
</span><del>-            return reject(exec, throwException, UnconfigurablePropertyChangeAccessMechanismError);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">         // from ES5.1 8.12.9 10.a.
</span><span class="cx">         if (!array-&gt;isLengthWritable() &amp;&amp; descriptor.writablePresent() &amp;&amp; descriptor.writable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to change writable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError));
</ins><span class="cx">         // This descriptor is either just making length read-only, or changing nothing!
</span><span class="cx">         if (!descriptor.value()) {
</span><span class="cx">             if (descriptor.writablePresent())
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx">         // f.i. Return the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing &quot;length&quot;, newLenDesc, and Throw as arguments.
</span><span class="cx">         // g. Reject if oldLenDesc.[[Writable]] is false.
</span><span class="cx">         if (!array-&gt;isLengthWritable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to change value of a readonly property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError));
</ins><span class="cx">         
</span><span class="cx">         // h. If newLenDesc.[[Writable]] is absent or has the value true, let newWritable be true.
</span><span class="cx">         // i. Else,
</span><span class="lines">@@ -214,7 +214,7 @@
</span><span class="cx">         uint32_t index = optionalIndex.value();
</span><span class="cx">         // FIXME: Nothing prevents this from being called on a RuntimeArray, and the length function will always return 0 in that case.
</span><span class="cx">         if (index &gt;= array-&gt;length() &amp;&amp; !array-&gt;isLengthWritable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to define numeric property on array with non-writable length property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(&quot;Attempting to define numeric property on array with non-writable length property.&quot;));
</ins><span class="cx">         // c. Let succeeded be the result of calling the default [[DefineOwnProperty]] internal method (8.12.9) on A passing P, Desc, and false as arguments.
</span><span class="cx">         // d. Reject if succeeded is false.
</span><span class="cx">         // e. If index &gt;= oldLen
</span><span class="lines">@@ -398,6 +398,9 @@
</span><span class="cx"> 
</span><span class="cx"> bool JSArray::setLengthWithArrayStorage(ExecState* exec, unsigned newLength, bool throwException, ArrayStorage* storage)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
</ins><span class="cx">     unsigned length = storage-&gt;length();
</span><span class="cx">     
</span><span class="cx">     // If the length is read only then we enter sparse mode, so should enter the following 'if'.
</span><span class="lines">@@ -406,7 +409,7 @@
</span><span class="cx">     if (SparseArrayValueMap* map = storage-&gt;m_sparseMap.get()) {
</span><span class="cx">         // Fail if the length is not writable.
</span><span class="cx">         if (map-&gt;lengthIsReadOnly())
</span><del>-            return reject(exec, throwException, ReadonlyPropertyWriteError);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">         if (newLength &lt; length) {
</span><span class="cx">             // Copy any keys we might be interested in into a vector.
</span><span class="lines">@@ -431,7 +434,7 @@
</span><span class="cx">                     ASSERT(it != map-&gt;notFound());
</span><span class="cx">                     if (it-&gt;value.attributes &amp; DontDelete) {
</span><span class="cx">                         storage-&gt;setLength(index + 1);
</span><del>-                        return reject(exec, throwException, &quot;Unable to delete property.&quot;);
</del><ins>+                        return reject(exec, scope, throwException, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">                     }
</span><span class="cx">                     map-&gt;remove(it);
</span><span class="cx">                 }
</span><span class="lines">@@ -625,7 +628,7 @@
</span><span class="cx">         unsigned length = storage-&gt;length();
</span><span class="cx">         if (!length) {
</span><span class="cx">             if (!isLengthWritable())
</span><del>-                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
</del><ins>+                throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">             return jsUndefined();
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -656,7 +659,7 @@
</span><span class="cx">     RETURN_IF_EXCEPTION(scope, JSValue());
</span><span class="cx">     // Call the [[Delete]] internal method of O with arguments indx and true.
</span><span class="cx">     if (!deletePropertyByIndex(this, exec, index)) {
</span><del>-        throwTypeError(exec, scope, ASCIILiteral(&quot;Unable to delete property.&quot;));
</del><ins>+        throwTypeError(exec, scope, ASCIILiteral(UnableToDeletePropertyError));
</ins><span class="cx">         return jsUndefined();
</span><span class="cx">     }
</span><span class="cx">     // Call the [[Put]] internal method of O with arguments &quot;length&quot;, indx, and true.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBuffercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -90,13 +90,15 @@
</span><span class="cx">     JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value,
</span><span class="cx">     PutPropertySlot&amp; slot)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     JSArrayBuffer* thisObject = jsCast&lt;JSArrayBuffer*&gt;(cell);
</span><span class="cx"> 
</span><span class="cx">     if (UNLIKELY(isThisValueAltered(slot, thisObject)))
</span><span class="cx">         return ordinarySetSlow(exec, thisObject, propertyName, value, slot.thisValue(), slot.isStrictMode());
</span><span class="cx">     
</span><del>-    if (propertyName == exec-&gt;propertyNames().byteLength)
-        return reject(exec, slot.isStrictMode(), &quot;Attempting to write to a read-only array buffer property.&quot;);
</del><ins>+    if (propertyName == vm.propertyNames-&gt;byteLength)
+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(&quot;Attempting to write to a read-only array buffer property.&quot;));
</ins><span class="cx">     
</span><span class="cx">     return Base::put(thisObject, exec, propertyName, value, slot);
</span><span class="cx"> }
</span><span class="lines">@@ -105,10 +107,12 @@
</span><span class="cx">     JSObject* object, ExecState* exec, PropertyName propertyName,
</span><span class="cx">     const PropertyDescriptor&amp; descriptor, bool shouldThrow)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     JSArrayBuffer* thisObject = jsCast&lt;JSArrayBuffer*&gt;(object);
</span><span class="cx">     
</span><del>-    if (propertyName == exec-&gt;propertyNames().byteLength)
-        return reject(exec, shouldThrow, &quot;Attempting to define read-only array buffer property.&quot;);
</del><ins>+    if (propertyName == vm.propertyNames-&gt;byteLength)
+        return reject(exec, scope, shouldThrow, ASCIILiteral(&quot;Attempting to define read-only array buffer property.&quot;));
</ins><span class="cx">     
</span><span class="cx">     return Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSCJSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -158,14 +158,11 @@
</span><span class="cx">     if (UNLIKELY(!obj))
</span><span class="cx">         return false;
</span><span class="cx">     JSValue prototype;
</span><del>-    if (propertyName != exec-&gt;propertyNames().underscoreProto) {
</del><ins>+    if (propertyName != vm.propertyNames-&gt;underscoreProto) {
</ins><span class="cx">         for (; !obj-&gt;structure()-&gt;hasReadOnlyOrGetterSetterPropertiesExcludingProto(); obj = asObject(prototype)) {
</span><span class="cx">             prototype = obj-&gt;getPrototypeDirect();
</span><del>-            if (prototype.isNull()) {
-                if (slot.isStrictMode())
-                    throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-                return false;
-            }
</del><ins>+            if (prototype.isNull())
+                return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -173,11 +170,8 @@
</span><span class="cx">         unsigned attributes;
</span><span class="cx">         PropertyOffset offset = obj-&gt;structure()-&gt;get(vm, propertyName, attributes);
</span><span class="cx">         if (offset != invalidOffset) {
</span><del>-            if (attributes &amp; ReadOnly) {
-                if (slot.isStrictMode())
-                    throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-                return false;
-            }
</del><ins>+            if (attributes &amp; ReadOnly)
+                return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">             JSValue gs = obj-&gt;getDirect(offset);
</span><span class="cx">             if (gs.isGetterSetter())
</span><span class="lines">@@ -197,9 +191,7 @@
</span><span class="cx">             break;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    if (slot.isStrictMode())
-        throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-    return false;
</del><ins>+    return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool JSValue::putToPrimitiveByIndex(ExecState* exec, unsigned propertyName, JSValue value, bool shouldThrow)
</span><span class="lines">@@ -221,9 +213,7 @@
</span><span class="cx">     if (prototype-&gt;attemptToInterceptPutByIndexOnHoleForPrototype(exec, *this, propertyName, value, shouldThrow, putResult))
</span><span class="cx">         return putResult;
</span><span class="cx">     
</span><del>-    if (shouldThrow)
-        throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-    return false;
</del><ins>+    return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSValue::dump(PrintStream&amp; out) const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSDataViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSDataView.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSDataView.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSDataView.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -117,14 +117,16 @@
</span><span class="cx">     JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value,
</span><span class="cx">     PutPropertySlot&amp; slot)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     JSDataView* thisObject = jsCast&lt;JSDataView*&gt;(cell);
</span><span class="cx"> 
</span><span class="cx">     if (UNLIKELY(isThisValueAltered(slot, thisObject)))
</span><span class="cx">         return ordinarySetSlow(exec, thisObject, propertyName, value, slot.thisValue(), slot.isStrictMode());
</span><span class="cx"> 
</span><del>-    if (propertyName == exec-&gt;propertyNames().byteLength
-        || propertyName == exec-&gt;propertyNames().byteOffset)
-        return reject(exec, slot.isStrictMode(), &quot;Attempting to write to read-only typed array property.&quot;);
</del><ins>+    if (propertyName == vm.propertyNames-&gt;byteLength
+        || propertyName == vm.propertyNames-&gt;byteOffset)
+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(&quot;Attempting to write to read-only typed array property.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     return Base::put(thisObject, exec, propertyName, value, slot);
</span><span class="cx"> }
</span><span class="lines">@@ -133,10 +135,12 @@
</span><span class="cx">     JSObject* object, ExecState* exec, PropertyName propertyName,
</span><span class="cx">     const PropertyDescriptor&amp; descriptor, bool shouldThrow)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     JSDataView* thisObject = jsCast&lt;JSDataView*&gt;(object);
</span><del>-    if (propertyName == exec-&gt;propertyNames().byteLength
-        || propertyName == exec-&gt;propertyNames().byteOffset)
-        return reject(exec, shouldThrow, &quot;Attempting to define read-only typed array property.&quot;);
</del><ins>+    if (propertyName == vm.propertyNames-&gt;byteLength
+        || propertyName == vm.propertyNames-&gt;byteOffset)
+        return reject(exec, scope, shouldThrow, ASCIILiteral(&quot;Attempting to define read-only typed array property.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     return Base::defineOwnProperty(thisObject, exec, propertyName, descriptor, shouldThrow);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -446,7 +446,7 @@
</span><span class="cx">         return Base::put(thisObject, exec, propertyName, value, dontCache);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ((thisObject-&gt;jsExecutable()-&gt;isStrictMode() || thisObject-&gt;jsExecutable()-&gt;isES6Function()) &amp;&amp; (propertyName == exec-&gt;propertyNames().arguments || propertyName == exec-&gt;propertyNames().caller)) {
</del><ins>+    if ((thisObject-&gt;jsExecutable()-&gt;isStrictMode() || thisObject-&gt;jsExecutable()-&gt;isES6Function()) &amp;&amp; (propertyName == vm.propertyNames-&gt;arguments || propertyName == vm.propertyNames-&gt;caller)) {
</ins><span class="cx">         // This will trigger the property to be reified, if this is not already the case!
</span><span class="cx">         bool okay = thisObject-&gt;hasProperty(exec, propertyName);
</span><span class="cx">         ASSERT_UNUSED(okay, okay);
</span><span class="lines">@@ -453,11 +453,8 @@
</span><span class="cx">         scope.release();
</span><span class="cx">         return Base::put(thisObject, exec, propertyName, value, slot);
</span><span class="cx">     }
</span><del>-    if (propertyName == vm.propertyNames-&gt;arguments || propertyName == vm.propertyNames-&gt;caller) {
-        if (slot.isStrictMode())
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
-    }
</del><ins>+    if (propertyName == vm.propertyNames-&gt;arguments || propertyName == vm.propertyNames-&gt;caller)
+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     thisObject-&gt;reifyLazyPropertyIfNeeded(vm, exec, propertyName);
</span><span class="cx">     scope.release();
</span><span class="cx">     return Base::put(thisObject, exec, propertyName, value, slot);
</span><span class="lines">@@ -510,7 +507,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool valueCheck;
</span><del>-    if (propertyName == exec-&gt;propertyNames().arguments) {
</del><ins>+    if (propertyName == vm.propertyNames-&gt;arguments) {
</ins><span class="cx">         if (thisObject-&gt;jsExecutable()-&gt;isClass()) {
</span><span class="cx">             thisObject-&gt;reifyLazyPropertyIfNeeded(vm, exec, propertyName);
</span><span class="cx">             return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
</span><span class="lines">@@ -522,7 +519,7 @@
</span><span class="cx">             return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
</span><span class="cx">         }
</span><span class="cx">         valueCheck = !descriptor.value() || sameValue(exec, descriptor.value(), retrieveArguments(exec, thisObject));
</span><del>-    } else if (propertyName == exec-&gt;propertyNames().caller) {
</del><ins>+    } else if (propertyName == vm.propertyNames-&gt;caller) {
</ins><span class="cx">         if (thisObject-&gt;jsExecutable()-&gt;isClass()) {
</span><span class="cx">             thisObject-&gt;reifyLazyPropertyIfNeeded(vm, exec, propertyName);
</span><span class="cx">             return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
</span><span class="lines">@@ -539,31 +536,16 @@
</span><span class="cx">         return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
</span><span class="cx">     }
</span><span class="cx">      
</span><del>-    if (descriptor.configurablePresent() &amp;&amp; descriptor.configurable()) {
-        if (throwException)
-            throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change configurable attribute of unconfigurable property.&quot;));
-        return false;
-    }
-    if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable()) {
-        if (throwException)
-            throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change enumerable attribute of unconfigurable property.&quot;));
-        return false;
-    }
-    if (descriptor.isAccessorDescriptor()) {
-        if (throwException)
-            throwTypeError(exec, scope, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
-        return false;
-    }
-    if (descriptor.writablePresent() &amp;&amp; descriptor.writable()) {
-        if (throwException)
-            throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change writable attribute of unconfigurable property.&quot;));
-        return false;
-    }
-    if (!valueCheck) {
-        if (throwException)
-            throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change value of a readonly property.&quot;));
-        return false;
-    }
</del><ins>+    if (descriptor.configurablePresent() &amp;&amp; descriptor.configurable())
+        return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError));
+    if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable())
+        return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError));
+    if (descriptor.isAccessorDescriptor())
+        return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
+    if (descriptor.writablePresent() &amp;&amp; descriptor.writable())
+        return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError));
+    if (!valueCheck)
+        return reject(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">     Unobservable,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static const char* typedArrayBufferHasBeenDetachedErrorMessage = &quot;Underlying ArrayBuffer has been detached from the view&quot;;
</del><ins>+static const char* const typedArrayBufferHasBeenDetachedErrorMessage = &quot;Underlying ArrayBuffer has been detached from the view&quot;;
</ins><span class="cx"> 
</span><span class="cx"> template&lt;typename Adaptor&gt;
</span><span class="cx"> class JSGenericTypedArrayView : public JSArrayBufferView {
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx">         RETURN_IF_EXCEPTION(scope, false);
</span><span class="cx"> 
</span><span class="cx">         if (isNeutered()) {
</span><del>-            throwTypeError(exec, scope, typedArrayBufferHasBeenDetachedErrorMessage);
</del><ins>+            throwTypeError(exec, scope, ASCIILiteral(typedArrayBufferHasBeenDetachedErrorMessage));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -360,17 +360,19 @@
</span><span class="cx">     JSObject* object, ExecState* exec, PropertyName propertyName,
</span><span class="cx">     const PropertyDescriptor&amp; descriptor, bool shouldThrow)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     JSGenericTypedArrayView* thisObject = jsCast&lt;JSGenericTypedArrayView*&gt;(object);
</span><span class="cx"> 
</span><span class="cx">     if (parseIndex(propertyName)) {
</span><span class="cx">         if (descriptor.isAccessorDescriptor())
</span><del>-            return reject(exec, shouldThrow, &quot;Attempting to store accessor indexed property on a typed array.&quot;);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(&quot;Attempting to store accessor indexed property on a typed array.&quot;));
</ins><span class="cx"> 
</span><span class="cx">         if (descriptor.configurable())
</span><del>-            return reject(exec, shouldThrow, &quot;Attempting to configure non-configurable property.&quot;);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(&quot;Attempting to configure non-configurable property.&quot;));
</ins><span class="cx"> 
</span><span class="cx">         if (!descriptor.enumerable() || !descriptor.writable())
</span><del>-            return reject(exec, shouldThrow, &quot;Attempting to store non-enumerable or non-writable indexed property on a typed array.&quot;);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(&quot;Attempting to store non-enumerable or non-writable indexed property on a typed array.&quot;));
</ins><span class="cx"> 
</span><span class="cx">         if (descriptor.value()) {
</span><span class="cx">             PutPropertySlot unused(JSValue(thisObject), shouldThrow);
</span><span class="lines">@@ -386,10 +388,12 @@
</span><span class="cx"> bool JSGenericTypedArrayView&lt;Adaptor&gt;::deleteProperty(
</span><span class="cx">     JSCell* cell, ExecState* exec, PropertyName propertyName)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     JSGenericTypedArrayView* thisObject = jsCast&lt;JSGenericTypedArrayView*&gt;(cell);
</span><span class="cx"> 
</span><span class="cx">     if (thisObject-&gt;isNeutered())
</span><del>-        return reject(exec, true, typedArrayBufferHasBeenDetachedErrorMessage);
</del><ins>+        return reject(exec, scope, true, ASCIILiteral(typedArrayBufferHasBeenDetachedErrorMessage));
</ins><span class="cx"> 
</span><span class="cx">     if (parseIndex(propertyName))
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewPrototypeFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><del>-    JSValue constructor = exemplar-&gt;get(exec, exec-&gt;propertyNames().constructor);
</del><ins>+    JSValue constructor = exemplar-&gt;get(exec, vm.propertyNames-&gt;constructor);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, nullptr);
</span><span class="cx"> 
</span><span class="cx">     if (constructor.isUndefined())
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    JSValue species = constructor.get(exec, exec-&gt;propertyNames().speciesSymbol);
</del><ins>+    JSValue species = constructor.get(exec, vm.propertyNames-&gt;speciesSymbol);
</ins><span class="cx">     RETURN_IF_EXCEPTION(scope, nullptr);
</span><span class="cx"> 
</span><span class="cx">     if (species.isUndefinedOrNull())
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">         if (!view-&gt;isNeutered())
</span><span class="cx">             return view;
</span><span class="cx"> 
</span><del>-        throwTypeError(exec, scope, typedArrayBufferHasBeenDetachedErrorMessage);
</del><ins>+        throwTypeError(exec, scope, ASCIILiteral(typedArrayBufferHasBeenDetachedErrorMessage));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -552,7 +552,7 @@
</span><span class="cx">     if (jsDynamicCast&lt;JSArrayBufferView*&gt;(result))
</span><span class="cx">         return JSValue::encode(result);
</span><span class="cx"> 
</span><del>-    throwTypeError(exec, scope, &quot;species constructor did not return a TypedArray View&quot;);
</del><ins>+    throwTypeError(exec, scope, ASCIILiteral(&quot;species constructor did not return a TypedArray View&quot;));
</ins><span class="cx">     return JSValue::encode(JSValue());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSModuleNamespaceObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx"> 
</span><span class="cx">     // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-defineownproperty-p-desc
</span><span class="cx">     if (shouldThrow)
</span><del>-        throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to define property on object that is not extensible.&quot;));
</del><ins>+        throwTypeError(exec, scope, ASCIILiteral(NonExtensibleObjectPropertyDefineError));
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -61,8 +61,14 @@
</span><span class="cx"> STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSObject);
</span><span class="cx"> STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSFinalObject);
</span><span class="cx"> 
</span><del>-const char* ReadonlyPropertyWriteError = &quot;Attempted to assign to readonly property.&quot;;
-const char* UnconfigurablePropertyChangeAccessMechanismError = &quot;Attempting to change access mechanism for an unconfigurable property.&quot;;
</del><ins>+const char* const NonExtensibleObjectPropertyDefineError = &quot;Attempting to define property on object that is not extensible.&quot;;
+const char* const ReadonlyPropertyWriteError = &quot;Attempted to assign to readonly property.&quot;;
+const char* const ReadonlyPropertyChangeError = &quot;Attempting to change value of a readonly property.&quot;;
+const char* const UnableToDeletePropertyError = &quot;Unable to delete property.&quot;;
+const char* const UnconfigurablePropertyChangeAccessMechanismError = &quot;Attempting to change access mechanism for an unconfigurable property.&quot;;
+const char* const UnconfigurablePropertyChangeConfigurabilityError = &quot;Attempting to change configurable attribute of unconfigurable property.&quot;;
+const char* const UnconfigurablePropertyChangeEnumerabilityError = &quot;Attempting to change enumerable attribute of unconfigurable property.&quot;;
+const char* const UnconfigurablePropertyChangeWritabilityError = &quot;Attempting to change writable attribute of unconfigurable property.&quot;;
</ins><span class="cx"> 
</span><span class="cx"> const ClassInfo JSObject::s_info = { &quot;Object&quot;, 0, 0, CREATE_METHOD_TABLE(JSObject) };
</span><span class="cx"> 
</span><span class="lines">@@ -389,11 +395,11 @@
</span><span class="cx">     if (ownDescriptor.isDataDescriptor()) {
</span><span class="cx">         // 9.1.9.1-4-a If ownDesc.[[Writable]] is false, return false.
</span><span class="cx">         if (!ownDescriptor.writable())
</span><del>-            return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">         // 9.1.9.1-4-b If Type(Receiver) is not Object, return false.
</span><span class="cx">         if (!receiver.isObject())
</span><del>-            return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">         // In OrdinarySet, the receiver may not be the same to the object.
</span><span class="cx">         // So, we perform [[GetOwnProperty]] onto the receiver while we already perform [[GetOwnProperty]] onto the object.
</span><span class="lines">@@ -408,11 +414,11 @@
</span><span class="cx">         if (existingDescriptorFound) {
</span><span class="cx">             // 9.1.9.1-4-d-i If IsAccessorDescriptor(existingDescriptor) is true, return false.
</span><span class="cx">             if (existingDescriptor.isAccessorDescriptor())
</span><del>-                return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
</del><ins>+                return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">             // 9.1.9.1-4-d-ii If existingDescriptor.[[Writable]] is false, return false.
</span><span class="cx">             if (!existingDescriptor.writable())
</span><del>-                return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
</del><ins>+                return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">             // 9.1.9.1-4-d-iii Let valueDesc be the PropertyDescriptor{[[Value]]: V}.
</span><span class="cx">             PropertyDescriptor valueDescriptor;
</span><span class="lines">@@ -434,7 +440,7 @@
</span><span class="cx">     // 9.1.9.1-7 If setter is undefined, return false.
</span><span class="cx">     JSValue setter = ownDescriptor.setter();
</span><span class="cx">     if (!setter.isObject())
</span><del>-        return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
</del><ins>+        return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">     // 9.1.9.1-8 Perform ? Call(setter, Receiver, &lt;&lt; V &gt;&gt;).
</span><span class="cx">     JSObject* setterObject = asObject(setter);
</span><span class="lines">@@ -442,7 +448,7 @@
</span><span class="cx">     args.append(value);
</span><span class="cx"> 
</span><span class="cx">     CallData callData;
</span><del>-    CallType callType = setterObject-&gt;methodTable(exec-&gt;vm())-&gt;getCallData(setterObject, callData);
</del><ins>+    CallType callType = setterObject-&gt;methodTable(vm)-&gt;getCallData(setterObject, callData);
</ins><span class="cx">     call(exec, setterObject, callType, callData, receiver, args);
</span><span class="cx"> 
</span><span class="cx">     // 9.1.9.1-9 Return true.
</span><span class="lines">@@ -460,6 +466,7 @@
</span><span class="cx">     ASSERT(!isThisValueAltered(slot, this));
</span><span class="cx"> 
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><ins>+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx"> 
</span><span class="cx">     JSObject* obj = this;
</span><span class="cx">     for (;;) {
</span><span class="lines">@@ -467,8 +474,8 @@
</span><span class="cx">         PropertyOffset offset = obj-&gt;structure(vm)-&gt;get(vm, propertyName, attributes);
</span><span class="cx">         if (isValidOffset(offset)) {
</span><span class="cx">             if (attributes &amp; ReadOnly) {
</span><del>-                ASSERT(structure(vm)-&gt;prototypeChainMayInterceptStoreTo(exec-&gt;vm(), propertyName) || obj == this);
-                return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
</del><ins>+                ASSERT(structure(vm)-&gt;prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this);
+                return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             JSValue gs = obj-&gt;getDirect(offset);
</span><span class="lines">@@ -511,9 +518,9 @@
</span><span class="cx">         obj = asObject(prototype);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    ASSERT(!structure(vm)-&gt;prototypeChainMayInterceptStoreTo(exec-&gt;vm(), propertyName) || obj == this);
</del><ins>+    ASSERT(!structure(vm)-&gt;prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this);
</ins><span class="cx">     if (!putDirectInternal&lt;PutModePut&gt;(vm, propertyName, value, 0, slot))
</span><del>-        return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
</del><ins>+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1295,19 +1302,13 @@
</span><span class="cx">     bool isExtensible = this-&gt;isExtensible(exec);
</span><span class="cx">     RETURN_IF_EXCEPTION(scope, false);
</span><span class="cx"> 
</span><del>-    if (!isExtensible) {
-        if (shouldThrowIfCantSet)
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
-    }
</del><ins>+    if (!isExtensible)
+        return reject(exec, scope, shouldThrowIfCantSet, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">     JSValue nextPrototype = prototype;
</span><span class="cx">     while (nextPrototype &amp;&amp; nextPrototype.isObject()) {
</span><del>-        if (nextPrototype == this) {
-            if (shouldThrowIfCantSet)
-                throwTypeError(exec, scope, ASCIILiteral(&quot;cyclic __proto__ value&quot;));
-            return false;
-        }
</del><ins>+        if (nextPrototype == this)
+            return reject(exec, scope, shouldThrowIfCantSet, ASCIILiteral(&quot;cyclic __proto__ value&quot;));
</ins><span class="cx">         // FIXME: The specification currently says we should check if the [[GetPrototypeOf]] internal method of nextPrototype
</span><span class="cx">         // is not the ordinary object internal method. However, we currently restrict this to Proxy objects as it would allow
</span><span class="cx">         // for cycles with certain HTML objects (WindowProxy, Location) otherwise.
</span><span class="lines">@@ -1987,6 +1988,9 @@
</span><span class="cx"> // Defined in ES5.1 8.12.9
</span><span class="cx"> bool JSObject::defineOwnIndexedProperty(ExecState* exec, unsigned index, const PropertyDescriptor&amp; descriptor, bool throwException)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
</ins><span class="cx">     ASSERT(index &lt;= MAX_ARRAY_INDEX);
</span><span class="cx"> 
</span><span class="cx">     if (!inSparseIndexingMode()) {
</span><span class="lines">@@ -1999,11 +2003,11 @@
</span><span class="cx">             return putDirectIndex(exec, index, descriptor.value(), 0, throwException ? PutDirectIndexShouldThrow : PutDirectIndexShouldNotThrow);
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        ensureArrayStorageExistsAndEnterDictionaryIndexingMode(exec-&gt;vm());
</del><ins>+        ensureArrayStorageExistsAndEnterDictionaryIndexingMode(vm);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (descriptor.attributes() &amp; (ReadOnly | Accessor))
</span><del>-        notifyPresenceOfIndexedAccessors(exec-&gt;vm());
</del><ins>+        notifyPresenceOfIndexedAccessors(vm);
</ins><span class="cx"> 
</span><span class="cx">     SparseArrayValueMap* map = m_butterfly.get()-&gt;arrayStorage()-&gt;m_sparseMap.get();
</span><span class="cx">     RELEASE_ASSERT(map);
</span><span class="lines">@@ -2018,7 +2022,7 @@
</span><span class="cx">     if (result.isNewEntry) {
</span><span class="cx">         if (!isStructureExtensible()) {
</span><span class="cx">             map-&gt;remove(result.iterator);
</span><del>-            return reject(exec, throwException, &quot;Attempting to define property on object that is not extensible.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(NonExtensibleObjectPropertyDefineError));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // 4.a. If IsGenericDescriptor(Desc) or IsDataDescriptor(Desc) is true, then create an own data property
</span><span class="lines">@@ -2054,10 +2058,10 @@
</span><span class="cx">     if (!current.configurable()) {
</span><span class="cx">         // 7.a. Reject, if the [[Configurable]] field of Desc is true.
</span><span class="cx">         if (descriptor.configurablePresent() &amp;&amp; descriptor.configurable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to change configurable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError));
</ins><span class="cx">         // 7.b. Reject, if the [[Enumerable]] field of Desc is present and the [[Enumerable]] fields of current and Desc are the Boolean negation of each other.
</span><span class="cx">         if (descriptor.enumerablePresent() &amp;&amp; current.enumerable() != descriptor.enumerable())
</span><del>-            return reject(exec, throwException, &quot;Attempting to change enumerable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // 8. If IsGenericDescriptor(Desc) is true, then no further validation is required.
</span><span class="lines">@@ -2066,7 +2070,7 @@
</span><span class="cx">         if (current.isDataDescriptor() != descriptor.isDataDescriptor()) {
</span><span class="cx">             // 9.a. Reject, if the [[Configurable]] field of current is false.
</span><span class="cx">             if (!current.configurable())
</span><del>-                return reject(exec, throwException, UnconfigurablePropertyChangeAccessMechanismError);
</del><ins>+                return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">             // 9.b. If IsDataDescriptor(current) is true, then convert the property named P of object O from a
</span><span class="cx">             // data property to an accessor property. Preserve the existing values of the converted property's
</span><span class="cx">             // [[Configurable]] and [[Enumerable]] attributes and set the rest of the property's attributes to
</span><span class="lines">@@ -2080,11 +2084,11 @@
</span><span class="cx">             if (!current.configurable() &amp;&amp; !current.writable()) {
</span><span class="cx">                 // 10.a.i. Reject, if the [[Writable]] field of current is false and the [[Writable]] field of Desc is true.
</span><span class="cx">                 if (descriptor.writable())
</span><del>-                    return reject(exec, throwException, &quot;Attempting to change writable attribute of unconfigurable property.&quot;);
</del><ins>+                    return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError));
</ins><span class="cx">                 // 10.a.ii. If the [[Writable]] field of current is false, then
</span><span class="cx">                 // 10.a.ii.1. Reject, if the [[Value]] field of Desc is present and SameValue(Desc.[[Value]], current.[[Value]]) is false.
</span><span class="cx">                 if (descriptor.value() &amp;&amp; !sameValue(exec, descriptor.value(), current.value()))
</span><del>-                    return reject(exec, throwException, &quot;Attempting to change value of a readonly property.&quot;);
</del><ins>+                    return reject(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError));
</ins><span class="cx">             }
</span><span class="cx">             // 10.b. else, the [[Configurable]] field of current is true, so any change is acceptable.
</span><span class="cx">         } else {
</span><span class="lines">@@ -2093,10 +2097,10 @@
</span><span class="cx">             if (!current.configurable()) {
</span><span class="cx">                 // 11.i. Reject, if the [[Set]] field of Desc is present and SameValue(Desc.[[Set]], current.[[Set]]) is false.
</span><span class="cx">                 if (descriptor.setterPresent() &amp;&amp; descriptor.setter() != current.setter())
</span><del>-                    return reject(exec, throwException, &quot;Attempting to change the setter of an unconfigurable property.&quot;);
</del><ins>+                    return reject(exec, scope, throwException, ASCIILiteral(&quot;Attempting to change the setter of an unconfigurable property.&quot;));
</ins><span class="cx">                 // 11.ii. Reject, if the [[Get]] field of Desc is present and SameValue(Desc.[[Get]], current.[[Get]]) is false.
</span><span class="cx">                 if (descriptor.getterPresent() &amp;&amp; descriptor.getter() != current.getter())
</span><del>-                    return reject(exec, throwException, &quot;Attempting to change the getter of an unconfigurable property.&quot;);
</del><ins>+                    return reject(exec, scope, throwException, ASCIILiteral(&quot;Attempting to change the getter of an unconfigurable property.&quot;));
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -2262,11 +2266,8 @@
</span><span class="cx">     unsigned length = storage-&gt;length();
</span><span class="cx">     if (i &gt;= length) {
</span><span class="cx">         // Prohibit growing the array if length is not writable.
</span><del>-        if (map-&gt;lengthIsReadOnly() || !isStructureExtensible()) {
-            if (shouldThrow)
-                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-            return false;
-        }
</del><ins>+        if (map-&gt;lengthIsReadOnly() || !isStructureExtensible())
+            return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">         length = i + 1;
</span><span class="cx">         storage-&gt;setLength(length);
</span><span class="cx">     }
</span><span class="lines">@@ -2361,6 +2362,7 @@
</span><span class="cx"> bool JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage(ExecState* exec, unsigned i, JSValue value, unsigned attributes, PutDirectIndexMode mode, ArrayStorage* storage)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><ins>+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     
</span><span class="cx">     // i should be a valid array index that is outside of the current vector.
</span><span class="cx">     ASSERT(hasAnyArrayStorage(indexingType()));
</span><span class="lines">@@ -2392,7 +2394,7 @@
</span><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         // We don't want to, or can't use a vector to hold this property - allocate a sparse map &amp; add the value.
</span><del>-        map = allocateSparseIndexMap(exec-&gt;vm());
</del><ins>+        map = allocateSparseIndexMap(vm);
</ins><span class="cx">         return map-&gt;putDirect(exec, this, i, value, attributes, mode);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2402,9 +2404,9 @@
</span><span class="cx">         if (mode != PutDirectIndexLikePutDirect) {
</span><span class="cx">             // Prohibit growing the array if length is not writable.
</span><span class="cx">             if (map-&gt;lengthIsReadOnly())
</span><del>-                return reject(exec, mode == PutDirectIndexShouldThrow, ReadonlyPropertyWriteError);
</del><ins>+                return reject(exec, scope, mode == PutDirectIndexShouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">             if (!isStructureExtensible())
</span><del>-                return reject(exec, mode == PutDirectIndexShouldThrow, &quot;Attempting to define property on object that is not extensible.&quot;);
</del><ins>+                return reject(exec, scope, mode == PutDirectIndexShouldThrow, ASCIILiteral(NonExtensibleObjectPropertyDefineError));
</ins><span class="cx">         }
</span><span class="cx">         length = i + 1;
</span><span class="cx">         storage-&gt;setLength(length);
</span><span class="lines">@@ -2413,7 +2415,7 @@
</span><span class="cx">     // We are currently using a map - check whether we still want to be doing so.
</span><span class="cx">     // We will continue  to use a sparse map if SparseMode is set, a vector would be too sparse, or if allocation fails.
</span><span class="cx">     unsigned numValuesInArray = storage-&gt;m_numValuesInVector + map-&gt;size();
</span><del>-    if (map-&gt;sparseMode() || attributes || !isDenseEnoughForVector(length, numValuesInArray) || !increaseVectorLength(exec-&gt;vm(), length))
</del><ins>+    if (map-&gt;sparseMode() || attributes || !isDenseEnoughForVector(length, numValuesInArray) || !increaseVectorLength(vm, length))
</ins><span class="cx">         return map-&gt;putDirect(exec, this, i, value, attributes, mode);
</span><span class="cx"> 
</span><span class="cx">     // Reread m_storage after increaseVectorLength, update m_numValuesInVector.
</span><span class="lines">@@ -2916,11 +2918,8 @@
</span><span class="cx">     if (!isCurrentDefined) {
</span><span class="cx">         // unless extensions are prevented!
</span><span class="cx">         // Step 2.a
</span><del>-        if (!isExtensible) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to define property on object that is not extensible.&quot;));
-            return false;
-        }
</del><ins>+        if (!isExtensible)
+            return reject(exec, scope, throwException, ASCIILiteral(NonExtensibleObjectPropertyDefineError));
</ins><span class="cx">         if (!object)
</span><span class="cx">             return true;
</span><span class="cx">         // Step 2.c/d
</span><span class="lines">@@ -2939,16 +2938,10 @@
</span><span class="cx">     // Step 5.
</span><span class="cx">     // Filter out invalid changes
</span><span class="cx">     if (!current.configurable()) {
</span><del>-        if (descriptor.configurable()) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change configurable attribute of unconfigurable property.&quot;));
-            return false;
-        }
-        if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable() != current.enumerable()) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change enumerable attribute of unconfigurable property.&quot;));
-            return false;
-        }
</del><ins>+        if (descriptor.configurable())
+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError));
+        if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable() != current.enumerable())
+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError));
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     // Step 6.
</span><span class="lines">@@ -2964,11 +2957,8 @@
</span><span class="cx">     // Step 7.
</span><span class="cx">     // Changing between a normal property or an accessor property
</span><span class="cx">     if (descriptor.isDataDescriptor() != current.isDataDescriptor()) {
</span><del>-        if (!current.configurable()) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
-            return false;
-        }
</del><ins>+        if (!current.configurable())
+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx"> 
</span><span class="cx">         if (!object)
</span><span class="cx">             return true;
</span><span class="lines">@@ -2981,17 +2971,11 @@
</span><span class="cx">     // Changing the value and attributes of an existing property
</span><span class="cx">     if (descriptor.isDataDescriptor()) {
</span><span class="cx">         if (!current.configurable()) {
</span><del>-            if (!current.writable() &amp;&amp; descriptor.writable()) {
-                if (throwException)
-                    throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change writable attribute of unconfigurable property.&quot;));
-                return false;
-            }
</del><ins>+            if (!current.writable() &amp;&amp; descriptor.writable())
+                return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError));
</ins><span class="cx">             if (!current.writable()) {
</span><del>-                if (descriptor.value() &amp;&amp; !sameValue(exec, current.value(), descriptor.value())) {
-                    if (throwException)
-                        throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change value of a readonly property.&quot;));
-                    return false;
-                }
</del><ins>+                if (descriptor.value() &amp;&amp; !sameValue(exec, current.value(), descriptor.value()))
+                    return reject(exec, scope, throwException, ASCIILiteral(ReadonlyPropertyChangeError));
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         if (current.attributesEqual(descriptor) &amp;&amp; !descriptor.value())
</span><span class="lines">@@ -3006,21 +2990,12 @@
</span><span class="cx">     // Changing the accessor functions of an existing accessor property
</span><span class="cx">     ASSERT(descriptor.isAccessorDescriptor());
</span><span class="cx">     if (!current.configurable()) {
</span><del>-        if (descriptor.setterPresent() &amp;&amp; !(current.setterPresent() &amp;&amp; JSValue::strictEqual(exec, current.setter(), descriptor.setter()))) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change the setter of an unconfigurable property.&quot;));
-            return false;
-        }
-        if (descriptor.getterPresent() &amp;&amp; !(current.getterPresent() &amp;&amp; JSValue::strictEqual(exec, current.getter(), descriptor.getter()))) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(&quot;Attempting to change the getter of an unconfigurable property.&quot;));
-            return false;
-        }
-        if (current.attributes() &amp; CustomAccessor) {
-            if (throwException)
-                throwTypeError(exec, scope, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
-            return false;
-        }
</del><ins>+        if (descriptor.setterPresent() &amp;&amp; !(current.setterPresent() &amp;&amp; JSValue::strictEqual(exec, current.setter(), descriptor.setter())))
+            return reject(exec, scope, throwException, ASCIILiteral(&quot;Attempting to change the setter of an unconfigurable property.&quot;));
+        if (descriptor.getterPresent() &amp;&amp; !(current.getterPresent() &amp;&amp; JSValue::strictEqual(exec, current.getter(), descriptor.getter())))
+            return reject(exec, scope, throwException, ASCIILiteral(&quot;Attempting to change the getter of an unconfigurable property.&quot;));
+        if (current.attributes() &amp; CustomAccessor)
+            return reject(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Step 10/11.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -68,8 +68,14 @@
</span><span class="cx"> struct HashTableValue;
</span><span class="cx"> 
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*, ThrowScope&amp;, const String&amp;);
</span><del>-extern JS_EXPORTDATA const char* ReadonlyPropertyWriteError;
-extern JS_EXPORTDATA const char* UnconfigurablePropertyChangeAccessMechanismError;
</del><ins>+extern JS_EXPORTDATA const char* const NonExtensibleObjectPropertyDefineError;
+extern JS_EXPORTDATA const char* const ReadonlyPropertyWriteError;
+extern JS_EXPORTDATA const char* const ReadonlyPropertyChangeError;
+extern JS_EXPORTDATA const char* const UnableToDeletePropertyError;
+extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeAccessMechanismError;
+extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeConfigurabilityError;
+extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeEnumerabilityError;
+extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeWritabilityError;
</ins><span class="cx"> 
</span><span class="cx"> COMPILE_ASSERT(None &lt; FirstInternalAttribute, None_is_below_FirstInternalAttribute);
</span><span class="cx"> COMPILE_ASSERT(ReadOnly &lt; FirstInternalAttribute, ReadOnly_is_below_FirstInternalAttribute);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -177,11 +177,8 @@
</span><span class="cx"> 
</span><span class="cx">     if (thisObject-&gt;canPerformFastPutInline(exec, vm, propertyName)) {
</span><span class="cx">         ASSERT(!thisObject-&gt;structure(vm)-&gt;prototypeChainMayInterceptStoreTo(vm, propertyName));
</span><del>-        if (!thisObject-&gt;putDirectInternal&lt;PutModePut&gt;(vm, propertyName, value, 0, slot)) {
-            if (slot.isStrictMode())
-                throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
-            return false;
-        }
</del><ins>+        if (!thisObject-&gt;putDirectInternal&lt;PutModePut&gt;(vm, propertyName, value, 0, slot))
+            return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSProxy.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSProxy.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSProxy.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011-2012, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -150,10 +150,7 @@
</span><span class="cx"> {
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(exec-&gt;vm());
</span><span class="cx"> 
</span><del>-    if (shouldThrowIfCantSet)
-        throwTypeError(exec, scope, ASCIILiteral(&quot;Cannot set prototype of this object&quot;));
-
-    return false;
</del><ins>+    return reject(exec, scope, shouldThrowIfCantSet, ASCIILiteral(&quot;Cannot set prototype of this object&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue JSProxy::getPrototype(JSObject* object, ExecState* exec)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSSymbolTableObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">         ASSERT(!fastEntry.isNull());
</span><span class="cx">         if (fastEntry.isReadOnly() &amp;&amp; !ignoreReadOnlyErrors) {
</span><span class="cx">             if (shouldThrowReadOnlyError)
</span><del>-                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
</del><ins>+                throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">             putResult = false;
</span><span class="cx">             return true;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeLookuph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Lookup.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Lookup.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/Lookup.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -254,19 +254,22 @@
</span><span class="cx"> // 'slot.thisValue()' is the object the put was originally performed on (in the case of a proxy, the proxy itself).
</span><span class="cx"> inline bool putEntry(ExecState* exec, const HashTableValue* entry, JSObject* base, JSObject* thisValue, PropertyName propertyName, JSValue value, PutPropertySlot&amp; slot)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
</ins><span class="cx">     if (entry-&gt;attributes() &amp; BuiltinOrFunctionOrLazyProperty) {
</span><span class="cx">         if (!(entry-&gt;attributes() &amp; ReadOnly)) {
</span><span class="cx">             // If this is a function or lazy property put then we just do the put because
</span><span class="cx">             // logically the object already had the property, so this is just a replace.
</span><span class="cx">             if (JSObject* thisObject = jsDynamicCast&lt;JSObject*&gt;(thisValue))
</span><del>-                thisObject-&gt;putDirect(exec-&gt;vm(), propertyName, value);
</del><ins>+                thisObject-&gt;putDirect(vm, propertyName, value);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><del>-        return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
</del><ins>+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (entry-&gt;attributes() &amp; Accessor)
</span><del>-        return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
</del><ins>+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">     if (!(entry-&gt;attributes() &amp; ReadOnly)) {
</span><span class="cx">         ASSERT_WITH_MESSAGE(!(entry-&gt;attributes() &amp; DOMJITAttribute), &quot;DOMJITAttribute supports readonly attributes currently.&quot;);
</span><span class="lines">@@ -280,7 +283,7 @@
</span><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
</del><ins>+    return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -101,19 +101,22 @@
</span><span class="cx"> 
</span><span class="cx"> bool RegExpObject::defineOwnProperty(JSObject* object, ExecState* exec, PropertyName propertyName, const PropertyDescriptor&amp; descriptor, bool shouldThrow)
</span><span class="cx"> {
</span><del>-    if (propertyName == exec-&gt;propertyNames().lastIndex) {
</del><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
+
+    if (propertyName == vm.propertyNames-&gt;lastIndex) {
</ins><span class="cx">         RegExpObject* regExp = asRegExpObject(object);
</span><span class="cx">         if (descriptor.configurablePresent() &amp;&amp; descriptor.configurable())
</span><del>-            return reject(exec, shouldThrow, &quot;Attempting to change configurable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeConfigurabilityError));
</ins><span class="cx">         if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable())
</span><del>-            return reject(exec, shouldThrow, &quot;Attempting to change enumerable attribute of unconfigurable property.&quot;);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeEnumerabilityError));
</ins><span class="cx">         if (descriptor.isAccessorDescriptor())
</span><del>-            return reject(exec, shouldThrow, UnconfigurablePropertyChangeAccessMechanismError);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">         if (!regExp-&gt;m_lastIndexIsWritable) {
</span><span class="cx">             if (descriptor.writablePresent() &amp;&amp; descriptor.writable())
</span><del>-                return reject(exec, shouldThrow, &quot;Attempting to change writable attribute of unconfigurable property.&quot;);
</del><ins>+                return reject(exec, scope, shouldThrow, ASCIILiteral(UnconfigurablePropertyChangeWritabilityError));
</ins><span class="cx">             if (!sameValue(exec, regExp-&gt;getLastIndex(), descriptor.value()))
</span><del>-                return reject(exec, shouldThrow, &quot;Attempting to change value of a readonly property.&quot;);
</del><ins>+                return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyChangeError));
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx">         if (descriptor.value())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpObject.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpObject.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/RegExpObject.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSObject.h&quot;
</span><span class="cx"> #include &quot;RegExp.h&quot;
</span><ins>+#include &quot;Reject.h&quot;
</ins><span class="cx"> #include &quot;ThrowScope.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="lines">@@ -50,7 +51,7 @@
</span><span class="cx">             m_lastIndex.setWithoutWriteBarrier(jsNumber(lastIndex));
</span><span class="cx">             return true;
</span><span class="cx">         }
</span><del>-        throwTypeError(exec, scope, ReadonlyPropertyWriteError);
</del><ins>+        throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     bool setLastIndex(ExecState* exec, JSValue lastIndex, bool shouldThrow)
</span><span class="lines">@@ -59,13 +60,11 @@
</span><span class="cx">         auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">         if (LIKELY(m_lastIndexIsWritable)) {
</span><del>-            m_lastIndex.set(exec-&gt;vm(), this, lastIndex);
</del><ins>+            m_lastIndex.set(vm, this, lastIndex);
</ins><span class="cx">             return true;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (shouldThrow)
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
</del><ins>+        return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     }
</span><span class="cx">     JSValue getLastIndex() const
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRejecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Reject.h (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Reject.h        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/Reject.h        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -30,10 +30,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-inline bool reject(ExecState* exec, bool throwException, const char* message)
</del><ins>+inline bool reject(ExecState* exec, ThrowScope&amp; scope, bool throwException, ASCIILiteral message)
</ins><span class="cx"> {
</span><del>-    VM&amp; vm = exec-&gt;vm();
-    auto scope = DECLARE_THROW_SCOPE(vm);
</del><span class="cx">     if (throwException)
</span><span class="cx">         throwTypeError(exec, scope, message);
</span><span class="cx">     return false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSparseArrayValueMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -102,9 +102,7 @@
</span><span class="cx">     // extensible, this is not the right thing to have done - so remove again.
</span><span class="cx">     if (result.isNewEntry &amp;&amp; !array-&gt;isStructureExtensible()) {
</span><span class="cx">         remove(result.iterator);
</span><del>-        if (shouldThrow)
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
</del><ins>+        return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return entry.put(exec, array, this, value, shouldThrow);
</span><span class="lines">@@ -112,8 +110,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool SparseArrayValueMap::putDirect(ExecState* exec, JSObject* array, unsigned i, JSValue value, unsigned attributes, PutDirectIndexMode mode)
</span><span class="cx"> {
</span><ins>+    VM&amp; vm = exec-&gt;vm();
+    auto scope = DECLARE_THROW_SCOPE(vm);
</ins><span class="cx">     ASSERT(value);
</span><span class="cx">     
</span><ins>+    bool shouldThrow = (mode == PutDirectIndexShouldThrow);
+
</ins><span class="cx">     AddResult result = add(array, i);
</span><span class="cx">     SparseArrayEntry&amp; entry = result.iterator-&gt;value;
</span><span class="cx"> 
</span><span class="lines">@@ -123,13 +125,13 @@
</span><span class="cx">         // extensible, this is not the right thing to have done - so remove again.
</span><span class="cx">         if (result.isNewEntry) {
</span><span class="cx">             remove(result.iterator);
</span><del>-            return reject(exec, mode == PutDirectIndexShouldThrow, &quot;Attempting to define property on object that is not extensible.&quot;);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(NonExtensibleObjectPropertyDefineError));
</ins><span class="cx">         }
</span><span class="cx">         if (entry.attributes &amp; ReadOnly)
</span><del>-            return reject(exec, mode == PutDirectIndexShouldThrow, ReadonlyPropertyWriteError);
</del><ins>+            return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     }
</span><span class="cx">     entry.attributes = attributes;
</span><del>-    entry.set(exec-&gt;vm(), this, value);
</del><ins>+    entry.set(vm, this, value);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -157,11 +159,8 @@
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     if (!(attributes &amp; Accessor)) {
</span><del>-        if (attributes &amp; ReadOnly) {
-            if (shouldThrow)
-                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-            return false;
-        }
</del><ins>+        if (attributes &amp; ReadOnly)
+            return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx"> 
</span><span class="cx">         set(vm, map, value);
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStringObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/StringObject.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/StringObject.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/StringObject.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -70,11 +70,8 @@
</span><span class="cx">     if (UNLIKELY(isThisValueAltered(slot, thisObject)))
</span><span class="cx">         return ordinarySetSlow(exec, thisObject, propertyName, value, slot.thisValue(), slot.isStrictMode());
</span><span class="cx"> 
</span><del>-    if (propertyName == exec-&gt;propertyNames().length) {
-        if (slot.isStrictMode())
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
-    }
</del><ins>+    if (propertyName == vm.propertyNames-&gt;length)
+        return reject(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     if (Optional&lt;uint32_t&gt; index = parseIndex(propertyName))
</span><span class="cx">         return putByIndex(cell, exec, index.value(), value, slot.isStrictMode());
</span><span class="cx">     return JSObject::put(cell, exec, propertyName, value, slot);
</span><span class="lines">@@ -86,11 +83,8 @@
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     StringObject* thisObject = jsCast&lt;StringObject*&gt;(cell);
</span><del>-    if (thisObject-&gt;internalValue()-&gt;canGetIndex(propertyName)) {
-        if (shouldThrow)
-            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
-        return false;
-    }
</del><ins>+    if (thisObject-&gt;internalValue()-&gt;canGetIndex(propertyName))
+        return reject(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
</ins><span class="cx">     return JSObject::putByIndex(cell, exec, propertyName, value, shouldThrow);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSymbolConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">     return JSValue::encode(Symbol::create(exec-&gt;vm(), exec-&gt;vm().symbolRegistry().symbolForKey(string)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char* SymbolKeyForTypeError = &quot;Symbol.keyFor requires that the first argument be a symbol&quot;;
</del><ins>+const char* const SymbolKeyForTypeError = &quot;Symbol.keyFor requires that the first argument be a symbol&quot;;
</ins><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL symbolConstructorKeyFor(ExecState* exec)
</span><span class="cx"> {
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSValue symbolValue = exec-&gt;argument(0);
</span><span class="cx">     if (!symbolValue.isSymbol())
</span><del>-        return JSValue::encode(throwTypeError(exec, scope, SymbolKeyForTypeError));
</del><ins>+        return JSValue::encode(throwTypeError(exec, scope, ASCIILiteral(SymbolKeyForTypeError)));
</ins><span class="cx"> 
</span><span class="cx">     SymbolImpl&amp; uid = asSymbol(symbolValue)-&gt;privateName().uid();
</span><span class="cx">     if (!uid.symbolRegistry())
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/WebCore/ChangeLog        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-10-17  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Use the reject() helper function for conditionally throwing TypeErrors.
+        https://bugs.webkit.org/show_bug.cgi?id=163491
+
+        Reviewed by Filip Pizlo.
+
+        No new tests because this patch does not introduce new behavior.
+
+        * bindings/js/JSCryptoAlgorithmDictionary.cpp:
+        (WebCore::createRsaKeyGenParams):
+        * bindings/js/JSIDBDatabaseCustom.cpp:
+        (WebCore::JSIDBDatabase::createObjectStore):
+        * bridge/c/c_instance.cpp:
+        (JSC::Bindings::CInstance::invokeMethod):
+
</ins><span class="cx"> 2016-10-17  Miguel Gomez  &lt;magomez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoAlgorithmDictionarycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/WebCore/bindings/js/JSCryptoAlgorithmDictionary.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Uint8Array&gt; publicExponentArray = toUint8Array(publicExponentValue);
</span><span class="cx">     if (!publicExponentArray) {
</span><del>-        throwTypeError(&amp;state, scope, &quot;Expected a Uint8Array in publicExponent&quot;);
</del><ins>+        throwTypeError(&amp;state, scope, ASCIILiteral(&quot;Expected a Uint8Array in publicExponent&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx">     result-&gt;publicExponent.append(publicExponentArray-&gt;data(), publicExponentArray-&gt;byteLength());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBDatabaseCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/WebCore/bindings/js/JSIDBDatabaseCustom.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSValue optionsValue = state.argument(1);
</span><span class="cx">     if (!optionsValue.isUndefinedOrNull() &amp;&amp; !optionsValue.isObject())
</span><del>-        return throwTypeError(&amp;state, scope, &quot;Not an object.&quot;);
</del><ins>+        return throwTypeError(&amp;state, scope, ASCIILiteral(&quot;Not an object.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     IDBKeyPath keyPath;
</span><span class="cx">     bool autoIncrement = false;
</span></span></pre></div>
<a id="trunkSourceWebCorebridgecc_instancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/c/c_instance.cpp (207410 => 207411)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/c/c_instance.cpp        2016-10-17 16:56:19 UTC (rev 207410)
+++ trunk/Source/WebCore/bridge/c/c_instance.cpp        2016-10-17 16:59:06 UTC (rev 207411)
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">     auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx"> 
</span><span class="cx">     if (!asObject(runtimeMethod)-&gt;inherits(CRuntimeMethod::info()))
</span><del>-        return throwTypeError(exec, scope, &quot;Attempt to invoke non-plug-in method on plug-in object.&quot;);
</del><ins>+        return throwTypeError(exec, scope, ASCIILiteral(&quot;Attempt to invoke non-plug-in method on plug-in object.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     CMethod* method = static_cast&lt;CMethod*&gt;(runtimeMethod-&gt;method());
</span><span class="cx">     ASSERT(method);
</span></span></pre>
</div>
</div>

</body>
</html>