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

Unified Diff: runtime/lib/mirrors.cc

Issue 22043005: Deal with "classes" that don't belong to any library. Addresses issue 12231. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: resyncing with https Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 176aecb5854b7159b4443a9ddf963201a2c6407e..874915f014d0e29471272f1eac0dc59dd4f5c090 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698