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

Side by Side Diff: runtime/bin/gen_snapshot.cc

Issue 11413101: Added support for isolate unhandled exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated code review feedback Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 return 255; 294 return 255;
295 } 295 }
296 296
297 DartUtils::SetOriginalWorkingDirectory(); 297 DartUtils::SetOriginalWorkingDirectory();
298 298
299 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 299 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
300 300
301 // Initialize the Dart VM. 301 // Initialize the Dart VM.
302 // Note: We don't expect isolates to be created from dart code during 302 // Note: We don't expect isolates to be created from dart code during
303 // snapshot generation. 303 // snapshot generation.
304 if (!Dart_Initialize(NULL, NULL, NULL)) { 304 if (!Dart_Initialize(NULL, NULL, NULL, NULL)) {
305 Log::PrintErr("VM initialization failed\n"); 305 Log::PrintErr("VM initialization failed\n");
306 return 255; 306 return 255;
307 } 307 }
308 308
309 char* error; 309 char* error;
310 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error); 310 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error);
311 if (isolate == NULL) { 311 if (isolate == NULL) {
312 Log::PrintErr("Error: %s", error); 312 Log::PrintErr("Error: %s", error);
313 free(error); 313 free(error);
314 exit(255); 314 exit(255);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 CreateAndWriteSnapshot(true); 388 CreateAndWriteSnapshot(true);
389 389
390 free(snapshot_buffer); 390 free(snapshot_buffer);
391 } 391 }
392 } else { 392 } else {
393 SetupForGenericSnapshotCreation(); 393 SetupForGenericSnapshotCreation();
394 CreateAndWriteSnapshot(false); 394 CreateAndWriteSnapshot(false);
395 } 395 }
396 return 0; 396 return 0;
397 } 397 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698