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

Unified Diff: src/regexp.js

Issue 1086313003: 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 a344b31f8a6c26e5f8db48d1bdf3f3d0e98bc25a..9db8e995b057c5d7c7d992bde3f409d6be04339d 100644
--- a/src/regexp.js
+++ b/src/regexp.js
@@ -88,8 +88,8 @@ function RegExpCompileJS(pattern, flags) {
// behavior.
if (this == GlobalRegExp.prototype) {
// We don't allow recompiling RegExp.prototype.
- throw MakeTypeError('incompatible_method_receiver',
- ['RegExp.prototype.compile', this]);
+ throw MakeTypeError(kIncompatibleMethodReceiver,
+ 'RegExp.prototype.compile', this);
}
if (IS_UNDEFINED(pattern) && %_ArgumentsLength() != 0) {
DoConstructRegExp(this, 'undefined', flags);
@@ -146,8 +146,8 @@ function RegExpExecNoTests(regexp, string, start) {
function RegExpExecJS(string) {
if (!IS_REGEXP(this)) {
- throw MakeTypeError('incompatible_method_receiver',
- ['RegExp.prototype.exec', this]);
+ throw MakeTypeError(kIncompatibleMethodReceiver,
+ 'RegExp.prototype.exec', this);
}
string = TO_STRING_INLINE(string);
@@ -194,8 +194,8 @@ var regexp_val;
// else implements.
function RegExpTest(string) {
if (!IS_REGEXP(this)) {
- throw MakeTypeError('incompatible_method_receiver',
- ['RegExp.prototype.test', this]);
+ throw MakeTypeError(kIncompatibleMethodReceiver,
+ 'RegExp.prototype.test', this);
}
string = TO_STRING_INLINE(string);
@@ -256,8 +256,8 @@ function TrimRegExp(regexp) {
function RegExpToString() {
if (!IS_REGEXP(this)) {
- throw MakeTypeError('incompatible_method_receiver',
- ['RegExp.prototype.toString', this]);
+ throw MakeTypeError(kIncompatibleMethodReceiver,
+ '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