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

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

Issue 1680513002: [runtime] We don't need an actual instance type for JSIteratorResult. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« src/objects.h ('K') | « src/objects-printer.cc ('k') | src/types.cc » ('j') | 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 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;
}
« src/objects.h ('K') | « src/objects-printer.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698