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

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

Issue 1463083004: Change IS_OBJECT back to typeof == "object" and use IS_SPEC_OBJECT in Array.from and RegExp (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | src/js/macros.py » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 (function(global, utils, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1754 1754
1755 if (!IS_UNDEFINED(iterable)) { 1755 if (!IS_UNDEFINED(iterable)) {
1756 result = %IsConstructor(this) ? new this() : []; 1756 result = %IsConstructor(this) ? new this() : [];
1757 1757
1758 var iterator = GetIterator(items, iterable); 1758 var iterator = GetIterator(items, iterable);
1759 1759
1760 k = 0; 1760 k = 0;
1761 while (true) { 1761 while (true) {
1762 var next = iterator.next(); 1762 var next = iterator.next();
1763 1763
1764 if (!IS_OBJECT(next)) { 1764 if (!IS_SPEC_OBJECT(next)) {
1765 throw MakeTypeError(kIteratorResultNotAnObject, next); 1765 throw MakeTypeError(kIteratorResultNotAnObject, next);
1766 } 1766 }
1767 1767
1768 if (next.done) { 1768 if (next.done) {
1769 result.length = k; 1769 result.length = k;
1770 return result; 1770 return result;
1771 } 1771 }
1772 1772
1773 nextValue = next.value; 1773 nextValue = next.value;
1774 if (mapping) { 1774 if (mapping) {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 %InstallToContext([ 1950 %InstallToContext([
1951 "array_pop", ArrayPop, 1951 "array_pop", ArrayPop,
1952 "array_push", ArrayPush, 1952 "array_push", ArrayPush,
1953 "array_shift", ArrayShift, 1953 "array_shift", ArrayShift,
1954 "array_splice", ArraySplice, 1954 "array_splice", ArraySplice,
1955 "array_slice", ArraySlice, 1955 "array_slice", ArraySlice,
1956 "array_unshift", ArrayUnshift, 1956 "array_unshift", ArrayUnshift,
1957 ]); 1957 ]);
1958 1958
1959 }); 1959 });
OLDNEW
« no previous file with comments | « no previous file | src/js/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698