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

Unified Diff: src/js/string.js

Issue 1409013006: Revert of Implement flag and source getters on RegExp.prototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rproto
Patch Set: Created 5 years, 1 month 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/js/regexp.js ('k') | src/js/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/string.js
diff --git a/src/js/string.js b/src/js/string.js
index 33ac96577e701e94899057909abbb27cec0aeae3..0fdd7ae342f88225165304c25920a4ba574445f2 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -19,7 +19,6 @@
var MakeTypeError;
var RegExpExec;
var RegExpExecNoTests;
-var regExpFlagsSymbol = utils.ImportNow("regexp_flags_symbol");
var RegExpLastMatchInfo;
utils.Import(function(from) {
@@ -156,7 +155,7 @@
var subject = TO_STRING(this);
if (IS_REGEXP(regexp)) {
- if (!REGEXP_GLOBAL(regexp)) return RegExpExecNoTests(regexp, subject, 0);
+ if (!regexp.global) return RegExpExecNoTests(regexp, subject, 0);
var result = %StringMatch(subject, regexp, RegExpLastMatchInfo);
regexp.lastIndex = 0;
return result;
@@ -226,7 +225,7 @@
if (!IS_CALLABLE(replace)) {
replace = TO_STRING(replace);
- if (!REGEXP_GLOBAL(search)) {
+ if (!search.global) {
// Non-global regexp search, string replace.
var match = RegExpExec(search, subject, 0);
if (match == null) {
@@ -248,7 +247,7 @@
subject, search, replace, RegExpLastMatchInfo);
}
- if (REGEXP_GLOBAL(search)) {
+ if (search.global) {
// Global regexp search, function replace.
return StringReplaceGlobalRegExpWithFunction(subject, search, replace);
}
« no previous file with comments | « src/js/regexp.js ('k') | src/js/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698