Bug 1155081 - Part 7: Replace ThrowError with ThrowTypeError in RegExp.js. r=till

This commit is contained in:
Tooru Fujisawa 2015-04-20 13:58:17 +09:00
parent 836f41fa7e
commit 6ddc8b1a6d

View File

@ -7,7 +7,7 @@ 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 = "";
@ -43,7 +43,7 @@ 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;