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

Unified Diff: src/array.js

Issue 8888006: Make more JS files beter match the coding standard. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 9 years 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/d8.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index 3d8e278b9ea07670ef7cce7b2103ede1b56d5c62..d6687622576d7eb3ffa2d595f5c810b48aaf8c80 100644
--- a/src/array.js
+++ b/src/array.js
@@ -751,8 +751,11 @@ function ArraySort(comparefn) {
}
x = ToString(x);
y = ToString(y);
- if (x == y) return 0;
- else return x < y ? -1 : 1;
+ if (x == y) {
+ return 0;
+ } else {
+ return x < y ? -1 : 1;
+ }
};
}
var receiver = %GetDefaultReceiver(comparefn);
@@ -1236,8 +1239,11 @@ function ArrayLastIndexOf(element, index) {
// If index is negative, index from end of the array.
if (index < 0) index += length;
// If index is still negative, do not search the array.
- if (index < 0) return -1;
- else if (index >= length) index = length - 1;
+ if (index < 0) {
+ return -1;
+ } else if (index >= length) {
+ index = length - 1;
+ }
}
var min = 0;
var max = index;
« no previous file with comments | « no previous file | src/d8.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698