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

Unified Diff: src/regexp-delay.js

Issue 40107: Fix bug 254 - incorrect value of lastIndex for global regexp test. (Closed)
Patch Set: Created 11 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/regress/regress-254.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp-delay.js
diff --git a/src/regexp-delay.js b/src/regexp-delay.js
index 0308e0200a59cca3caf741db932f1cc7ffff9fb4..098e557f4cd4cb0a19cea1b582efd3d35f08b2ce 100644
--- a/src/regexp-delay.js
+++ b/src/regexp-delay.js
@@ -225,6 +225,8 @@ function RegExpTest(string) {
if (this.global) this.lastIndex = 0;
return false;
}
+
+ if (this.global) this.lastIndex = lastMatchInfo[CAPTURE1];
return true;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-254.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698