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

Unified Diff: src/regexp.js

Issue 10068010: Regexp: Fix rightContext in the lastMatchInfoOverride (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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/regexp-capture-3.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp.js
===================================================================
--- src/regexp.js (revision 11284)
+++ src/regexp.js (working copy)
@@ -343,14 +343,15 @@
function RegExpGetRightContext() {
var start_index;
- var subject;
+ var subject, pattern;
Michael Starzinger 2012/04/12 12:10:28 The "pattern" variable could be moved into the els
if (!lastMatchInfoOverride) {
start_index = lastMatchInfo[CAPTURE1];
subject = LAST_SUBJECT(lastMatchInfo);
} else {
var override = lastMatchInfoOverride;
subject = override[override.length - 1];
- start_index = override[override.length - 2] + subject.length;
+ pattern = override[override.length - 3];
Lasse Reichstein Nielsen 2012/04/13 06:59:52 I don't think this is correct in all cases. The o
+ start_index = override[override.length - 2] + pattern.length;
}
return SubString(subject, start_index, subject.length);
}
« no previous file with comments | « no previous file | test/mjsunit/regexp-capture-3.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698