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