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

Unified Diff: src/js/regexp.js

Issue 1688163003: [regexp] Fix RegExp.prototype.toString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | test/mjsunit/es6/regexp-tostring.js » ('j') | 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 f4c6f8a6cee8c09c00e2551be127ae42677e0567..9f2a1688c8a25f47fbba8e3fca8eec87b292e112 100644
--- a/src/js/regexp.js
+++ b/src/js/regexp.js
@@ -282,7 +282,7 @@ function RegExpToString() {
throw MakeTypeError(
kIncompatibleMethodReceiver, 'RegExp.prototype.toString', this);
}
- return '/' + TO_STRING(this.pattern()) + '/' + TO_STRING(this.flags());
+ return '/' + TO_STRING(this.source) + '/' + TO_STRING(this.flags);
}
var result = '/' + REGEXP_SOURCE(this) + '/';
if (REGEXP_GLOBAL(this)) result += 'g';
« no previous file with comments | « no previous file | test/mjsunit/es6/regexp-tostring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698