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

Unified Diff: runtime/vm/object_store.cc

Issue 634603002: Await always waits (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
===================================================================
--- runtime/vm/object_store.cc (revision 41104)
+++ runtime/vm/object_store.cc (working copy)
@@ -35,6 +35,8 @@
int32x4_type_(Type::null()),
float64x2_type_(Type::null()),
string_type_(Type::null()),
+ future_class_(Class::null()),
+ completer_class_(Class::null()),
one_byte_string_class_(Class::null()),
two_byte_string_class_(Class::null()),
external_one_byte_string_class_(Class::null()),
@@ -166,4 +168,20 @@
return true;
}
+
+void ObjectStore::InitAsyncObjects() {
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL && isolate->object_store() == this);
+
+ const Library& async_lib = Library::Handle(async_library());
+ ASSERT(!async_lib.IsNull());
+ Class& cls = Class::Handle(isolate);
+ cls = async_lib.LookupClass(Symbols::Future());
+ ASSERT(!cls.IsNull());
+ set_future_class(cls);
+ cls = async_lib.LookupClass(Symbols::Completer());
+ ASSERT(!cls.IsNull());
+ set_completer_class(cls);
+}
+
} // namespace dart
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698