Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: src/regexp.js

Issue 1095573002: Revert of Migrate error messages, part 2. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp.js
diff --git a/src/regexp.js b/src/regexp.js
index 9db8e995b057c5d7c7d992bde3f409d6be04339d..a344b31f8a6c26e5f8db48d1bdf3f3d0e98bc25a 100644
--- a/src/regexp.js
+++ b/src/regexp.js
@@ -88,8 +88,8 @@
// behavior.
if (this == GlobalRegExp.prototype) {
// We don't allow recompiling RegExp.prototype.
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'RegExp.prototype.compile', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['RegExp.prototype.compile', this]);
}
if (IS_UNDEFINED(pattern) && %_ArgumentsLength() != 0) {
DoConstructRegExp(this, 'undefined', flags);
@@ -146,8 +146,8 @@
function RegExpExecJS(string) {
if (!IS_REGEXP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'RegExp.prototype.exec', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['RegExp.prototype.exec', this]);
}
string = TO_STRING_INLINE(string);
@@ -194,8 +194,8 @@
// else implements.
function RegExpTest(string) {
if (!IS_REGEXP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'RegExp.prototype.test', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['RegExp.prototype.test', this]);
}
string = TO_STRING_INLINE(string);
@@ -256,8 +256,8 @@
function RegExpToString() {
if (!IS_REGEXP(this)) {
- throw MakeTypeError(kIncompatibleMethodReceiver,
- 'RegExp.prototype.toString', this);
+ throw MakeTypeError('incompatible_method_receiver',
+ ['RegExp.prototype.toString', this]);
}
var result = '/' + this.source + '/';
if (this.global) result += 'g';
« no previous file with comments | « src/objects.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698