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

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

Issue 231053003: 1. Provide a framework to traverse persistent prolog weak handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/isolate.h ('k') | runtime/vm/object.h » ('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) 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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 854
855 855
856 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, 856 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor,
857 bool visit_prologue_weak_handles) { 857 bool visit_prologue_weak_handles) {
858 if (api_state() != NULL) { 858 if (api_state() != NULL) {
859 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); 859 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles);
860 } 860 }
861 } 861 }
862 862
863 863
864 void Isolate::VisitPrologueWeakPersistentHandles(HandleVisitor* visitor) {
865 if (api_state() != NULL) {
866 api_state()->VisitPrologueWeakHandles(visitor);
867 }
868 }
869
870
864 void Isolate::PrintToJSONStream(JSONStream* stream, bool ref) { 871 void Isolate::PrintToJSONStream(JSONStream* stream, bool ref) {
865 JSONObject jsobj(stream); 872 JSONObject jsobj(stream);
866 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); 873 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate"));
867 jsobj.AddPropertyF("id", "isolates/%" Pd "", 874 jsobj.AddPropertyF("id", "isolates/%" Pd "",
868 static_cast<intptr_t>(main_port())); 875 static_cast<intptr_t>(main_port()));
869 jsobj.AddPropertyF("mainPort", "%" Pd "", 876 jsobj.AddPropertyF("mainPort", "%" Pd "",
870 static_cast<intptr_t>(main_port())); 877 static_cast<intptr_t>(main_port()));
871 878
872 // Assign an isolate name based on the entry function. 879 // Assign an isolate name based on the entry function.
873 IsolateSpawnState* state = spawn_state(); 880 IsolateSpawnState* state = spawn_state();
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 return func.raw(); 1131 return func.raw();
1125 } 1132 }
1126 1133
1127 1134
1128 void IsolateSpawnState::Cleanup() { 1135 void IsolateSpawnState::Cleanup() {
1129 SwitchIsolateScope switch_scope(isolate()); 1136 SwitchIsolateScope switch_scope(isolate());
1130 Dart::ShutdownIsolate(); 1137 Dart::ShutdownIsolate();
1131 } 1138 }
1132 1139
1133 } // namespace dart 1140 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698