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

Unified Diff: src/array.js

Issue 6334106: Improve ScanJsonNumber. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 | src/conversions.cc » ('j') | src/scanner.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
===================================================================
--- src/array.js (revision 6635)
+++ src/array.js (working copy)
@@ -1018,9 +1018,11 @@
} else {
index = TO_INTEGER(index);
// If index is negative, index from the end of the array.
- if (index < 0) index = length + index;
- // If index is still negative, search the entire array.
- if (index < 0) index = 0;
+ if (index < 0) {
+ index = length + index;
+ // If index is still negative, search the entire array.
+ if (index < 0) index = 0;
+ }
}
var min = index;
var max = length;
« no previous file with comments | « no previous file | src/conversions.cc » ('j') | src/scanner.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698