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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1073983010: Add asserts that isolates have a root library set up before they become runnable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/lib/mirrors.cc ('k') | runtime/vm/isolate.cc » ('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 89d602af857135d890e2efc000a61e066ff23182..3316c215145c885cc06705ce2700cd8e79a8712b 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1501,6 +1501,10 @@ DART_EXPORT bool Dart_IsolateMakeRunnable(Dart_Isolate isolate) {
}
// TODO(16615): Validate isolate parameter.
Isolate* iso = reinterpret_cast<Isolate*>(isolate);
+ if (iso->object_store()->root_library() == Library::null()) {
+ // The embedder should have called Dart_LoadScript by now.
+ return false;
+ }
return iso->MakeRunnable();
}
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698