Chromium Code Reviews

Unified Diff: src/runtime.cc

Issue 342453002: Arguments object has @@iterator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix arguments object as prototype Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 3ebd6b5b7e9fbf31cbcb818eb2fdc5a2f3a94c1a..9e52953533aa77c05f29ebe4a6da3af7e40dfc2d 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -5992,6 +5992,10 @@ RUNTIME_FUNCTION(Runtime_GetArgumentsProperty) {
HandleScope scope(isolate);
if (raw_key->IsSymbol()) {
+ Handle<Symbol> symbol = Handle<Symbol>::cast(raw_key);
+ if (symbol->Equals(isolate->native_context()->iterator_symbol())) {
+ return isolate->native_context()->array_values_iterator();
+ }
// Lookup in the initial Object.prototype object.
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
« src/accessors.cc ('K') | « src/contexts.h ('k') | test/mjsunit/es6/arguments-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine