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

Unified Diff: src/array-iterator.js

Issue 1325023003: [es6] Fix invalid ToObject in String/Array iterator next. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | src/string-iterator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array-iterator.js
diff --git a/src/array-iterator.js b/src/array-iterator.js
index e59bfd782ab0f24f5c76b3d1cd108fddfed1a6f6..762714e0e377233b65412b54dc02002735e0732a 100644
--- a/src/array-iterator.js
+++ b/src/array-iterator.js
@@ -76,9 +76,10 @@ function ArrayIteratorIterator() {
// 15.4.5.2.2 ArrayIterator.prototype.next( )
function ArrayIteratorNext() {
- var iterator = TO_OBJECT(this);
+ var iterator = this;
- if (!HAS_DEFINED_PRIVATE(iterator, arrayIteratorNextIndexSymbol)) {
+ if (!IS_SPEC_OBJECT(iterator) ||
+ !HAS_DEFINED_PRIVATE(iterator, arrayIteratorNextIndexSymbol)) {
Jarin 2015/09/02 06:41:01 Technically, you should check for presence of the
Benedikt Meurer 2015/09/02 06:42:05 Yeah, I'll remove all of this soonish and replace
throw MakeTypeError(kIncompatibleMethodReceiver,
'Array Iterator.prototype.next', this);
}
« no previous file with comments | « no previous file | src/string-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698