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

Unified Diff: src/collection.js

Issue 1065863003: Use array literals instead of array constructor in native javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase and fix Created 5 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 | « src/arraybuffer.js ('k') | src/collection-iterator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/collection.js
diff --git a/src/collection.js b/src/collection.js
index 7bb2393a7da32fb4a10251792b276589185e0100..7effba9f96e33838e4d6760ed3eab95d335e8168 100644
--- a/src/collection.js
+++ b/src/collection.js
@@ -245,13 +245,13 @@ function SetForEach(f, receiver) {
// Set up the non-enumerable functions on the Set prototype object.
InstallGetter($Set.prototype, "size", SetGetSize);
-InstallFunctions($Set.prototype, DONT_ENUM, $Array(
+InstallFunctions($Set.prototype, DONT_ENUM, [
"add", SetAdd,
"has", SetHas,
"delete", SetDelete,
"clear", SetClearJS,
"forEach", SetForEach
-));
+]);
// -------------------------------------------------------------------
@@ -433,13 +433,13 @@ function MapForEach(f, receiver) {
// Set up the non-enumerable functions on the Map prototype object.
InstallGetter($Map.prototype, "size", MapGetSize);
-InstallFunctions($Map.prototype, DONT_ENUM, $Array(
+InstallFunctions($Map.prototype, DONT_ENUM, [
"get", MapGet,
"set", MapSet,
"has", MapHas,
"delete", MapDelete,
"clear", MapClearJS,
"forEach", MapForEach
-));
+]);
})();
« no previous file with comments | « src/arraybuffer.js ('k') | src/collection-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698