Bug 1155081 - Part 2: Replace ThrowError with ThrowTypeError in Error.js. r=till
authorTooru Fujisawa <arai_a@mac.com>
Mon, 20 Apr 2015 13:58:16 +0900
changeset 239963 2a0d8d5ad8618b6d7c3dcab6ae75e2c160ea7387
parent 239962 eb3e1a036aeb9403bb7bbd19a75c78d43b2257f2
child 239964 273ba0af084ea84e31da7c3b79ad942f190d63f9
push id28618
push userkwierso@gmail.com
push dateMon, 20 Apr 2015 23:44:35 +0000
treeherdermozilla-central@bfbb2f3babcb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1155081
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1155081 - Part 2: Replace ThrowError with ThrowTypeError in Error.js. r=till
js/src/builtin/Error.js
--- a/js/src/builtin/Error.js
+++ b/js/src/builtin/Error.js
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* ES6 20140718 draft 19.5.3.4. */
 function ErrorToString()
 {
   /* Steps 1-2. */
   var obj = this;
   if (!IsObject(obj))
-    ThrowError(JSMSG_INCOMPATIBLE_PROTO, "Error", "toString", "value");
+    ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "Error", "toString", "value");
 
   /* Steps 3-5. */
   var name = obj.name;
   name = (name === undefined) ? "Error" : ToString(name);
 
   /* Steps 6-8. */
   var msg = obj.message;
   msg = (msg === undefined) ? "" : ToString(msg);