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

Unified Diff: src/runtime/runtime-object.cc

Issue 2407153003: [runtime] Avoid code duplication in %CreateIterResultObject. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698