Bug 1155081 - Part 7: Replace ThrowError with ThrowTypeError in RegExp.js. r=till
authorTooru Fujisawa <arai_a@mac.com>
Mon, 20 Apr 2015 13:58:17 +0900
changeset 239968 9253a9d5cb1d8d1f1bffcc273f93644a554399b2
parent 239967 556318c0135806ded8662a0065e4620d0617a42d
child 239969 156c934d3a6698e4d6ce135315b2772a1317cdf9
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 7: Replace ThrowError with ThrowTypeError in RegExp.js. r=till
js/src/builtin/RegExp.js
--- a/js/src/builtin/RegExp.js
+++ b/js/src/builtin/RegExp.js
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // ES6 draft rev34 (2015/02/20) 21.2.5.3 get RegExp.prototype.flags
 function RegExpFlagsGetter() {
     // Steps 1-2.
     var R = this;
     if (!IsObject(R))
-        ThrowError(JSMSG_NOT_NONNULL_OBJECT, R === null ? "null" : typeof R);
+        ThrowTypeError(JSMSG_NOT_NONNULL_OBJECT, R === null ? "null" : typeof R);
 
     // Step 3.
     var result = "";
 
     // Steps 4-6.
     if (R.global)
         result += "g";
 
@@ -38,17 +38,17 @@ function RegExpFlagsGetter() {
 }
 
 // ES6 draft rc1 21.2.5.14.
 function RegExpToString()
 {
     // Steps 1-2.
     var R = this;
     if (!IsObject(R))
-        ThrowError(JSMSG_NOT_NONNULL_OBJECT, R === null ? "null" : typeof R);
+        ThrowTypeError(JSMSG_NOT_NONNULL_OBJECT, R === null ? "null" : typeof R);
 
     // Steps 3-4.
     var pattern = R.source;
 
     // Steps 5-6.
     var flags = R.flags;
 
     // Step 7.