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

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: Created 5 years, 4 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/bin/gen_snapshot.cc
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index 2f19fb23f8f0eccfbdbfb5505c73206177fb827b..82bf5ddec1f5e52dd22bf4191bb693e781e9b5b1 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -544,18 +544,18 @@ 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,
- 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,
+ DartUtils::OpenFile,
+ DartUtils::ReadFile,
+ DartUtils::WriteFile,
+ DartUtils::CloseFile,
+ DartUtils::EntropySource);
+ if (error != NULL) {
+ Log::PrintErr("VM initialization failed: %s\n", error);
+ free(error);
Ivan Posva 2015/08/17 13:35:51 This can lead to problems if the embedder and the
zra 2015/08/18 06:23:14 Filed: https://github.com/dart-lang/sdk/issues/241
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/eventhandler_win.cc ('k') | runtime/bin/main.cc » ('j') | runtime/bin/main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698