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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 1275353005: VM thread shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merge Created 5 years, 3 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/bin/dbg_message.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 4c18137e0bb96360c95f1c07ad94557f1a580774..7c6c79800599966f51eeb04c28d4ef2f98ceb291 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -544,18 +544,19 @@ int main(int argc, char** argv) {
// Initialize the Dart VM.
// Note: We don't expect isolates to be created from dart code during
// snapshot generation.
- if (!Dart_Initialize(NULL, NULL,
- NULL, NULL, NULL, NULL,
- DartUtils::OpenFile,
- DartUtils::ReadFile,
- DartUtils::WriteFile,
- DartUtils::CloseFile,
- DartUtils::EntropySource)) {
- Log::PrintErr("VM initialization failed\n");
+ char* error = Dart_Initialize(NULL, NULL,
+ NULL, NULL, NULL, NULL,
+ DartUtils::OpenFile,
+ DartUtils::ReadFile,
+ DartUtils::WriteFile,
+ DartUtils::CloseFile,
+ DartUtils::EntropySource);
+ if (error != NULL) {
+ Log::PrintErr("VM initialization failed: %s\n", error);
+ free(error);
return 255;
}
- char* error;
Dart_Isolate isolate = Dart_CreateIsolate(
NULL, NULL, NULL, NULL, NULL, &error);
if (isolate == NULL) {
« no previous file with comments | « runtime/bin/dbg_message.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698