| Index: runtime/lib/mirrors.cc
|
| diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
|
| index 4a68c8667877c15dfb49755e136314e04e47ec3f..1dade418b20d37dcac6e91577b4a9dfe5a4c9293 100644
|
| --- a/runtime/lib/mirrors.cc
|
| +++ b/runtime/lib/mirrors.cc
|
| @@ -446,7 +446,14 @@ 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 never "loaded" by the embedder. Use the fact that
|
| + // it doesn't have an prefix where asa deferred import does to distinguish
|
| + // it from a deferred import. 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()));
|
|
|