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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1095903002: Deal with deferred loading in the VM mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/bootstrap_natives.h ('k') | sdk/lib/mirrors/mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3316c215145c885cc06705ce2700cd8e79a8712b..1f2dfc3844263e120bd910b1158d735df3fa3601 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5454,6 +5454,14 @@ DART_EXPORT Dart_Handle Dart_FinalizeLoading(bool complete_futures) {
// newly loaded code and trigger one of these breakpoints.
isolate->debugger()->NotifyDoneLoading();
+ // Notify mirrors that MirrorSystem.libraries needs to be recomputed.
+ const Library& libmirrors =
+ Library::Handle(isolate, Library::MirrorsLibrary());
+ const Field& dirty_bit = Field::Handle(isolate,
+ libmirrors.LookupLocalField(String::Handle(String::New("dirty"))));
+ ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static());
+ dirty_bit.set_value(Bool::True());
+
if (complete_futures) {
const Library& corelib = Library::Handle(isolate, Library::CoreLibrary());
const String& function_name =
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | sdk/lib/mirrors/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698