Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 095bc948a2f1a6fab5767e152313530bbb477af1..46ad21818e78f4940dd8594f34b91c54f1da6b87 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -1270,7 +1270,11 @@ RUNTIME_FUNCTION(Runtime_CreateIterResultObject) { |
DCHECK_EQ(2, args.length()); |
CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
CONVERT_ARG_HANDLE_CHECKED(Object, done, 1); |
- return *isolate->factory()->NewJSIteratorResult(value, done); |
+ Handle<JSObject> result = |
+ isolate->factory()->NewJSObjectFromMap(isolate->iterator_result_map()); |
+ result->InObjectPropertyAtPut(JSIteratorResult::kValueIndex, *value); |
+ result->InObjectPropertyAtPut(JSIteratorResult::kDoneIndex, *done); |
+ return *result; |
} |