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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2786083002: Read platform.dill in the VM. (Closed)
Patch Set: Allow main to be a field or getter. Created 3 years, 9 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
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 979f1b88f146478df4c0a95c901c6df12bcb12e6..cfa0c6ea1212561e76066986142e6f0da9c438d7 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5407,6 +5407,10 @@ DART_EXPORT Dart_Handle Dart_LoadKernel(void* kernel_program) {
if (tmp.IsError()) {
return Api::NewHandle(T, tmp.raw());
}
+ if (tmp.IsNull()) {
+ return Api::NewError("%s: The binary program does not contain 'main'.",
+ CURRENT_FUNC);
+ }
library ^= tmp.raw();
I->object_store()->set_root_library(library);
return Api::NewHandle(T, library.raw());

Powered by Google App Engine
This is Rietveld 408576698