Chromium Code Reviews| Index: runtime/vm/object_store.cc |
| =================================================================== |
| --- runtime/vm/object_store.cc (revision 41084) |
| +++ 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,21 @@ |
| return true; |
| } |
| + |
| +bool ObjectStore::InitAsyncObjects() { |
|
Florian Schneider
2014/10/14 11:47:30
If the return value is never used, maybe just make
hausner
2014/10/14 19:56:39
Done.
|
| + 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); |
| + return true; |
| +} |
| + |
| } // namespace dart |