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

Side by Side Diff: bin/main.cc

Issue 10450016: Add a callback to inform embedders when an isolate is being shut down. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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 | « bin/gen_snapshot.cc ('k') | bin/run_vm_tests.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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 &executable_name, 673 &executable_name,
674 &script_name, 674 &script_name,
675 &dart_options) < 0) { 675 &dart_options) < 0) {
676 PrintUsage(); 676 PrintUsage();
677 return kErrorExitCode; 677 return kErrorExitCode;
678 } 678 }
679 679
680 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); 680 Dart_SetVMFlags(vm_options.count(), vm_options.arguments());
681 681
682 // Initialize the Dart VM. 682 // Initialize the Dart VM.
683 Dart_Initialize(CreateIsolateAndSetup, NULL); 683 Dart_Initialize(CreateIsolateAndSetup, NULL, NULL);
684 684
685 original_working_directory = Directory::Current(); 685 original_working_directory = Directory::Current();
686 686
687 // Call CreateIsolateAndSetup which creates an isolate and loads up 687 // Call CreateIsolateAndSetup which creates an isolate and loads up
688 // the specified application script. 688 // the specified application script.
689 char* error = NULL; 689 char* error = NULL;
690 char* isolate_name = BuildIsolateName(script_name, "main"); 690 char* isolate_name = BuildIsolateName(script_name, "main");
691 if (!CreateIsolateAndSetupHelper(script_name, 691 if (!CreateIsolateAndSetupHelper(script_name,
692 "main", 692 "main",
693 true, // Canonicalize the script name. 693 true, // Canonicalize the script name.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 DumpPprofSymbolInfo(); 758 DumpPprofSymbolInfo();
759 // Shutdown the isolate. 759 // Shutdown the isolate.
760 Dart_ShutdownIsolate(); 760 Dart_ShutdownIsolate();
761 // Terminate process exit-code handler. 761 // Terminate process exit-code handler.
762 Process::TerminateExitCodeHandler(); 762 Process::TerminateExitCodeHandler();
763 763
764 free(const_cast<char*>(original_working_directory)); 764 free(const_cast<char*>(original_working_directory));
765 765
766 return 0; 766 return 0;
767 } 767 }
OLDNEW
« no previous file with comments | « bin/gen_snapshot.cc ('k') | bin/run_vm_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698