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

Unified Diff: vm/class_finalizer.cc

Issue 8537023: Implement automatic loading of dart:core_native_fields library (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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
Index: vm/class_finalizer.cc
===================================================================
--- vm/class_finalizer.cc (revision 1545)
+++ vm/class_finalizer.cc (working copy)
@@ -912,6 +912,18 @@
if (cls.is_const()) {
CheckForLegalConstClass(cls);
}
+ // Check to ensure we don't have classes with native fields in libraries
+ // which do not have a native resolver.
+ if (cls.num_native_fields() != 0) {
+ const Library& lib = Library::Handle(cls.library());
+ if (lib.native_entry_resolver() == NULL) {
+ const String& cls_name = String::Handle(cls.Name());
+ const String& lib_name = String::Handle(lib.url());
+ ReportError("class '%s' is trying to extend a native fields class,"
+ "but library '%s' has no native resolvers",
+ cls_name.ToCString(), lib_name.ToCString());
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698