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

Unified Diff: src/string-iterator.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/string.js ('k') | src/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-iterator.js
diff --git a/src/string-iterator.js b/src/string-iterator.js
index df31c130b8c8a7ecb994c0efd958194814f1b4fb..8d72b81e8be159371546362a159eaf87c4c50f1e 100644
--- a/src/string-iterator.js
+++ b/src/string-iterator.js
@@ -8,7 +8,6 @@
%CheckIsBootstrapping();
-var GlobalArray = global.Array;
var GlobalObject = global.Object;
var GlobalString = global.String;
@@ -89,9 +88,9 @@ function StringPrototypeIterator() {
%FunctionSetPrototype(StringIterator, new GlobalObject());
%FunctionSetInstanceClassName(StringIterator, 'String Iterator');
-InstallFunctions(StringIterator.prototype, DONT_ENUM, GlobalArray(
+InstallFunctions(StringIterator.prototype, DONT_ENUM, [
'next', StringIteratorNext
-));
+]);
%FunctionSetName(StringIteratorIterator, '[Symbol.iterator]');
%AddNamedProperty(StringIterator.prototype, symbolIterator,
StringIteratorIterator, DONT_ENUM);
« no previous file with comments | « src/string.js ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698