OLD | NEW |
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 | 112 |
113 bool IsolateMessageHandler::HandleMessage(Message* message) { | 113 bool IsolateMessageHandler::HandleMessage(Message* message) { |
114 StartIsolateScope start_scope(isolate_); | 114 StartIsolateScope start_scope(isolate_); |
115 StackZone zone(isolate_); | 115 StackZone zone(isolate_); |
116 HandleScope handle_scope(isolate_); | 116 HandleScope handle_scope(isolate_); |
117 // TODO(turnidge): Rework collection total dart execution. This can | 117 // TODO(turnidge): Rework collection total dart execution. This can |
118 // overcount when other things (gc, compilation) are active. | 118 // overcount when other things (gc, compilation) are active. |
119 TIMERSCOPE(time_dart_execution); | 119 TIMERSCOPE(isolate_, time_dart_execution); |
120 | 120 |
121 // If the message is in band we lookup the receive port to dispatch to. If | 121 // If the message is in band we lookup the receive port to dispatch to. If |
122 // the receive port is closed, we drop the message without deserializing it. | 122 // the receive port is closed, we drop the message without deserializing it. |
123 Object& receive_port = Object::Handle(); | 123 Object& receive_port = Object::Handle(); |
124 if (!message->IsOOB()) { | 124 if (!message->IsOOB()) { |
125 receive_port = DartLibraryCalls::LookupReceivePort(message->dest_port()); | 125 receive_port = DartLibraryCalls::LookupReceivePort(message->dest_port()); |
126 if (receive_port.IsError()) { | 126 if (receive_port.IsError()) { |
127 return ProcessUnhandledException(Object::null_instance(), | 127 return ProcessUnhandledException(Object::null_instance(), |
128 Error::Cast(receive_port)); | 128 Error::Cast(receive_port)); |
129 } | 129 } |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 return func.raw(); | 1085 return func.raw(); |
1086 } | 1086 } |
1087 | 1087 |
1088 | 1088 |
1089 void IsolateSpawnState::Cleanup() { | 1089 void IsolateSpawnState::Cleanup() { |
1090 SwitchIsolateScope switch_scope(isolate()); | 1090 SwitchIsolateScope switch_scope(isolate()); |
1091 Dart::ShutdownIsolate(); | 1091 Dart::ShutdownIsolate(); |
1092 } | 1092 } |
1093 | 1093 |
1094 } // namespace dart | 1094 } // namespace dart |
OLD | NEW |