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

Unified Diff: src/js/regexp.js

Issue 1838593002: Replace IS_OBJECT with IS_RECEIVER in regexp.js (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/regexp.js
diff --git a/src/js/regexp.js b/src/js/regexp.js
index a1055b3dd5e2f876dbe253dab400d53e96ee1aad..6fdc06cfe74d02234664616c3bff22a547b5d8cb 100644
--- a/src/js/regexp.js
+++ b/src/js/regexp.js
@@ -271,7 +271,7 @@ function RegExpSubclassExec(regexp, string) {
var exec = regexp.exec;
if (IS_CALLABLE(exec)) {
var result = %_Call(exec, regexp, string);
- if (!IS_OBJECT(result) && !IS_NULL(result)) {
+ if (!IS_RECEIVER(result) && !IS_NULL(result)) {
throw MakeTypeError(kInvalidRegExpExecResult);
}
return result;
@@ -341,7 +341,7 @@ function RegExpTest(string) {
// ES#sec-regexp.prototype.test RegExp.prototype.test ( S )
function RegExpSubclassTest(string) {
- if (!IS_OBJECT(this)) {
+ if (!IS_RECEIVER(this)) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'RegExp.prototype.test', this);
}
@@ -552,7 +552,7 @@ function RegExpMatch(string) {
// ES#sec-regexp.prototype-@@match
// RegExp.prototype [ @@match ] ( string )
function RegExpSubclassMatch(string) {
- if (!IS_OBJECT(this)) {
+ if (!IS_RECEIVER(this)) {
throw MakeTypeError(kIncompatibleMethodReceiver,
"RegExp.prototype.@@match", this);
}
@@ -863,7 +863,7 @@ function SetAdvancedStringIndex(regexp, string, unicode) {
// ES#sec-regexp.prototype-@@replace
// RegExp.prototype [ @@replace ] ( string, replaceValue )
function RegExpSubclassReplace(string, replace) {
- if (!IS_OBJECT(this)) {
+ if (!IS_RECEIVER(this)) {
throw MakeTypeError(kIncompatibleMethodReceiver,
"RegExp.prototype.@@replace", this);
}
@@ -944,7 +944,7 @@ function RegExpSearch(string) {
// ES#sec-regexp.prototype-@@search
// RegExp.prototype [ @@search ] ( string )
function RegExpSubclassSearch(string) {
- if (!IS_OBJECT(this)) {
+ if (!IS_RECEIVER(this)) {
throw MakeTypeError(kIncompatibleMethodReceiver,
"RegExp.prototype.@@search", this);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698