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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2786083002: Read platform.dill in the VM. (Closed)
Patch Set: Incorporate review comments and merge. Created 3 years, 8 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 | « runtime/vm/bootstrap_nocore.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index b92d5572779f28e8e5e4ab677316621b60e91c8a..300fe57e1a3d6a998f8627adbce2bbb0dcef93dc 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5416,6 +5416,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());
« no previous file with comments | « runtime/vm/bootstrap_nocore.cc ('k') | runtime/vm/kernel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698