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

Unified Diff: src/string.js

Issue 48061: Remapped regexp last-match-info to put subject and index before match indices. (Closed)
Patch Set: Created 11 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
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index de35902d4d28d9cb11f33cf99fce19f24eac07a6..18ef3d88bde20e9e770015102230d6a449afa824 100644
--- a/src/string.js
+++ b/src/string.js
@@ -236,7 +236,7 @@ function StringReplace(search, replace) {
// needle is a string rather than a regexp. In this case we can't update
// lastMatchArray without erroneously affecting the properties on the global
// RegExp object.
-var reusableMatchInfo = [2, -1, -1, "", ""];
+var reusableMatchInfo = [2, "", "", -1, -1];
// Helper function for regular expressions in String.prototype.replace.
« src/regexp-delay.js ('K') | « src/regexp-delay.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698