Chromium Code Reviews| Index: runtime/bin/gen_snapshot.cc |
| =================================================================== |
| --- runtime/bin/gen_snapshot.cc (revision 12828) |
| +++ runtime/bin/gen_snapshot.cc (working copy) |
| @@ -299,7 +299,10 @@ |
| // Initialize the Dart VM. |
| // Note: We don't expect isolates to be created from dart code during |
| // snapshot generation. |
| - Dart_Initialize(NULL, NULL, NULL); |
| + if (!Dart_Initialize(NULL, NULL, NULL)) { |
| + fprintf(stderr, "VM initialization failed\n"); |
| + return 255; |
|
srdjan
2012/09/25 17:12:25
Why not exit(255) as below?
Florian Schneider
2012/09/26 09:03:16
Because I copied it from above where return 255 is
|
| + } |
| char* error; |
| Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error); |