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

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 1520)
+++ vm/class_finalizer.cc (working copy)
@@ -912,6 +912,16 @@
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& name = String::Handle(cls.Name());
+ ReportError("class '%s' is invalid, it is extending an invalid class.\n",
Anton Muhin 2011/11/15 12:22:23 very nice check, but message looks slightly mislea
siva 2011/11/15 19:42:49 Done.
+ name.ToCString());
+ }
+ }
}
« bin/builtin_in.cc ('K') | « bin/main.cc ('k') | vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698