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

Side by Side Diff: src/array-iterator.js

Issue 647703003: Don't expose Array.prototype.values as it breaks webcompat (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/array.js ('k') | test/mjsunit/es6/arguments-iterator.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 7
8 // This file relies on the fact that the following declaration has been made 8 // This file relies on the fact that the following declaration has been made
9 // in runtime.js: 9 // in runtime.js:
10 // var $Array = global.Array; 10 // var $Array = global.Array;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 %AddNamedProperty(ArrayIterator.prototype, symbolIterator, 113 %AddNamedProperty(ArrayIterator.prototype, symbolIterator,
114 ArrayIteratorIterator, DONT_ENUM); 114 ArrayIteratorIterator, DONT_ENUM);
115 } 115 }
116 SetUpArrayIterator(); 116 SetUpArrayIterator();
117 117
118 118
119 function ExtendArrayPrototype() { 119 function ExtendArrayPrototype() {
120 %CheckIsBootstrapping(); 120 %CheckIsBootstrapping();
121 121
122 InstallFunctions($Array.prototype, DONT_ENUM, $Array( 122 InstallFunctions($Array.prototype, DONT_ENUM, $Array(
123 // No 'values' since it breaks webcompat: http://crbug.com/409858
123 'entries', ArrayEntries, 124 'entries', ArrayEntries,
124 'values', ArrayValues,
125 'keys', ArrayKeys 125 'keys', ArrayKeys
126 )); 126 ));
127 127
128 %AddNamedProperty($Array.prototype, symbolIterator, ArrayValues, DONT_ENUM); 128 %AddNamedProperty($Array.prototype, symbolIterator, ArrayValues, DONT_ENUM);
129 } 129 }
130 ExtendArrayPrototype(); 130 ExtendArrayPrototype();
131 131
132 132
133 function ExtendTypedArrayPrototypes() { 133 function ExtendTypedArrayPrototypes() {
134 %CheckIsBootstrapping(); 134 %CheckIsBootstrapping();
(...skipping 13 matching lines...) Expand all
148 macro EXTEND_TYPED_ARRAY(NAME) 148 macro EXTEND_TYPED_ARRAY(NAME)
149 %AddNamedProperty($NAME.prototype, 'entries', ArrayEntries, DONT_ENUM); 149 %AddNamedProperty($NAME.prototype, 'entries', ArrayEntries, DONT_ENUM);
150 %AddNamedProperty($NAME.prototype, 'values', ArrayValues, DONT_ENUM); 150 %AddNamedProperty($NAME.prototype, 'values', ArrayValues, DONT_ENUM);
151 %AddNamedProperty($NAME.prototype, 'keys', ArrayKeys, DONT_ENUM); 151 %AddNamedProperty($NAME.prototype, 'keys', ArrayKeys, DONT_ENUM);
152 %AddNamedProperty($NAME.prototype, symbolIterator, ArrayValues, DONT_ENUM); 152 %AddNamedProperty($NAME.prototype, symbolIterator, ArrayValues, DONT_ENUM);
153 endmacro 153 endmacro
154 154
155 TYPED_ARRAYS(EXTEND_TYPED_ARRAY) 155 TYPED_ARRAYS(EXTEND_TYPED_ARRAY)
156 } 156 }
157 ExtendTypedArrayPrototypes(); 157 ExtendTypedArrayPrototypes();
OLDNEW
« no previous file with comments | « src/array.js ('k') | test/mjsunit/es6/arguments-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698