mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 20:51:50 +00:00
Deal with "classes" that don't belong to any library. Addresses issue 12231.
Review URL: https://codereview.chromium.org/22043005/ git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25785 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
09bcdc6d6d
commit
ce55909b63
|
@ -362,7 +362,13 @@ DEFINE_NATIVE_ENTRY(ClassMirror_name, 1) {
|
|||
DEFINE_NATIVE_ENTRY(ClassMirror_library, 1) {
|
||||
GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
||||
const Class& klass = Class::Handle(ref.GetClassReferent());
|
||||
return CreateLibraryMirror(Library::Handle(klass.library()));
|
||||
const Library& library = Library::Handle(klass.library());
|
||||
// TODO(rmacnak): Revisit when we decide what to do about
|
||||
// reflectClass(dynamic).
|
||||
if (library.IsNull()) {
|
||||
return Instance::null();
|
||||
}
|
||||
return CreateLibraryMirror(library);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue