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/service.h" | 5 #include "vm/service.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
9 | 9 |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 } | 1161 } |
1162 | 1162 |
1163 // Not found. | 1163 // Not found. |
1164 return Object::sentinel().raw(); | 1164 return Object::sentinel().raw(); |
1165 } | 1165 } |
1166 | 1166 |
1167 | 1167 |
1168 static RawObject* LookupHeapObject(Isolate* isolate, | 1168 static RawObject* LookupHeapObject(Isolate* isolate, |
1169 const char* id_original, | 1169 const char* id_original, |
1170 ObjectIdRing::LookupResult* result) { | 1170 ObjectIdRing::LookupResult* result) { |
1171 char* id = isolate->current_zone()->MakeCopyOfString(id_original); | 1171 char* id = Thread::Current()->zone()->MakeCopyOfString(id_original); |
1172 | 1172 |
1173 // Parse the id by splitting at each '/'. | 1173 // Parse the id by splitting at each '/'. |
1174 const int MAX_PARTS = 8; | 1174 const int MAX_PARTS = 8; |
1175 char* parts[MAX_PARTS]; | 1175 char* parts[MAX_PARTS]; |
1176 int num_parts = 0; | 1176 int num_parts = 0; |
1177 int i = 0; | 1177 int i = 0; |
1178 int start_pos = 0; | 1178 int start_pos = 0; |
1179 while (id[i] != '\0') { | 1179 while (id[i] != '\0') { |
1180 if (id[i] == '/') { | 1180 if (id[i] == '/') { |
1181 id[i++] = '\0'; | 1181 id[i++] = '\0'; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 Message* message = aq.queue()->FindMessageById(message_id); | 1289 Message* message = aq.queue()->FindMessageById(message_id); |
1290 if (message == NULL) { | 1290 if (message == NULL) { |
1291 // The user may try to load an expired message, so we treat | 1291 // The user may try to load an expired message, so we treat |
1292 // unrecognized ids as if they are expired. | 1292 // unrecognized ids as if they are expired. |
1293 PrintSentinel(js, kExpiredSentinel); | 1293 PrintSentinel(js, kExpiredSentinel); |
1294 return true; | 1294 return true; |
1295 } | 1295 } |
1296 MessageSnapshotReader reader(message->data(), | 1296 MessageSnapshotReader reader(message->data(), |
1297 message->len(), | 1297 message->len(), |
1298 isolate, | 1298 isolate, |
1299 isolate->current_zone()); | 1299 Thread::Current()->zone()); |
1300 const Object& msg_obj = Object::Handle(reader.ReadObject()); | 1300 const Object& msg_obj = Object::Handle(reader.ReadObject()); |
1301 msg_obj.PrintJSON(js); | 1301 msg_obj.PrintJSON(js); |
1302 return true; | 1302 return true; |
1303 } | 1303 } |
1304 } | 1304 } |
1305 return false; | 1305 return false; |
1306 } | 1306 } |
1307 | 1307 |
1308 | 1308 |
1309 static bool PrintInboundReferences(Isolate* isolate, | 1309 static bool PrintInboundReferences(Isolate* isolate, |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2847 ServiceMethodDescriptor& method = service_methods_[i]; | 2847 ServiceMethodDescriptor& method = service_methods_[i]; |
2848 if (strcmp(method_name, method.name) == 0) { | 2848 if (strcmp(method_name, method.name) == 0) { |
2849 return &method; | 2849 return &method; |
2850 } | 2850 } |
2851 } | 2851 } |
2852 return NULL; | 2852 return NULL; |
2853 } | 2853 } |
2854 | 2854 |
2855 | 2855 |
2856 } // namespace dart | 2856 } // namespace dart |
OLD | NEW |