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

Unified Diff: src/string.js

Issue 6485025: Fix sputnik regression introduced in r6747. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
===================================================================
--- src/string.js (revision 6747)
+++ src/string.js (working copy)
@@ -103,6 +103,7 @@
// ECMA-262 section 15.5.4.7
function StringIndexOf(pattern /* position */) { // length == 1
var subject = TO_STRING_INLINE(this);
+ pattern = TO_STRING_INLINE(pattern);
var index = 0;
if (%_ArgumentsLength() > 1) {
index = %_Arguments(1); // position
@@ -110,7 +111,7 @@
if (index < 0) index = 0;
if (index > subject.length) index = subject.length;
}
- return %StringIndexOf(subject, TO_STRING_INLINE(pattern), index);
+ return %StringIndexOf(subject, pattern, index);
}
@@ -401,8 +402,7 @@
lastMatchInfoOverride = override;
var func_result =
%_CallFunction(receiver, elem, match_start, subject, replace);
- func_result = TO_STRING_INLINE(func_result);
- res[i] = func_result;
+ res[i] = TO_STRING_INLINE(func_result);
match_start += elem.length;
}
i++;
@@ -415,8 +415,7 @@
// Use the apply argument as backing for global RegExp properties.
lastMatchInfoOverride = elem;
var func_result = replace.apply(null, elem);
- func_result = TO_STRING_INLINE(func_result);
- res[i] = func_result;
+ res[i] = TO_STRING_INLINE(func_result);
}
i++;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698