<!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>[202890] 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/202890">202890</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2016-07-06 20:12:37 -0700 (Wed, 06 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[JSC] Unify how we throw TypeError from C++
https://bugs.webkit.org/show_bug.cgi?id=159500

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2016-07-06
Reviewed by Saam Barati.

Source/JavaScriptCore:

Throwing a TypeError is an uncommon case. We should minimize the impact
on the call sites.

This patch does that by:
-Replace the 2 calls createTypeError()-&gt;throwException() by throwTypeError().
-Use ASCIILiteral when possible.
-Add an overload of throwTypeError() taking ASCIILiteral directly
 (that way, the String creation and destruction is done by the callee).

On x86_64, this reduces the __TEXT__ segment by 29kb.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::evaluateWithScopeExtension):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* jit/JITOperations.cpp:
* runtime/DatePrototype.cpp:
(JSC::dateProtoFuncToJSON):
* runtime/Error.cpp:
(JSC::throwConstructorCannotBeCalledAsFunctionTypeError):
(JSC::throwTypeError):
* runtime/Error.h:
(JSC::throwVMTypeError):
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
(JSC::JSValue::toStringSlowCase):
* runtime/JSCJSValueInlines.h:
(JSC::toPreferredPrimitiveType):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
* runtime/JSFunction.cpp:
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewFromIterator):
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayView):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncCopyWithin):
(JSC::genericTypedArrayViewProtoFuncIndexOf):
(JSC::genericTypedArrayViewProtoFuncLastIndexOf):
(JSC::genericTypedArrayViewProtoFuncSubarray):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::callToPrimitiveFunction):
(JSC::JSObject::ordinaryToPrimitive):
(JSC::JSObject::defaultHasInstance):
(JSC::validateAndApplyPropertyDescriptor):
* runtime/JSTypedArrayViewConstructor.cpp:
(JSC::constructTypedArrayView):
* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncLength):
(JSC::typedArrayViewProtoFuncSet):
(JSC::typedArrayViewProtoFuncCopyWithin):
(JSC::typedArrayViewProtoFuncFill):
(JSC::typedArrayViewProtoFuncLastIndexOf):
(JSC::typedArrayViewProtoFuncIndexOf):
(JSC::typedArrayViewProtoFuncJoin):
(JSC::typedArrayViewProtoGetterFuncBuffer):
(JSC::typedArrayViewProtoGetterFuncLength):
(JSC::typedArrayViewProtoGetterFuncByteLength):
(JSC::typedArrayViewProtoGetterFuncByteOffset):
(JSC::typedArrayViewProtoFuncReverse):
(JSC::typedArrayViewProtoFuncSubarray):
(JSC::typedArrayViewProtoFuncSlice):
* runtime/ObjectConstructor.cpp:
(JSC::toPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):
* runtime/Symbol.cpp:
(JSC::Symbol::toNumber):

Source/WebCore:

* bindings/js/JSBiquadFilterNodeCustom.cpp:
(WebCore::JSBiquadFilterNode::setType):
* bindings/js/JSBlobCustom.cpp:
(WebCore::constructJSBlob):
* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::getBigIntegerVectorFromJSON):
(WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
(WebCore::tryJWKKeyOpsValue):
(WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
(WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
(WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents):
(WebCore::JSCryptoKeySerializationJWK::keyData):
(WebCore::addJWKAlgorithmToJSON):
(WebCore::JSCryptoKeySerializationJWK::serialize):
* bindings/js/JSCryptoOperationData.cpp:
(WebCore::cryptoOperationDataFromJSValue):
* bindings/js/JSDOMBinding.cpp:
(WebCore::enforceRange):
(WebCore::throwTypeError):
(WebCore::throwArgumentMustBeEnumError):
(WebCore::throwArgumentMustBeFunctionError):
(WebCore::throwArgumentTypeError):
(WebCore::throwArrayElementTypeError):
(WebCore::throwGetterTypeError):
(WebCore::throwThisTypeError):
* bindings/js/JSDataCueCustom.cpp:
(WebCore::constructJSDataCue):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineElement):
* bindings/js/JSFileCustom.cpp:
(WebCore::constructJSFile):
* bindings/js/JSModuleLoader.cpp:
(WebCore::JSModuleLoader::evaluate):
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::constructJSMutationObserver):
* bindings/js/JSOscillatorNodeCustom.cpp:
(WebCore::JSOscillatorNode::setType):
* bindings/js/JSPannerNodeCustom.cpp:
(WebCore::JSPannerNode::setPanningModel):
(WebCore::JSPannerNode::setDistanceModel):
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
(WebCore::constructJSReadableStreamController):
(WebCore::constructJSReadableStreamReader):
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::cryptoKeyFormatFromJSValue):
(WebCore::importKey):
(WebCore::exportKey):
* bindings/js/ReadableStreamController.cpp:
(WebCore::ReadableStreamController::invoke):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::throwValidationError):
(WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::invokeMethod):
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcArray::setValueAt):

Source/WebKit/mac:

* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::invokeMethod):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostcpp">trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSJavaScriptCallFramecpp">trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterInterpretercpp">trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeDatePrototypecpp">trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorcpp">trunk/Source/JavaScriptCore/runtime/Error.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeErrorh">trunk/Source/JavaScriptCore/runtime/Error.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferPrototypecpp">trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSCJSValuecpp">trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSCJSValueInlinesh">trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSDataViewPrototypecpp">trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSFunctioncpp">trunk/Source/JavaScriptCore/runtime/JSFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewConstructorInlinesh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewPrototypeFunctionsh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionscpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSONObjectcpp">trunk/Source/JavaScriptCore/runtime/JSONObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSTypedArrayViewConstructorcpp">trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSTypedArrayViewPrototypecpp">trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectConstructorcpp">trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectPrototypecpp">trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpPrototypecpp">trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSymbolcpp">trunk/Source/JavaScriptCore/runtime/Symbol.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBiquadFilterNodeCustomcpp">trunk/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBlobCustomcpp">trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoKeySerializationJWKcpp">trunk/Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSCryptoOperationDatacpp">trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMBindingcpp">trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDataCueCustomcpp">trunk/Source/WebCore/bindings/js/JSDataCueCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDocumentCustomcpp">trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSFileCustomcpp">trunk/Source/WebCore/bindings/js/JSFileCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSModuleLoadercpp">trunk/Source/WebCore/bindings/js/JSModuleLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMutationObserverCustomcpp">trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSOscillatorNodeCustomcpp">trunk/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSPannerNodeCustomcpp">trunk/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp">trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsReadableStreamControllercpp">trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsSerializedScriptValuecpp">trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp</a></li>
<li><a href="#trunkSourceWebCorebridgecc_instancecpp">trunk/Source/WebCore/bridge/c/c_instance.cpp</a></li>
<li><a href="#trunkSourceWebCorebridgeobjcobjc_instancemm">trunk/Source/WebCore/bridge/objc/objc_instance.mm</a></li>
<li><a href="#trunkSourceWebCorebridgeobjcobjc_runtimemm">trunk/Source/WebCore/bridge/objc/objc_runtime.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacPluginsHostedProxyInstancemm">trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1,3 +1,99 @@
</span><ins>+2016-07-06  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [JSC] Unify how we throw TypeError from C++
+        https://bugs.webkit.org/show_bug.cgi?id=159500
+
+        Reviewed by Saam Barati.
+
+        Throwing a TypeError is an uncommon case. We should minimize the impact
+        on the call sites.
+
+        This patch does that by:
+        -Replace the 2 calls createTypeError()-&gt;throwException() by throwTypeError().
+        -Use ASCIILiteral when possible.
+        -Add an overload of throwTypeError() taking ASCIILiteral directly
+         (that way, the String creation and destruction is done by the callee).
+
+        On x86_64, this reduces the __TEXT__ segment by 29kb.
+
+        * inspector/JSInjectedScriptHost.cpp:
+        (Inspector::JSInjectedScriptHost::evaluateWithScopeExtension):
+        * inspector/JSJavaScriptCallFrame.cpp:
+        (Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension):
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::execute):
+        * jit/JITOperations.cpp:
+        * runtime/DatePrototype.cpp:
+        (JSC::dateProtoFuncToJSON):
+        * runtime/Error.cpp:
+        (JSC::throwConstructorCannotBeCalledAsFunctionTypeError):
+        (JSC::throwTypeError):
+        * runtime/Error.h:
+        (JSC::throwVMTypeError):
+        * runtime/JSArrayBufferPrototype.cpp:
+        (JSC::arrayBufferProtoFuncSlice):
+        * runtime/JSCJSValue.cpp:
+        (JSC::JSValue::putToPrimitive):
+        (JSC::JSValue::toStringSlowCase):
+        * runtime/JSCJSValueInlines.h:
+        (JSC::toPreferredPrimitiveType):
+        * runtime/JSDataViewPrototype.cpp:
+        (JSC::getData):
+        (JSC::setData):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::defineOwnProperty):
+        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
+        (JSC::constructGenericTypedArrayViewFromIterator):
+        (JSC::constructGenericTypedArrayViewWithArguments):
+        (JSC::constructGenericTypedArrayView):
+        * runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
+        (JSC::speciesConstruct):
+        (JSC::genericTypedArrayViewProtoFuncSet):
+        (JSC::genericTypedArrayViewProtoFuncCopyWithin):
+        (JSC::genericTypedArrayViewProtoFuncIndexOf):
+        (JSC::genericTypedArrayViewProtoFuncLastIndexOf):
+        (JSC::genericTypedArrayViewProtoFuncSubarray):
+        * runtime/JSGlobalObjectFunctions.cpp:
+        (JSC::globalFuncProtoGetter):
+        (JSC::globalFuncProtoSetter):
+        * runtime/JSONObject.cpp:
+        (JSC::Stringifier::appendStringifiedValue):
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::setPrototypeWithCycleCheck):
+        (JSC::callToPrimitiveFunction):
+        (JSC::JSObject::ordinaryToPrimitive):
+        (JSC::JSObject::defaultHasInstance):
+        (JSC::validateAndApplyPropertyDescriptor):
+        * runtime/JSTypedArrayViewConstructor.cpp:
+        (JSC::constructTypedArrayView):
+        * runtime/JSTypedArrayViewPrototype.cpp:
+        (JSC::typedArrayViewPrivateFuncLength):
+        (JSC::typedArrayViewProtoFuncSet):
+        (JSC::typedArrayViewProtoFuncCopyWithin):
+        (JSC::typedArrayViewProtoFuncFill):
+        (JSC::typedArrayViewProtoFuncLastIndexOf):
+        (JSC::typedArrayViewProtoFuncIndexOf):
+        (JSC::typedArrayViewProtoFuncJoin):
+        (JSC::typedArrayViewProtoGetterFuncBuffer):
+        (JSC::typedArrayViewProtoGetterFuncLength):
+        (JSC::typedArrayViewProtoGetterFuncByteLength):
+        (JSC::typedArrayViewProtoGetterFuncByteOffset):
+        (JSC::typedArrayViewProtoFuncReverse):
+        (JSC::typedArrayViewProtoFuncSubarray):
+        (JSC::typedArrayViewProtoFuncSlice):
+        * runtime/ObjectConstructor.cpp:
+        (JSC::toPropertyDescriptor):
+        (JSC::objectConstructorDefineProperty):
+        (JSC::objectConstructorDefineProperties):
+        (JSC::objectConstructorCreate):
+        * runtime/ObjectPrototype.cpp:
+        (JSC::objectProtoFuncDefineGetter):
+        (JSC::objectProtoFuncDefineSetter):
+        * runtime/RegExpPrototype.cpp:
+        (JSC::regExpProtoFuncCompile):
+        * runtime/Symbol.cpp:
+        (JSC::Symbol::toNumber):
+
</ins><span class="cx"> 2016-07-06  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         InlineAccess::sizeForLengthAccess() is wrong on some platforms because it should also consider &quot;length&quot; not being array length
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue scriptValue = exec-&gt;argument(0);
</span><span class="cx">     if (!scriptValue.isString())
</span><del>-        return throwTypeError(exec, &quot;InjectedScriptHost.evaluateWithScopeExtension first argument must be a string.&quot;);
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;InjectedScriptHost.evaluateWithScopeExtension first argument must be a string.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     String program = scriptValue.toString(exec)-&gt;value(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSJavaScriptCallFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue scriptValue = exec-&gt;argument(0);
</span><span class="cx">     if (!scriptValue.isString())
</span><del>-        return throwTypeError(exec, &quot;JSJavaScriptCallFrame.evaluateWithScopeExtension first argument must be a string.&quot;);
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;JSJavaScriptCallFrame.evaluateWithScopeExtension first argument must be a string.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     String script = scriptValue.toString(exec)-&gt;value(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1185,8 +1185,7 @@
</span><span class="cx">             const Identifier&amp; ident = codeBlock-&gt;variable(i);
</span><span class="cx">             PropertySlot slot(globalLexicalEnvironment, PropertySlot::InternalMethodType::VMInquiry);
</span><span class="cx">             if (JSGlobalLexicalEnvironment::getOwnPropertySlot(globalLexicalEnvironment, callFrame, ident, slot)) {
</span><del>-                return checkedReturn(callFrame-&gt;vm().throwException(callFrame,
-                    createTypeError(callFrame, makeString(&quot;Can't create duplicate global variable in eval: '&quot;, String(ident.impl()), &quot;'&quot;))));
</del><ins>+                return checkedReturn(throwTypeError(callFrame, makeString(&quot;Can't create duplicate global variable in eval: '&quot;, String(ident.impl()), &quot;'&quot;)));
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1194,8 +1193,7 @@
</span><span class="cx">             FunctionExecutable* function = codeBlock-&gt;functionDecl(i);
</span><span class="cx">             PropertySlot slot(globalLexicalEnvironment, PropertySlot::InternalMethodType::VMInquiry);
</span><span class="cx">             if (JSGlobalLexicalEnvironment::getOwnPropertySlot(globalLexicalEnvironment, callFrame, function-&gt;name(), slot)) {
</span><del>-                return checkedReturn(callFrame-&gt;vm().throwException(callFrame,
-                    createTypeError(callFrame, makeString(&quot;Can't create duplicate global variable in eval: '&quot;, String(function-&gt;name().impl()), &quot;'&quot;))));
</del><ins>+                return checkedReturn(throwTypeError(callFrame, makeString(&quot;Can't create duplicate global variable in eval: '&quot;, String(function-&gt;name().impl()), &quot;'&quot;)));
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1172,7 +1172,7 @@
</span><span class="cx">     if (referenceErrorFlag)
</span><span class="cx">         vm.throwException(exec, createReferenceError(exec, errorMessage));
</span><span class="cx">     else
</span><del>-        vm.throwException(exec, createTypeError(exec, errorMessage));
</del><ins>+        throwTypeError(exec, errorMessage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JIT_OPERATION operationDebug(ExecState* exec, int32_t debugHookID)
</span><span class="lines">@@ -1873,7 +1873,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>-        vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Unable to delete property.&quot;)));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Unable to delete property.&quot;));
</ins><span class="cx">     return couldDelete;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1905,7 +1905,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>-        vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Unable to delete property.&quot;)));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Unable to delete property.&quot;));
</ins><span class="cx">     return couldDelete;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeDatePrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1112,13 +1112,13 @@
</span><span class="cx">     CallData callData;
</span><span class="cx">     CallType callType = getCallData(toISOValue, callData);
</span><span class="cx">     if (callType == CallType::None)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;toISOString is not a function&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;toISOString is not a function&quot;));
</ins><span class="cx"> 
</span><span class="cx">     JSValue result = call(exec, asObject(toISOValue), callType, callData, object, exec-&gt;emptyList());
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="cx">         return JSValue::encode(jsNull());
</span><span class="cx">     if (result.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;toISOString did not return a primitive value&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;toISOString did not return a primitive value&quot;));
</ins><span class="cx">     return JSValue::encode(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Error.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Error.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/Error.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx"> 
</span><span class="cx"> JSObject* throwConstructorCannotBeCalledAsFunctionTypeError(ExecState* exec, const char* constructorName)
</span><span class="cx"> {
</span><del>-    return exec-&gt;vm().throwException(exec, createTypeError(exec, makeString(&quot;calling &quot;, constructorName, &quot; constructor without new is invalid&quot;)));
</del><ins>+    return throwTypeError(exec, makeString(&quot;calling &quot;, constructorName, &quot; constructor without new is invalid&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSObject* throwTypeError(ExecState* exec)
</span><span class="lines">@@ -216,6 +216,11 @@
</span><span class="cx">     return exec-&gt;vm().throwException(exec, createTypeError(exec));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSObject* throwTypeError(ExecState* exec, ASCIILiteral errorMessage)
+{
+    return throwTypeError(exec, String(errorMessage));
+}
+
</ins><span class="cx"> JSObject* throwTypeError(ExecState* exec, const String&amp; message)
</span><span class="cx"> {
</span><span class="cx">     return exec-&gt;vm().throwException(exec, createTypeError(exec, message));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeErrorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Error.h (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Error.h        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/Error.h        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -74,6 +74,7 @@
</span><span class="cx"> // Convenience wrappers, create an throw an exception with a default message.
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwConstructorCannotBeCalledAsFunctionTypeError(ExecState*, const char* constructorName);
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*);
</span><ins>+JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*, ASCIILiteral errorMessage);
</ins><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*, const String&amp; errorMessage);
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwSyntaxError(ExecState*);
</span><span class="cx"> JS_EXPORT_PRIVATE JSObject* throwSyntaxError(ExecState*, const String&amp; errorMessage);
</span><span class="lines">@@ -83,6 +84,7 @@
</span><span class="cx"> inline void throwVMError(ExecState* exec, Exception* exception) { exec-&gt;vm().throwException(exec, exception); }
</span><span class="cx"> inline EncodedJSValue throwVMError(ExecState* exec, JSValue error) { return JSValue::encode(exec-&gt;vm().throwException(exec, error)); }
</span><span class="cx"> inline EncodedJSValue throwVMTypeError(ExecState* exec) { return JSValue::encode(throwTypeError(exec)); }
</span><ins>+inline EncodedJSValue throwVMTypeError(ExecState* exec, ASCIILiteral errorMessage) { return JSValue::encode(throwTypeError(exec, errorMessage)); }
</ins><span class="cx"> inline EncodedJSValue throwVMTypeError(ExecState* exec, const String&amp; errorMessage) { return JSValue::encode(throwTypeError(exec, errorMessage)); }
</span><span class="cx"> inline EncodedJSValue throwVMRangeError(ExecState* state, const String&amp; errorMessage) { return JSValue::encode(throwRangeError(state, errorMessage)); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -41,10 +41,10 @@
</span><span class="cx">     
</span><span class="cx">     JSArrayBuffer* thisObject = jsDynamicCast&lt;JSArrayBuffer*&gt;(exec-&gt;thisValue());
</span><span class="cx">     if (!thisObject)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Receiver of slice must be an array buffer.&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver of slice must be an array buffer.&quot;));
</ins><span class="cx">     
</span><span class="cx">     if (!exec-&gt;argumentCount())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Slice requires at least one argument.&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Slice requires at least one argument.&quot;));
</ins><span class="cx">     
</span><span class="cx">     int32_t begin = exec-&gt;argument(0).toInt32(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSCJSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx">         if (offset != invalidOffset) {
</span><span class="cx">             if (attributes &amp; ReadOnly) {
</span><span class="cx">                 if (slot.isStrictMode())
</span><del>-                    exec-&gt;vm().throwException(exec, createTypeError(exec, StrictModeReadonlyPropertyWriteError));
</del><ins>+                    throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
</ins><span class="cx">                 return false;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">     if (isUndefined())
</span><span class="cx">         return vm.smallStrings.undefinedString();
</span><span class="cx">     if (isSymbol()) {
</span><del>-        throwTypeError(exec, &quot;Cannot convert a symbol to a string&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Cannot convert a symbol to a string&quot;));
</ins><span class="cx">         return errorValue();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSCJSValueInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSCJSValueInlines.h        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -632,7 +632,7 @@
</span><span class="cx"> inline PreferredPrimitiveType toPreferredPrimitiveType(ExecState* exec, JSValue value)
</span><span class="cx"> {
</span><span class="cx">     if (!value.isString()) {
</span><del>-        throwTypeError(exec, &quot;Primitive hint is not a string.&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Primitive hint is not a string.&quot;));
</ins><span class="cx">         return NoPreference;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -647,7 +647,7 @@
</span><span class="cx">     if (WTF::equal(hintString, &quot;string&quot;))
</span><span class="cx">         return PreferString;
</span><span class="cx"> 
</span><del>-    throwTypeError(exec, &quot;Expected primitive hint to match one of 'default', 'number', 'string'.&quot;);
</del><ins>+    throwTypeError(exec, ASCIILiteral(&quot;Expected primitive hint to match one of 'default', 'number', 'string'.&quot;));
</ins><span class="cx">     return NoPreference;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSDataViewPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -124,10 +124,10 @@
</span><span class="cx"> {
</span><span class="cx">     JSDataView* dataView = jsDynamicCast&lt;JSDataView*&gt;(exec-&gt;thisValue());
</span><span class="cx">     if (!dataView)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Receiver of DataView method must be a DataView&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver of DataView method must be a DataView&quot;));
</ins><span class="cx">     
</span><span class="cx">     if (!exec-&gt;argumentCount())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Need at least one argument (the byteOffset)&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Need at least one argument (the byteOffset)&quot;));
</ins><span class="cx">     
</span><span class="cx">     unsigned byteOffset = exec-&gt;uncheckedArgument(0).toUInt32(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -169,10 +169,10 @@
</span><span class="cx"> {
</span><span class="cx">     JSDataView* dataView = jsDynamicCast&lt;JSDataView*&gt;(exec-&gt;thisValue());
</span><span class="cx">     if (!dataView)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Receiver of DataView method must be a DataView&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver of DataView method must be a DataView&quot;));
</ins><span class="cx">     
</span><span class="cx">     if (exec-&gt;argumentCount() &lt; 2)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Need at least two argument (the byteOffset and value)&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Need at least two argument (the byteOffset and value)&quot;));
</ins><span class="cx">     
</span><span class="cx">     unsigned byteOffset = exec-&gt;uncheckedArgument(0).toUInt32(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSFunction.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSFunction.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -506,27 +506,27 @@
</span><span class="cx">      
</span><span class="cx">     if (descriptor.configurablePresent() &amp;&amp; descriptor.configurable()) {
</span><span class="cx">         if (throwException)
</span><del>-            exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change configurable attribute of unconfigurable property.&quot;)));
</del><ins>+            throwTypeError(exec, ASCIILiteral(&quot;Attempting to change configurable attribute of unconfigurable property.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable()) {
</span><span class="cx">         if (throwException)
</span><del>-            exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change enumerable attribute of unconfigurable property.&quot;)));
</del><ins>+            throwTypeError(exec, ASCIILiteral(&quot;Attempting to change enumerable attribute of unconfigurable property.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     if (descriptor.isAccessorDescriptor()) {
</span><span class="cx">         if (throwException)
</span><del>-            exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)));
</del><ins>+            throwTypeError(exec, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     if (descriptor.writablePresent() &amp;&amp; descriptor.writable()) {
</span><span class="cx">         if (throwException)
</span><del>-            exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change writable attribute of unconfigurable property.&quot;)));
</del><ins>+            throwTypeError(exec, ASCIILiteral(&quot;Attempting to change writable attribute of unconfigurable property.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     if (!valueCheck) {
</span><span class="cx">         if (throwException)
</span><del>-            exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change value of a readonly property.&quot;)));
</del><ins>+            throwTypeError(exec, ASCIILiteral(&quot;Attempting to change value of a readonly property.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewConstructorInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> inline JSObject* constructGenericTypedArrayViewFromIterator(ExecState* exec, Structure* structure, JSValue iterator)
</span><span class="cx"> {
</span><span class="cx">     if (!iterator.isObject())
</span><del>-        return throwTypeError(exec, &quot;Symbol.Iterator for the first argument did not return an object.&quot;);
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;Symbol.Iterator for the first argument did not return an object.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     MarkedArgumentBuffer storage;
</span><span class="cx">     while (true) {
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx">     ASSERT(!offset &amp;&amp; !lengthOpt);
</span><span class="cx">     
</span><span class="cx">     if (ViewClass::TypedArrayStorageType == TypeDataView)
</span><del>-        return throwTypeError(exec, &quot;Expected ArrayBuffer for the first argument.&quot;);
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;Expected ArrayBuffer for the first argument.&quot;));
</ins><span class="cx">     
</span><span class="cx">     // For everything but DataView, we allow construction with any of:
</span><span class="cx">     // - Another array. This creates a copy of the of that array.
</span><span class="lines">@@ -174,7 +174,7 @@
</span><span class="cx">                     CallData callData;
</span><span class="cx">                     CallType callType = getCallData(iteratorFunc, callData);
</span><span class="cx">                     if (callType == CallType::None)
</span><del>-                        return throwTypeError(exec, &quot;Symbol.Iterator for the first argument cannot be called.&quot;);
</del><ins>+                        return throwTypeError(exec, ASCIILiteral(&quot;Symbol.Iterator for the first argument cannot be called.&quot;));
</ins><span class="cx"> 
</span><span class="cx">                     ArgList arguments;
</span><span class="cx">                     JSValue iterator = call(exec, iteratorFunc, callType, callData, object, arguments);
</span><span class="lines">@@ -206,11 +206,11 @@
</span><span class="cx">     if (firstValue.isInt32())
</span><span class="cx">         length = firstValue.asInt32();
</span><span class="cx">     else if (!firstValue.isNumber())
</span><del>-        return throwTypeError(exec, &quot;Invalid array length argument&quot;);
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;Invalid array length argument&quot;));
</ins><span class="cx">     else {
</span><span class="cx">         length = static_cast&lt;int&gt;(firstValue.asNumber());
</span><span class="cx">         if (length != firstValue.asNumber())
</span><del>-            return throwTypeError(exec, &quot;Invalid array length argument (fractional lengths not allowed)&quot;);
</del><ins>+            return throwTypeError(exec, ASCIILiteral(&quot;Invalid array length argument (fractional lengths not allowed)&quot;));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (length &lt; 0)
</span><span class="lines">@@ -234,7 +234,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!argCount) {
</span><span class="cx">         if (ViewClass::TypedArrayStorageType == TypeDataView)
</span><del>-            return throwVMError(exec, createTypeError(exec, &quot;DataView constructor requires at least one argument.&quot;));
</del><ins>+            return throwVMTypeError(exec, ASCIILiteral(&quot;DataView constructor requires at least one argument.&quot;));
</ins><span class="cx"> 
</span><span class="cx">         return JSValue::encode(ViewClass::create(exec, structure, 0));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewPrototypeFunctionsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">     if (constructor.isUndefined())
</span><span class="cx">         return defaultConstructor();
</span><span class="cx">     if (!constructor.isObject()) {
</span><del>-        throwTypeError(exec, &quot;constructor Property should not be null&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;constructor Property should not be null&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     if (JSArrayBufferView* view = jsDynamicCast&lt;JSArrayBufferView*&gt;(result))
</span><span class="cx">         return view;
</span><span class="cx"> 
</span><del>-    throwTypeError(exec, &quot;species constructor did not return a TypedArray View&quot;);
</del><ins>+    throwTypeError(exec, ASCIILiteral(&quot;species constructor did not return a TypedArray View&quot;));
</ins><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">     ViewClass* thisObject = jsCast&lt;ViewClass*&gt;(exec-&gt;thisValue());
</span><span class="cx"> 
</span><span class="cx">     if (!exec-&gt;argumentCount())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Expected at least one argument&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Expected at least one argument&quot;));
</ins><span class="cx"> 
</span><span class="cx">     unsigned offset;
</span><span class="cx">     if (exec-&gt;argumentCount() &gt;= 2) {
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSObject* sourceArray = jsDynamicCast&lt;JSObject*&gt;(exec-&gt;uncheckedArgument(0));
</span><span class="cx">     if (!sourceArray)
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;First argument should be an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;First argument should be an object&quot;));
</ins><span class="cx"> 
</span><span class="cx">     unsigned length;
</span><span class="cx">     if (isTypedView(sourceArray-&gt;classInfo()-&gt;typedArrayStorageType)) {
</span><span class="lines">@@ -145,7 +145,7 @@
</span><span class="cx">         return throwVMTypeError(exec, typedArrayBufferHasBeenDetachedErrorMessage);
</span><span class="cx"> 
</span><span class="cx">     if (exec-&gt;argumentCount() &lt; 2)
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Expected at least two arguments&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Expected at least two arguments&quot;));
</ins><span class="cx"> 
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">         return throwVMTypeError(exec, typedArrayBufferHasBeenDetachedErrorMessage);
</span><span class="cx"> 
</span><span class="cx">     if (!exec-&gt;argumentCount())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Expected at least one argument&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Expected at least one argument&quot;));
</ins><span class="cx"> 
</span><span class="cx">     unsigned length = thisObject-&gt;length();
</span><span class="cx"> 
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">         return throwVMTypeError(exec, typedArrayBufferHasBeenDetachedErrorMessage);
</span><span class="cx"> 
</span><span class="cx">     if (!exec-&gt;argumentCount())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Expected at least one argument&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Expected at least one argument&quot;));
</ins><span class="cx"> 
</span><span class="cx">     unsigned length = thisObject-&gt;length();
</span><span class="cx"> 
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx">         return throwVMTypeError(exec, typedArrayBufferHasBeenDetachedErrorMessage);
</span><span class="cx"> 
</span><span class="cx">     if (!exec-&gt;argumentCount())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Expected at least one argument&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Expected at least one argument&quot;));
</ins><span class="cx"> 
</span><span class="cx">     // Get the length here; later assert that the length didn't change.
</span><span class="cx">     unsigned thisLength = thisObject-&gt;length();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectFunctionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL globalFuncProtoGetter(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     if (exec-&gt;thisValue().isUndefinedOrNull()) 
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Can't convert undefined or null to object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Can't convert undefined or null to object&quot;));
</ins><span class="cx"> 
</span><span class="cx">     JSObject* thisObject = jsDynamicCast&lt;JSObject*&gt;(exec-&gt;thisValue().toThis(exec, NotStrictMode));
</span><span class="cx"> 
</span><span class="lines">@@ -945,7 +945,7 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     if (exec-&gt;thisValue().isUndefinedOrNull()) 
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Can't convert undefined or null to object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Can't convert undefined or null to object&quot;));
</ins><span class="cx"> 
</span><span class="cx">     JSValue value = exec-&gt;argument(0);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSONObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSONObject.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSONObject.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSONObject.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -368,7 +368,7 @@
</span><span class="cx">     // Handle cycle detection, and put the holder on the stack.
</span><span class="cx">     for (unsigned i = 0; i &lt; m_holderStack.size(); i++) {
</span><span class="cx">         if (m_holderStack[i].object() == object) {
</span><del>-            m_exec-&gt;vm().throwException(m_exec, createTypeError(m_exec, ASCIILiteral(&quot;JSON.stringify cannot serialize cyclic structures.&quot;)));
</del><ins>+            throwTypeError(m_exec, ASCIILiteral(&quot;JSON.stringify cannot serialize cyclic structures.&quot;));
</ins><span class="cx">             return StringifyFailed;
</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 (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1357,7 +1357,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!isExtensible) {
</span><span class="cx">         if (shouldThrowIfCantSet)
</span><del>-            throwVMError(exec, createTypeError(exec, StrictModeReadonlyPropertyWriteError));
</del><ins>+            throwTypeError(exec, StrictModeReadonlyPropertyWriteError);
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1640,7 +1640,7 @@
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="cx">         return exec-&gt;exception();
</span><span class="cx">     if (result.isObject())
</span><del>-        return mode == TypeHintMode::DoesNotTakeHint ? JSValue() : throwTypeError(exec, &quot;Symbol.toPrimitive returned an object&quot;);
</del><ins>+        return mode == TypeHintMode::DoesNotTakeHint ? JSValue() : throwTypeError(exec, ASCIILiteral(&quot;Symbol.toPrimitive returned an object&quot;));
</ins><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1670,7 +1670,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!exec-&gt;hadException());
</span><span class="cx"> 
</span><del>-    return exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;No default value&quot;)));
</del><ins>+    return throwTypeError(exec, ASCIILiteral(&quot;No default value&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSValue JSObject::defaultValue(const JSObject* object, ExecState* exec, PreferredPrimitiveType hint)
</span><span class="lines">@@ -1756,7 +1756,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (!proto.isObject()) {
</span><del>-        exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;instanceof called on an object with an invalid prototype property.&quot;)));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;instanceof called on an object with an invalid prototype property.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2943,7 +2943,7 @@
</span><span class="cx">         // Step 2.a
</span><span class="cx">         if (!isExtensible) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to define property on object that is not extensible.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Attempting to define property on object that is not extensible.&quot;));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">         if (!object)
</span><span class="lines">@@ -2966,12 +2966,12 @@
</span><span class="cx">     if (!current.configurable()) {
</span><span class="cx">         if (descriptor.configurable()) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change configurable attribute of unconfigurable property.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Attempting to change configurable attribute of unconfigurable property.&quot;));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">         if (descriptor.enumerablePresent() &amp;&amp; descriptor.enumerable() != current.enumerable()) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change enumerable attribute of unconfigurable property.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Attempting to change enumerable attribute of unconfigurable property.&quot;));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -2991,7 +2991,7 @@
</span><span class="cx">     if (descriptor.isDataDescriptor() != current.isDataDescriptor()) {
</span><span class="cx">         if (!current.configurable()) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -3008,13 +3008,13 @@
</span><span class="cx">         if (!current.configurable()) {
</span><span class="cx">             if (!current.writable() &amp;&amp; descriptor.writable()) {
</span><span class="cx">                 if (throwException)
</span><del>-                    exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change writable attribute of unconfigurable property.&quot;)));
</del><ins>+                    throwTypeError(exec, ASCIILiteral(&quot;Attempting to change writable attribute of unconfigurable property.&quot;));
</ins><span class="cx">                 return false;
</span><span class="cx">             }
</span><span class="cx">             if (!current.writable()) {
</span><span class="cx">                 if (descriptor.value() &amp;&amp; !sameValue(exec, current.value(), descriptor.value())) {
</span><span class="cx">                     if (throwException)
</span><del>-                        exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change value of a readonly property.&quot;)));
</del><ins>+                        throwTypeError(exec, ASCIILiteral(&quot;Attempting to change value of a readonly property.&quot;));
</ins><span class="cx">                     return false;
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -3033,17 +3033,17 @@
</span><span class="cx">     if (!current.configurable()) {
</span><span class="cx">         if (descriptor.setterPresent() &amp;&amp; !(current.setterPresent() &amp;&amp; JSValue::strictEqual(exec, current.setter(), descriptor.setter()))) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change the setter of an unconfigurable property.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Attempting to change the setter of an unconfigurable property.&quot;));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">         if (descriptor.getterPresent() &amp;&amp; !(current.getterPresent() &amp;&amp; JSValue::strictEqual(exec, current.getter(), descriptor.getter()))) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Attempting to change the getter of an unconfigurable property.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Attempting to change the getter of an unconfigurable property.&quot;));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">         if (current.attributes() &amp; CustomAccessor) {
</span><span class="cx">             if (throwException)
</span><del>-                exec-&gt;vm().throwException(exec, createTypeError(exec, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSTypedArrayViewConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -71,15 +71,15 @@
</span><span class="cx"> 
</span><span class="cx">     JSObject* object = jsDynamicCast&lt;JSObject*&gt;(value);
</span><span class="cx">     if (!object)
</span><del>-        return JSValue::encode(throwTypeError(exec, &quot;new.target passed to TypedArray is not an object.&quot;));
</del><ins>+        return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;new.target passed to TypedArray is not an object.&quot;)));
</ins><span class="cx"> 
</span><span class="cx">     ConstructData data;
</span><span class="cx">     if (object-&gt;methodTable()-&gt;getConstructData(object, data) == ConstructType::None)
</span><del>-        return JSValue::encode(throwTypeError(exec, &quot;new.target passed to TypedArray is not a valid constructor.&quot;));
</del><ins>+        return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;new.target passed to TypedArray is not a valid constructor.&quot;)));
</ins><span class="cx"> 
</span><span class="cx">     for (; !value.isNull(); value = jsCast&lt;JSObject*&gt;(value)-&gt;getPrototypeDirect()) {
</span><span class="cx">         if (jsDynamicCast&lt;JSTypedArrayViewConstructor*&gt;(value))
</span><del>-            return JSValue::encode(throwTypeError(exec, &quot;Unable to find TypedArray constructor that inherits from TypedArray.&quot;));
</del><ins>+            return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;Unable to find TypedArray constructor that inherits from TypedArray.&quot;)));
</ins><span class="cx">         if (jsDynamicCast&lt;JSGenericTypedArrayViewConstructor&lt;JSInt8Array&gt;*&gt;(value))
</span><span class="cx">             return constructGenericTypedArrayView&lt;JSInt8Array&gt;(exec);
</span><span class="cx">         if (jsDynamicCast&lt;JSGenericTypedArrayViewConstructor&lt;JSInt16Array&gt;*&gt;(value))
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">             return constructGenericTypedArrayView&lt;JSFloat64Array&gt;(exec);
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    return JSValue::encode(throwTypeError(exec, &quot;Unable to find TypedArray constructor in prototype-chain, hit null.&quot;));
</del><ins>+    return JSValue::encode(throwTypeError(exec, ASCIILiteral(&quot;Unable to find TypedArray constructor in prototype-chain, hit null.&quot;)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ConstructType JSTypedArrayViewConstructor::getConstructData(JSCell*, ConstructData&amp; constructData)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSTypedArrayViewPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx">         return functionName&lt;JSUint16Array&gt;(exec);                                               \
</span><span class="cx">     case NotTypedArray:                                                                         \
</span><span class="cx">     case TypeDataView:                                                                          \
</span><del>-        return throwVMError(exec, createTypeError(exec,                                         \
-            &quot;Receiver should be a typed array view&quot;));                                          \
</del><ins>+        return throwVMTypeError(exec,                                                           \
+            ASCIILiteral(&quot;Receiver should be a typed array view&quot;));                             \
</ins><span class="cx">     }                                                                                           \
</span><span class="cx">     RELEASE_ASSERT_NOT_REACHED();                                                               \
</span><span class="cx"> } while (false)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSArrayBufferView* thisObject = jsCast&lt;JSArrayBufferView*&gt;(argument);
</span><span class="cx">     if (!thisObject || thisObject-&gt;mode() == DataViewMode)
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view&quot;));
</ins><span class="cx">     if (thisObject-&gt;isNeutered())
</span><span class="cx">         return throwVMTypeError(exec, &quot;Underlying ArrayBuffer has been detached from the view&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncSet);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -111,7 +111,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncCopyWithin);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncFill);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncLastIndexOf);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -135,7 +135,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncIndexOf);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncJoin);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncBuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncByteLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoGetterFuncByteOffset);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncReverse);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncSubarray);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Receiver should be a typed array view but was not an object&quot;));
</ins><span class="cx">     CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION(genericTypedArrayViewProtoFuncSlice);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -335,7 +335,7 @@
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     if (!in.isObject()) {
</span><del>-        vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Property description must be an object.&quot;)));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Property description must be an object.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     JSObject* description = asObject(in);
</span><span class="lines">@@ -380,7 +380,7 @@
</span><span class="cx">         if (!get.isUndefined()) {
</span><span class="cx">             CallData callData;
</span><span class="cx">             if (getCallData(get, callData) == CallType::None) {
</span><del>-                vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Getter must be a function.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Getter must be a function.&quot;));
</ins><span class="cx">                 return false;
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">         if (!set.isUndefined()) {
</span><span class="cx">             CallData callData;
</span><span class="cx">             if (getCallData(set, callData) == CallType::None) {
</span><del>-                vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Setter must be a function.&quot;)));
</del><ins>+                throwTypeError(exec, ASCIILiteral(&quot;Setter must be a function.&quot;));
</ins><span class="cx">                 return false;
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="lines">@@ -407,12 +407,12 @@
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     if (desc.value()) {
</span><del>-        vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Invalid property.  'value' present on property with getter or setter.&quot;)));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Invalid property.  'value' present on property with getter or setter.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (desc.writablePresent()) {
</span><del>-        vm.throwException(exec, createTypeError(exec, ASCIILiteral(&quot;Invalid property.  'writable' present on property with getter or setter.&quot;)));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Invalid property.  'writable' present on property with getter or setter.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperty(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     if (!exec-&gt;argument(0).isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Properties can only be defined on Objects.&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Properties can only be defined on Objects.&quot;));
</ins><span class="cx">     JSObject* O = asObject(exec-&gt;argument(0));
</span><span class="cx">     auto propertyName = exec-&gt;argument(1).toPropertyKey(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -476,7 +476,7 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorDefineProperties(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     if (!exec-&gt;argument(0).isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Properties can only be defined on Objects.&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Properties can only be defined on Objects.&quot;));
</ins><span class="cx">     JSObject* targetObj = asObject(exec-&gt;argument(0));
</span><span class="cx">     JSObject* props = exec-&gt;argument(1).toObject(exec);
</span><span class="cx">     if (!props)
</span><span class="lines">@@ -488,7 +488,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue proto = exec-&gt;argument(0);
</span><span class="cx">     if (!proto.isObject() &amp;&amp; !proto.isNull())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Object prototype may only be an Object or null.&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Object prototype may only be an Object or null.&quot;));
</ins><span class="cx">     JSObject* newObject = proto.isObject()
</span><span class="cx">         ? constructEmptyObject(exec, asObject(proto))
</span><span class="cx">         : constructEmptyObject(exec, exec-&gt;lexicalGlobalObject()-&gt;nullPrototypeObjectStructure());
</span><span class="lines">@@ -495,7 +495,7 @@
</span><span class="cx">     if (exec-&gt;argument(1).isUndefined())
</span><span class="cx">         return JSValue::encode(newObject);
</span><span class="cx">     if (!exec-&gt;argument(1).isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Property descriptor list must be an Object.&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Property descriptor list must be an Object.&quot;));
</ins><span class="cx">     return JSValue::encode(defineProperties(exec, newObject, asObject(exec-&gt;argument(1))));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">     JSValue get = exec-&gt;argument(1);
</span><span class="cx">     CallData callData;
</span><span class="cx">     if (getCallData(get, callData) == CallType::None)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;invalid getter usage&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;invalid getter usage&quot;));
</ins><span class="cx"> 
</span><span class="cx">     auto propertyName = exec-&gt;argument(0).toPropertyKey(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">     JSValue set = exec-&gt;argument(1);
</span><span class="cx">     CallData callData;
</span><span class="cx">     if (getCallData(set, callData) == CallType::None)
</span><del>-        return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;invalid setter usage&quot;)));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;invalid setter usage&quot;));
</ins><span class="cx"> 
</span><span class="cx">     auto propertyName = exec-&gt;argument(0).toPropertyKey(exec);
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">     
</span><span class="cx">     if (arg0.inherits(RegExpObject::info())) {
</span><span class="cx">         if (!arg1.isUndefined())
</span><del>-            return throwVMError(exec, createTypeError(exec, ASCIILiteral(&quot;Cannot supply flags when constructing one RegExp from another.&quot;)));
</del><ins>+            return throwVMTypeError(exec, ASCIILiteral(&quot;Cannot supply flags when constructing one RegExp from another.&quot;));
</ins><span class="cx">         regExp = asRegExpObject(arg0)-&gt;regExp();
</span><span class="cx">     } else {
</span><span class="cx">         String pattern = !exec-&gt;argumentCount() ? emptyString() : arg0.toString(exec)-&gt;value(exec);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSymbolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Symbol.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Symbol.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/JavaScriptCore/runtime/Symbol.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx"> 
</span><span class="cx"> double Symbol::toNumber(ExecState* exec) const
</span><span class="cx"> {
</span><del>-    throwTypeError(exec, &quot;Cannot convert a symbol to a number&quot;);
</del><ins>+    throwTypeError(exec, ASCIILiteral(&quot;Cannot convert a symbol to a number&quot;));
</ins><span class="cx">     return 0.0;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/ChangeLog        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2016-07-06  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [JSC] Unify how we throw TypeError from C++
+        https://bugs.webkit.org/show_bug.cgi?id=159500
+
+        Reviewed by Saam Barati.
+
+        * bindings/js/JSBiquadFilterNodeCustom.cpp:
+        (WebCore::JSBiquadFilterNode::setType):
+        * bindings/js/JSBlobCustom.cpp:
+        (WebCore::constructJSBlob):
+        * bindings/js/JSCryptoKeySerializationJWK.cpp:
+        (WebCore::getBigIntegerVectorFromJSON):
+        (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
+        (WebCore::tryJWKKeyOpsValue):
+        (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
+        (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
+        (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents):
+        (WebCore::JSCryptoKeySerializationJWK::keyData):
+        (WebCore::addJWKAlgorithmToJSON):
+        (WebCore::JSCryptoKeySerializationJWK::serialize):
+        * bindings/js/JSCryptoOperationData.cpp:
+        (WebCore::cryptoOperationDataFromJSValue):
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::enforceRange):
+        (WebCore::throwTypeError):
+        (WebCore::throwArgumentMustBeEnumError):
+        (WebCore::throwArgumentMustBeFunctionError):
+        (WebCore::throwArgumentTypeError):
+        (WebCore::throwArrayElementTypeError):
+        (WebCore::throwGetterTypeError):
+        (WebCore::throwThisTypeError):
+        * bindings/js/JSDataCueCustom.cpp:
+        (WebCore::constructJSDataCue):
+        * bindings/js/JSDocumentCustom.cpp:
+        (WebCore::JSDocument::defineElement):
+        * bindings/js/JSFileCustom.cpp:
+        (WebCore::constructJSFile):
+        * bindings/js/JSModuleLoader.cpp:
+        (WebCore::JSModuleLoader::evaluate):
+        * bindings/js/JSMutationObserverCustom.cpp:
+        (WebCore::constructJSMutationObserver):
+        * bindings/js/JSOscillatorNodeCustom.cpp:
+        (WebCore::JSOscillatorNode::setType):
+        * bindings/js/JSPannerNodeCustom.cpp:
+        (WebCore::JSPannerNode::setPanningModel):
+        (WebCore::JSPannerNode::setDistanceModel):
+        * bindings/js/JSReadableStreamPrivateConstructors.cpp:
+        (WebCore::constructJSReadableStreamController):
+        (WebCore::constructJSReadableStreamReader):
+        * bindings/js/JSSubtleCryptoCustom.cpp:
+        (WebCore::cryptoKeyFormatFromJSValue):
+        (WebCore::importKey):
+        (WebCore::exportKey):
+        * bindings/js/ReadableStreamController.cpp:
+        (WebCore::ReadableStreamController::invoke):
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::CloneDeserializer::throwValidationError):
+        (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
+        * bridge/c/c_instance.cpp:
+        (JSC::Bindings::CInstance::invokeMethod):
+        * bridge/objc/objc_instance.mm:
+        (ObjcInstance::invokeMethod):
+        * bridge/objc/objc_runtime.mm:
+        (JSC::Bindings::ObjcArray::setValueAt):
+
</ins><span class="cx"> 2016-07-06  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Email from June 1st containing text 'Today @ 7:10PM' is linkified, but shouldn't be
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBiquadFilterNodeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     if (value.isNumber()) {
</span><span class="cx">         uint32_t type = value.toUInt32(&amp;state);
</span><span class="cx">         if (!wrapped().setType(type))
</span><del>-            state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal BiquadFilterNode type&quot;));
</del><ins>+            throwTypeError(&amp;state, &quot;Illegal BiquadFilterNode type&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal BiquadFilterNode type&quot;));
</del><ins>+    throwTypeError(&amp;state, &quot;Illegal BiquadFilterNode type&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBlobCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSBlobCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">         JSValue blobPropertyBagValue = exec-&gt;argument(1);
</span><span class="cx"> 
</span><span class="cx">         if (!blobPropertyBagValue.isObject())
</span><del>-            return throwVMError(exec, createTypeError(exec, &quot;Second argument of the constructor is not of type Object&quot;));
</del><ins>+            return throwVMTypeError(exec, &quot;Second argument of the constructor is not of type Object&quot;);
</ins><span class="cx"> 
</span><span class="cx">         // Given the above test, this will always yield an object.
</span><span class="cx">         JSObject* blobPropertyBagObject = blobPropertyBagValue.toObject(exec);
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> 
</span><span class="cx">         if (containsEndings) {
</span><span class="cx">             if (endings != &quot;transparent&quot; &amp;&amp; endings != &quot;native&quot;)
</span><del>-                return throwVMError(exec, createTypeError(exec, &quot;The endings property must be either \&quot;transparent\&quot; or \&quot;native\&quot;&quot;));
</del><ins>+                return throwVMTypeError(exec, &quot;The endings property must be either \&quot;transparent\&quot; or \&quot;native\&quot;&quot;);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Attempt to get the type property.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoKeySerializationJWKcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSCryptoKeySerializationJWK.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -117,12 +117,12 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (!base64URLDecode(base64urlEncodedNumber, result)) {
</span><del>-        throwTypeError(exec, &quot;Cannot decode base64url key data in JWK&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Cannot decode base64url key data in JWK&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (result[0] == 0) {
</span><del>-        throwTypeError(exec, &quot;JWK BigInteger must utilize the minimum number of octets to represent the value&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;JWK BigInteger must utilize the minimum number of octets to represent the value&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!jsonValue || !jsonValue.isObject()) {
</span><del>-        throwTypeError(exec, &quot;Invalid JWK serialization&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Invalid JWK serialization&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (operation == tryOperation) {
</span><span class="cx">         if (usages &amp; tryUsage) {
</span><del>-            throwTypeError(exec, &quot;JWK key_ops contains a duplicate operation&quot;);
</del><ins>+            throwTypeError(exec, ASCIILiteral(&quot;JWK key_ops contains a duplicate operation&quot;));
</ins><span class="cx">             return false;
</span><span class="cx">         }
</span><span class="cx">         usages |= tryUsage;
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx">             String operation;
</span><span class="cx">             if (!jsValue.getString(m_exec, operation)) {
</span><span class="cx">                 if (!m_exec-&gt;hadException())
</span><del>-                    throwTypeError(m_exec, &quot;JWK key_ops attribute could not be processed&quot;);
</del><ins>+                    throwTypeError(m_exec, ASCIILiteral(&quot;JWK key_ops attribute could not be processed&quot;));
</ins><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx">             if (!tryJWKKeyOpsValue(m_exec, jwkUsages, operation, ASCIILiteral(&quot;sign&quot;), CryptoKeyUsageSign))
</span><span class="lines">@@ -362,13 +362,13 @@
</span><span class="cx">     String keyBase64URL;
</span><span class="cx">     if (!getStringFromJSON(m_exec, m_json.get(), &quot;k&quot;, keyBase64URL)) {
</span><span class="cx">         if (!m_exec-&gt;hadException())
</span><del>-            throwTypeError(m_exec, &quot;Secret key data is not present is JWK&quot;);
</del><ins>+            throwTypeError(m_exec, ASCIILiteral(&quot;Secret key data is not present is JWK&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;uint8_t&gt; octetSequence;
</span><span class="cx">     if (!base64URLDecode(keyBase64URL, octetSequence)) {
</span><del>-        throwTypeError(m_exec, &quot;Cannot decode base64url key data in JWK&quot;);
</del><ins>+        throwTypeError(m_exec, ASCIILiteral(&quot;Cannot decode base64url key data in JWK&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -388,7 +388,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!getBigIntegerVectorFromJSON(m_exec, m_json.get(), &quot;n&quot;, modulus)) {
</span><span class="cx">         if (!m_exec-&gt;hadException())
</span><del>-            throwTypeError(m_exec, &quot;Required JWK \&quot;n\&quot; member is missing&quot;);
</del><ins>+            throwTypeError(m_exec, ASCIILiteral(&quot;Required JWK \&quot;n\&quot; member is missing&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -399,7 +399,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!getBigIntegerVectorFromJSON(m_exec, m_json.get(), &quot;e&quot;, exponent)) {
</span><span class="cx">         if (!m_exec-&gt;hadException())
</span><del>-            throwTypeError(m_exec, &quot;Required JWK \&quot;e\&quot; member is missing&quot;);
</del><ins>+            throwTypeError(m_exec, ASCIILiteral(&quot;Required JWK \&quot;e\&quot; member is missing&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -455,22 +455,22 @@
</span><span class="cx">         if (m_exec-&gt;hadException())
</span><span class="cx">             return nullptr;
</span><span class="cx">         if (!element.isObject()) {
</span><del>-            throwTypeError(m_exec, &quot;JWK \&quot;oth\&quot; array member is not an object&quot;);
</del><ins>+            throwTypeError(m_exec, ASCIILiteral(&quot;JWK \&quot;oth\&quot; array member is not an object&quot;));
</ins><span class="cx">             return nullptr;
</span><span class="cx">         }
</span><span class="cx">         if (!getBigIntegerVectorFromJSON(m_exec, asObject(element), &quot;r&quot;, info.primeFactor)) {
</span><span class="cx">             if (!m_exec-&gt;hadException())
</span><del>-                throwTypeError(m_exec, &quot;Cannot get prime factor for a prime in \&quot;oth\&quot; dictionary&quot;);
</del><ins>+                throwTypeError(m_exec, ASCIILiteral(&quot;Cannot get prime factor for a prime in \&quot;oth\&quot; dictionary&quot;));
</ins><span class="cx">             return nullptr;
</span><span class="cx">         }
</span><span class="cx">         if (!getBigIntegerVectorFromJSON(m_exec, asObject(element), &quot;d&quot;, info.factorCRTExponent)) {
</span><span class="cx">             if (!m_exec-&gt;hadException())
</span><del>-                throwTypeError(m_exec, &quot;Cannot get factor CRT exponent for a prime in \&quot;oth\&quot; dictionary&quot;);
</del><ins>+                throwTypeError(m_exec, ASCIILiteral(&quot;Cannot get factor CRT exponent for a prime in \&quot;oth\&quot; dictionary&quot;));
</ins><span class="cx">             return nullptr;
</span><span class="cx">         }
</span><span class="cx">         if (!getBigIntegerVectorFromJSON(m_exec, asObject(element), &quot;t&quot;, info.factorCRTCoefficient)) {
</span><span class="cx">             if (!m_exec-&gt;hadException())
</span><del>-                throwTypeError(m_exec, &quot;Cannot get factor CRT coefficient for a prime in \&quot;oth\&quot; dictionary&quot;);
</del><ins>+                throwTypeError(m_exec, ASCIILiteral(&quot;Cannot get factor CRT coefficient for a prime in \&quot;oth\&quot; dictionary&quot;));
</ins><span class="cx">             return nullptr;
</span><span class="cx">         }
</span><span class="cx">         otherPrimeInfos.append(info);
</span><span class="lines">@@ -484,7 +484,7 @@
</span><span class="cx">     String jwkKeyType;
</span><span class="cx">     if (!getStringFromJSON(m_exec, m_json.get(), &quot;kty&quot;, jwkKeyType)) {
</span><span class="cx">         if (!m_exec-&gt;hadException())
</span><del>-            throwTypeError(m_exec, &quot;Required JWK \&quot;kty\&quot; member is missing&quot;);
</del><ins>+            throwTypeError(m_exec, ASCIILiteral(&quot;Required JWK \&quot;kty\&quot; member is missing&quot;));
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -649,7 +649,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (jwkAlgorithm.isNull()) {
</span><span class="cx">         // The spec doesn't currently tell whether export should fail, or just skip &quot;alg&quot; (which is an optional key in JWK).
</span><del>-        throwTypeError(exec, &quot;Key algorithm and size do not map to any JWK algorithm identifier&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Key algorithm and size do not map to any JWK algorithm identifier&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx">     std::unique_ptr&lt;CryptoKeyData&gt; keyData = key.exportData();
</span><span class="cx">     if (!keyData) {
</span><span class="cx">         // This generally shouldn't happen as long as all key types implement exportData(), but as underlying libraries return errors, there may be some rare failure conditions.
</span><del>-        throwTypeError(exec, &quot;Couldn't export key material&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Couldn't export key material&quot;));
</ins><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -710,7 +710,7 @@
</span><span class="cx">     else if (is&lt;CryptoKeyDataRSAComponents&gt;(*keyData))
</span><span class="cx">         buildJSONForRSAComponents(exec, downcast&lt;CryptoKeyDataRSAComponents&gt;(*keyData), result);
</span><span class="cx">     else {
</span><del>-        throwTypeError(exec, &quot;Key doesn't support exportKey&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Key doesn't support exportKey&quot;));
</ins><span class="cx">         return String();
</span><span class="cx">     }
</span><span class="cx">     if (exec-&gt;hadException())
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCryptoOperationDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSCryptoOperationData.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">     else if (RefPtr&lt;ArrayBufferView&gt; bufferView = toArrayBufferView(value))
</span><span class="cx">         result = std::make_pair(static_cast&lt;uint8_t*&gt;(bufferView-&gt;baseAddress()), bufferView-&gt;byteLength());
</span><span class="cx">     else {
</span><del>-        throwTypeError(exec, &quot;Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData&quot;);
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -374,12 +374,12 @@
</span><span class="cx"> static double enforceRange(ExecState&amp; state, double x, double minimum, double maximum)
</span><span class="cx"> {
</span><span class="cx">     if (std::isnan(x) || std::isinf(x)) {
</span><del>-        state.vm().throwException(&amp;state, createTypeError(&amp;state, rangeErrorString(x, minimum, maximum)));
</del><ins>+        throwTypeError(&amp;state, rangeErrorString(x, minimum, maximum));
</ins><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx">     x = trunc(x);
</span><span class="cx">     if (x &lt; minimum || x &gt; maximum) {
</span><del>-        state.vm().throwException(&amp;state, createTypeError(&amp;state, rangeErrorString(x, minimum, maximum)));
</del><ins>+        throwTypeError(&amp;state, rangeErrorString(x, minimum, maximum));
</ins><span class="cx">         return 0;
</span><span class="cx">     }
</span><span class="cx">     return x;
</span><span class="lines">@@ -736,7 +736,7 @@
</span><span class="cx">     
</span><span class="cx"> static EncodedJSValue throwTypeError(JSC::ExecState&amp; state, const String&amp; errorMessage)
</span><span class="cx"> {
</span><del>-    return throwVMError(&amp;state, createTypeError(&amp;state, errorMessage));
</del><ins>+    return throwVMTypeError(&amp;state, errorMessage);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void appendArgumentMustBe(StringBuilder&amp; builder, unsigned argumentIndex, const char* argumentName, const char* interfaceName, const char* functionName)
</span><span class="lines">@@ -791,7 +791,7 @@
</span><span class="cx">     appendArgumentMustBe(builder, argumentIndex, argumentName, functionInterfaceName, functionName);
</span><span class="cx">     builder.appendLiteral(&quot;one of: &quot;);
</span><span class="cx">     builder.append(expectedValues);
</span><del>-    return throwTypeError(state, builder.toString());
</del><ins>+    return throwVMTypeError(&amp;state, builder.toString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSC::EncodedJSValue throwArgumentMustBeFunctionError(JSC::ExecState&amp; state, unsigned argumentIndex, const char* argumentName, const char* interfaceName, const char* functionName)
</span><span class="lines">@@ -799,7 +799,7 @@
</span><span class="cx">     StringBuilder builder;
</span><span class="cx">     appendArgumentMustBe(builder, argumentIndex, argumentName, interfaceName, functionName);
</span><span class="cx">     builder.appendLiteral(&quot;a function&quot;);
</span><del>-    return throwTypeError(state, builder.toString());
</del><ins>+    return throwVMTypeError(&amp;state, builder.toString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> JSC::EncodedJSValue throwArgumentTypeError(JSC::ExecState&amp; state, unsigned argumentIndex, const char* argumentName, const char* functionInterfaceName, const char* functionName, const char* expectedType)
</span><span class="lines">@@ -808,12 +808,12 @@
</span><span class="cx">     appendArgumentMustBe(builder, argumentIndex, argumentName, functionInterfaceName, functionName);
</span><span class="cx">     builder.appendLiteral(&quot;an instance of &quot;);
</span><span class="cx">     builder.append(expectedType);
</span><del>-    return throwTypeError(state, builder.toString());
</del><ins>+    return throwVMTypeError(&amp;state, builder.toString());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void throwArrayElementTypeError(JSC::ExecState&amp; state)
</span><span class="cx"> {
</span><del>-    throwTypeError(state, &quot;Invalid Array element type&quot;);
</del><ins>+    throwTypeError(state, ASCIILiteral(&quot;Invalid Array element type&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void throwAttributeTypeError(JSC::ExecState&amp; state, const char* interfaceName, const char* attributeName, const char* expectedType)
</span><span class="lines">@@ -829,7 +829,7 @@
</span><span class="cx"> 
</span><span class="cx"> JSC::EncodedJSValue throwGetterTypeError(JSC::ExecState&amp; state, const char* interfaceName, const char* attributeName)
</span><span class="cx"> {
</span><del>-    return throwTypeError(state, makeString(&quot;The &quot;, interfaceName, '.', attributeName, &quot; getter can only be used on instances of &quot;, interfaceName));
</del><ins>+    return throwVMTypeError(&amp;state, makeString(&quot;The &quot;, interfaceName, '.', attributeName, &quot; getter can only be used on instances of &quot;, interfaceName));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void throwSequenceTypeError(JSC::ExecState&amp; state)
</span><span class="lines">@@ -850,7 +850,7 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue throwThisTypeError(JSC::ExecState&amp; state, const char* interfaceName, const char* functionName)
</span><span class="cx"> {
</span><del>-    return throwTypeError(state, makeString(&quot;Can only call &quot;, interfaceName, '.', functionName, &quot; on instances of &quot;, interfaceName));
</del><ins>+    return throwVMTypeError(&amp;state, makeString(&quot;Can only call &quot;, interfaceName, '.', functionName, &quot; on instances of &quot;, interfaceName));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void callFunctionWithCurrentArguments(JSC::ExecState&amp; state, JSC::JSObject&amp; thisObject, JSC::JSFunction&amp; function)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDataCueCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDataCueCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDataCueCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSDataCueCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> #if ENABLE(DATACUE_VALUE)
</span><span class="cx">     if (exec-&gt;argumentCount() &gt; 3) {
</span><span class="cx">         if (!exec-&gt;argument(3).isString())
</span><del>-            return throwVMError(exec, createTypeError(exec, &quot;Second argument of the constructor is not of type String&quot;));
</del><ins>+            return throwVMTypeError(exec, ASCIILiteral(&quot;Second argument of the constructor is not of type String&quot;));
</ins><span class="cx">         type = exec-&gt;argument(3).getString(exec);
</span><span class="cx">     }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDocumentCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx">     JSObject* object = state.argument(1).getObject();
</span><span class="cx">     ConstructData callData;
</span><span class="cx">     if (!object || object-&gt;methodTable()-&gt;getConstructData(object, callData) == ConstructType::None)
</span><del>-        return throwTypeError(&amp;state, &quot;The second argument must be a constructor&quot;);
</del><ins>+        return throwTypeError(&amp;state, ASCIILiteral(&quot;The second argument must be a constructor&quot;));
</ins><span class="cx"> 
</span><span class="cx">     Document&amp; document = wrapped();
</span><span class="cx">     if (!document.domWindow()) {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSFileCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSFileCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSFileCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSFileCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSValue arg = exec-&gt;argument(0);
</span><span class="cx">     if (arg.isUndefinedOrNull())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;First argument to File constructor must be a valid sequence, was undefined or null&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;First argument to File constructor must be a valid sequence, was undefined or null&quot;));
</ins><span class="cx"> 
</span><span class="cx">     unsigned blobPartsLength = 0;
</span><span class="cx">     JSObject* blobParts = toJSSequence(exec, arg, blobPartsLength);
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">     arg = exec-&gt;argument(1);
</span><span class="cx">     if (arg.isUndefined())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Second argument to File constructor must be a valid string, was undefined&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Second argument to File constructor must be a valid string, was undefined&quot;));
</ins><span class="cx"> 
</span><span class="cx">     String filename = arg.toWTFString(exec).replace('/', ':');
</span><span class="cx">     if (exec-&gt;hadException())
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     if (!arg.isUndefinedOrNull()) {
</span><span class="cx">         JSObject* filePropertyBagObject = arg.getObject();
</span><span class="cx">         if (!filePropertyBagObject)
</span><del>-            return throwVMError(exec, createTypeError(exec, &quot;Third argument of the constructor is not of type Object&quot;));
</del><ins>+            return throwVMTypeError(exec, ASCIILiteral(&quot;Third argument of the constructor is not of type Object&quot;));
</ins><span class="cx"> 
</span><span class="cx">         // Create the dictionary wrapper from the initializer object.
</span><span class="cx">         JSDictionary dictionary(exec, filePropertyBagObject);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSModuleLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSModuleLoader.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSModuleLoader.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSModuleLoader.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -116,10 +116,10 @@
</span><span class="cx">     else if (moduleKeyValue.isString())
</span><span class="cx">         sourceUrl = URL(URL(), asString(moduleKeyValue)-&gt;value(exec));
</span><span class="cx">     else
</span><del>-        return JSC::throwTypeError(exec, &quot;Module key is not Symbol or String.&quot;);
</del><ins>+        return JSC::throwTypeError(exec, ASCIILiteral(&quot;Module key is not Symbol or String.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     if (!sourceUrl.isValid())
</span><del>-        return JSC::throwTypeError(exec, &quot;Module key is an invalid URL.&quot;);
</del><ins>+        return JSC::throwTypeError(exec, ASCIILiteral(&quot;Module key is an invalid URL.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Implement evaluating module code.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMutationObserverCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSMutationObserverCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">     JSObject* object = exec-&gt;argument(0).getObject();
</span><span class="cx">     CallData callData;
</span><span class="cx">     if (!object || object-&gt;methodTable()-&gt;getCallData(object, callData) == CallType::None)
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Callback argument must be a function&quot;));
</del><ins>+        return throwVMTypeError(exec, ASCIILiteral(&quot;Callback argument must be a function&quot;));
</ins><span class="cx"> 
</span><span class="cx">     DOMConstructorObject* jsConstructor = jsCast&lt;DOMConstructorObject*&gt;(exec-&gt;callee());
</span><span class="cx">     auto callback = JSMutationCallback::create(object, jsConstructor-&gt;globalObject());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSOscillatorNodeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     if (value.isNumber()) {
</span><span class="cx">         uint32_t type = value.toUInt32(&amp;state);
</span><span class="cx">         if (!imp.setType(type))
</span><del>-            state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal OscillatorNode type&quot;));
</del><ins>+            throwTypeError(&amp;state, ASCIILiteral(&quot;Illegal OscillatorNode type&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal OscillatorNode type&quot;));
</del><ins>+    throwTypeError(&amp;state, ASCIILiteral(&quot;Illegal OscillatorNode type&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSPannerNodeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     if (value.isNumber()) {
</span><span class="cx">         uint32_t model = value.toUInt32(&amp;state);
</span><span class="cx">         if (!imp.setPanningModel(model))
</span><del>-            state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal panningModel&quot;));
</del><ins>+            throwTypeError(&amp;state, ASCIILiteral(&quot;Illegal panningModel&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal panningModel&quot;));
</del><ins>+    throwTypeError(&amp;state, ASCIILiteral(&quot;Illegal panningModel&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSPannerNode::setDistanceModel(ExecState&amp; state, JSValue value)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">     if (value.isNumber()) {
</span><span class="cx">         uint32_t model = value.toUInt32(&amp;state);
</span><span class="cx">         if (!imp.setDistanceModel(model))
</span><del>-            state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal distanceModel&quot;));
</del><ins>+            throwTypeError(&amp;state, ASCIILiteral(&quot;Illegal distanceModel&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    state.vm().throwException(&amp;state, createTypeError(&amp;state, &quot;Illegal distanceModel&quot;));
</del><ins>+    throwTypeError(&amp;state, ASCIILiteral(&quot;Illegal distanceModel&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSReadableStreamPrivateConstructorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> // Public JS ReadableStreamReder and ReadableStreamController constructor callbacks.
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL constructJSReadableStreamController(ExecState* state)
</span><span class="cx"> {
</span><del>-    return throwVMError(state, createTypeError(state, ASCIILiteral(&quot;ReadableStreamController constructor should not be called directly&quot;)));
</del><ins>+    return throwVMTypeError(state, ASCIILiteral(&quot;ReadableStreamController constructor should not be called directly&quot;));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL constructJSReadableStreamReader(ExecState* state)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSReadableStream* stream = jsDynamicCast&lt;JSReadableStream*&gt;(state-&gt;argument(0));
</span><span class="cx">     if (!stream)
</span><del>-        return throwVMError(state, createTypeError(state, ASCIILiteral(&quot;ReadableStreamReader constructor parameter is not a ReadableStream&quot;)));
</del><ins>+        return throwVMTypeError(state, ASCIILiteral(&quot;ReadableStreamReader constructor parameter is not a ReadableStream&quot;));
</ins><span class="cx"> 
</span><span class="cx">     JSValue jsFunction = stream-&gt;get(state, Identifier::fromString(state, &quot;getReader&quot;));
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     else if (keyFormatString == &quot;jwk&quot;)
</span><span class="cx">         result = CryptoKeyFormat::JWK;
</span><span class="cx">     else {
</span><del>-        throwTypeError(&amp;state, &quot;Unknown key format&quot;);
</del><ins>+        throwTypeError(&amp;state, ASCIILiteral(&quot;Unknown key format&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx">     return true;
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx">     case CryptoKeyFormat::JWK: {
</span><span class="cx">         String jwkString = String::fromUTF8(data.first, data.second);
</span><span class="cx">         if (jwkString.isNull()) {
</span><del>-            throwTypeError(&amp;state, &quot;JWK JSON serialization is not valid UTF-8&quot;);
</del><ins>+            throwTypeError(&amp;state, ASCIILiteral(&quot;JWK JSON serialization is not valid UTF-8&quot;));
</ins><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx">         keySerialization = std::make_unique&lt;JSCryptoKeySerializationJWK&gt;(&amp;state, jwkString);
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     default:
</span><del>-        throwTypeError(&amp;state, &quot;Unsupported key format for import&quot;);
</del><ins>+        throwTypeError(&amp;state, ASCIILiteral(&quot;Unsupported key format for import&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!keySerialization-&gt;reconcileAlgorithm(algorithm, parameters)) {
</span><span class="cx">         if (!state.hadException())
</span><del>-            throwTypeError(&amp;state, &quot;Algorithm specified in key is not compatible with one passed to importKey as argument&quot;);
</del><ins>+            throwTypeError(&amp;state, ASCIILiteral(&quot;Algorithm specified in key is not compatible with one passed to importKey as argument&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     if (state.hadException())
</span><span class="lines">@@ -477,7 +477,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!algorithm) {
</span><del>-        throwTypeError(&amp;state, &quot;Neither key nor function argument has crypto algorithm specified&quot;);
</del><ins>+        throwTypeError(&amp;state, ASCIILiteral(&quot;Neither key nor function argument has crypto algorithm specified&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     ASSERT(parameters);
</span><span class="lines">@@ -566,7 +566,7 @@
</span><span class="cx"> static void exportKey(ExecState&amp; state, CryptoKeyFormat keyFormat, const CryptoKey&amp; key, CryptoAlgorithm::VectorCallback callback, CryptoAlgorithm::VoidCallback failureCallback)
</span><span class="cx"> {
</span><span class="cx">     if (!key.extractable()) {
</span><del>-        throwTypeError(&amp;state, &quot;Key is not extractable&quot;);
</del><ins>+        throwTypeError(&amp;state, ASCIILiteral(&quot;Key is not extractable&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -590,7 +590,7 @@
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     default:
</span><del>-        throwTypeError(&amp;state, &quot;Unsupported key format for export&quot;);
</del><ins>+        throwTypeError(&amp;state, ASCIILiteral(&quot;Unsupported key format for export&quot;));
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsReadableStreamControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/ReadableStreamController.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!function.isFunction()) {
</span><span class="cx">         if (!function.isUndefined())
</span><del>-            throwVMError(&amp;state, createTypeError(&amp;state, ASCIILiteral(&quot;ReadableStream trying to call a property that is not callable&quot;)));
</del><ins>+            throwTypeError(&amp;state, ASCIILiteral(&quot;ReadableStream trying to call a property that is not callable&quot;));
</ins><span class="cx">         return JSC::jsUndefined();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsSerializedScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1569,7 +1569,7 @@
</span><span class="cx"> 
</span><span class="cx">     void throwValidationError()
</span><span class="cx">     {
</span><del>-        m_exec-&gt;vm().throwException(m_exec, createTypeError(m_exec, &quot;Unable to deserialize data.&quot;));
</del><ins>+        throwTypeError(m_exec, ASCIILiteral(&quot;Unable to deserialize data.&quot;));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool isValid() const { return m_version &lt;= CurrentVersion; }
</span><span class="lines">@@ -2763,7 +2763,7 @@
</span><span class="cx">         exec-&gt;vm().throwException(exec, createStackOverflowError(exec));
</span><span class="cx">         break;
</span><span class="cx">     case ValidationError:
</span><del>-        exec-&gt;vm().throwException(exec, createTypeError(exec, &quot;Unable to deserialize data.&quot;));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Unable to deserialize data.&quot;));
</ins><span class="cx">         break;
</span><span class="cx">     case DataCloneError:
</span><span class="cx">         setDOMException(exec, DATA_CLONE_ERR);
</span></span></pre></div>
<a id="trunkSourceWebCorebridgecc_instancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/c/c_instance.cpp (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/c/c_instance.cpp        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bridge/c/c_instance.cpp        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> JSValue CInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMethod)
</span><span class="cx"> {
</span><span class="cx">     if (!asObject(runtimeMethod)-&gt;inherits(CRuntimeMethod::info()))
</span><del>-        return exec-&gt;vm().throwException(exec, createTypeError(exec, &quot;Attempt to invoke non-plug-in method on plug-in object.&quot;));
</del><ins>+        return throwTypeError(exec, &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>
<a id="trunkSourceWebCorebridgeobjcobjc_instancemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/objc/objc_instance.mm (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/objc/objc_instance.mm        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bridge/objc/objc_instance.mm        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx"> JSC::JSValue ObjcInstance::invokeMethod(ExecState* exec, RuntimeMethod* runtimeMethod)
</span><span class="cx"> {
</span><span class="cx">     if (!asObject(runtimeMethod)-&gt;inherits(ObjCRuntimeMethod::info()))
</span><del>-        return exec-&gt;vm().throwException(exec, createTypeError(exec, &quot;Attempt to invoke non-plug-in method on plug-in object.&quot;));
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;Attempt to invoke non-plug-in method on plug-in object.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     ObjcMethod *method = static_cast&lt;ObjcMethod*&gt;(runtimeMethod-&gt;method());
</span><span class="cx">     ASSERT(method);
</span></span></pre></div>
<a id="trunkSourceWebCorebridgeobjcobjc_runtimemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bridge/objc/objc_runtime.mm (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bridge/objc/objc_runtime.mm        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebCore/bridge/objc/objc_runtime.mm        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> bool ObjcArray::setValueAt(ExecState* exec, unsigned int index, JSValue aValue) const
</span><span class="cx"> {
</span><span class="cx">     if (![_array.get() respondsToSelector:@selector(insertObject:atIndex:)]) {
</span><del>-        exec-&gt;vm().throwException(exec, createTypeError(exec, &quot;Array is not mutable.&quot;));
</del><ins>+        throwTypeError(exec, ASCIILiteral(&quot;Array is not mutable.&quot;));
</ins><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-07-06  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [JSC] Unify how we throw TypeError from C++
+        https://bugs.webkit.org/show_bug.cgi?id=159500
+
+        Reviewed by Saam Barati.
+
+        * Plugins/Hosted/ProxyInstance.mm:
+        (WebKit::ProxyInstance::invokeMethod):
+
</ins><span class="cx"> 2016-07-01  Youenn Fablet  &lt;youennf@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a runtime flag for DOM iterators
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsHostedProxyInstancemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm (202889 => 202890)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm        2016-07-07 03:03:42 UTC (rev 202889)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm        2016-07-07 03:12:37 UTC (rev 202890)
</span><span class="lines">@@ -220,7 +220,7 @@
</span><span class="cx"> JSValue ProxyInstance::invokeMethod(ExecState* exec, JSC::RuntimeMethod* runtimeMethod)
</span><span class="cx"> {
</span><span class="cx">     if (!asObject(runtimeMethod)-&gt;inherits(ProxyRuntimeMethod::info()))
</span><del>-        return exec-&gt;vm().throwException(exec, createTypeError(exec, &quot;Attempt to invoke non-plug-in method on plug-in object.&quot;));
</del><ins>+        return throwTypeError(exec, ASCIILiteral(&quot;Attempt to invoke non-plug-in method on plug-in object.&quot;));
</ins><span class="cx"> 
</span><span class="cx">     ProxyMethod* method = static_cast&lt;ProxyMethod*&gt;(runtimeMethod-&gt;method());
</span><span class="cx">     ASSERT(method);
</span></span></pre>
</div>
</div>

</body>
</html>