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

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

Issue 9242035: Give isolates names to be used during debugging. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | runtime/include/dart_api.h » ('J')
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 222 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
223 223
224 // Initialize the Dart VM. 224 // Initialize the Dart VM.
225 // Note: We don't expect isolates to be created from dart code during 225 // Note: We don't expect isolates to be created from dart code during
226 // snapshot generation. 226 // snapshot generation.
227 Dart_Initialize(NULL, NULL); 227 Dart_Initialize(NULL, NULL);
228 228
229 char* error; 229 char* error;
230 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, &error); 230 Dart_Isolate isolate = Dart_CreateIsolate(NULL, NULL, NULL, &error);
231 if (isolate == NULL) { 231 if (isolate == NULL) {
232 fprintf(stderr, "%s", error); 232 fprintf(stderr, "%s", error);
233 free(error); 233 free(error);
234 exit(255); 234 exit(255);
235 } 235 }
236 236
237 Dart_Handle result; 237 Dart_Handle result;
238 Dart_Handle library; 238 Dart_Handle library;
239 Dart_EnterScope(); 239 Dart_EnterScope();
240 240
(...skipping 26 matching lines...) Expand all
267 exit(255); 267 exit(255);
268 } 268 }
269 // Now write the snapshot out to specified file and exit. 269 // Now write the snapshot out to specified file and exit.
270 WriteSnapshotFile(buffer, size); 270 WriteSnapshotFile(buffer, size);
271 Dart_ExitScope(); 271 Dart_ExitScope();
272 272
273 // Shutdown the isolate. 273 // Shutdown the isolate.
274 Dart_ShutdownIsolate(); 274 Dart_ShutdownIsolate();
275 return 0; 275 return 0;
276 } 276 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698