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

Side by Side Diff: runtime/vm/isolate.cc

Issue 25674009: Add framework for Dart_Terminate which will cleanup stuff on exit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/vm/dart_api_impl.cc ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "lib/mirrors.h" 10 #include "lib/mirrors.h"
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 } 673 }
674 674
675 // Write out the coverage data if collection has been enabled. 675 // Write out the coverage data if collection has been enabled.
676 CodeCoverage::Write(this); 676 CodeCoverage::Write(this);
677 677
678 // Finalize any weak persistent handles with a non-null referent. 678 // Finalize any weak persistent handles with a non-null referent.
679 FinalizeWeakPersistentHandlesVisitor visitor; 679 FinalizeWeakPersistentHandlesVisitor visitor;
680 api_state()->weak_persistent_handles().VisitHandles(&visitor); 680 api_state()->weak_persistent_handles().VisitHandles(&visitor);
681 681
682 CompilerStats::Print(); 682 CompilerStats::Print();
683 // TODO(asiva): Move this code to Dart::Cleanup when we have that method
684 // as the cleanup for Dart::InitOnce.
685 CodeObservers::DeleteAll();
686 if (FLAG_trace_isolates) { 683 if (FLAG_trace_isolates) {
687 heap()->PrintSizes(); 684 heap()->PrintSizes();
688 megamorphic_cache_table()->PrintSizes(); 685 megamorphic_cache_table()->PrintSizes();
689 Symbols::DumpStats(); 686 Symbols::DumpStats();
690 OS::Print("[-] Stopping isolate:\n" 687 OS::Print("[-] Stopping isolate:\n"
691 "\tisolate: %s\n", name()); 688 "\tisolate: %s\n", name());
692 } 689 }
693 } 690 }
694 691
695 // TODO(5411455): For now just make sure there are no current isolates 692 // TODO(5411455): For now just make sure there are no current isolates
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 return func.raw(); 1051 return func.raw();
1055 } 1052 }
1056 1053
1057 1054
1058 void IsolateSpawnState::Cleanup() { 1055 void IsolateSpawnState::Cleanup() {
1059 SwitchIsolateScope switch_scope(isolate()); 1056 SwitchIsolateScope switch_scope(isolate());
1060 Dart::ShutdownIsolate(); 1057 Dart::ShutdownIsolate();
1061 } 1058 }
1062 1059
1063 } // namespace dart 1060 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698