Index: runtime/lib/mirrors.cc |
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc |
index 4a68c8667877c15dfb49755e136314e04e47ec3f..3a034980a2c8949d0324ff328f77a34f24928de9 100644 |
--- a/runtime/lib/mirrors.cc |
+++ b/runtime/lib/mirrors.cc |
@@ -446,7 +446,13 @@ static RawInstance* CreateLibraryDependencyMirror(Thread* thread, |
const Array& args = Array::Handle(Array::New(7)); |
args.SetAt(0, importer); |
- args.SetAt(1, importee.Loaded() ? importee_mirror : prefix); |
+ if (importee.Loaded() || prefix.IsNull()) { |
+ // A native extension is not "loaded", but doesn't have a deferred prefix. |
siva
2017/03/17 21:07:05
The comment here seems opposite to the condition i
rmacnak
2017/03/17 22:03:31
The first half of the condition gets eagerly loade
|
+ // It will appear like an empty library. |
+ args.SetAt(1, importee_mirror); |
+ } else { |
+ args.SetAt(1, prefix); |
+ } |
args.SetAt(2, combinators); |
args.SetAt(3, prefix.IsNull() ? Object::null_object() |
: String::Handle(prefix.name())); |