| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 } | 361 } |
| 362 | 362 |
| 363 virtual void VisitIsolate(Isolate* isolate) { | 363 virtual void VisitIsolate(Isolate* isolate) { |
| 364 ASSERT(Isolate::Current() == service_isolate_); | 364 ASSERT(Isolate::Current() == service_isolate_); |
| 365 if ((isolate == service_isolate_) || | 365 if ((isolate == service_isolate_) || |
| 366 (isolate == Dart::vm_isolate())) { | 366 (isolate == Dart::vm_isolate())) { |
| 367 // We do not register the service or vm isolate. | 367 // We do not register the service or vm isolate. |
| 368 return; | 368 return; |
| 369 } | 369 } |
| 370 // Setup arguments for call. | 370 // Setup arguments for call. |
| 371 intptr_t port_id = isolate->main_port(); | 371 Dart_Port port_id = isolate->main_port(); |
| 372 const Integer& port_int = Integer::Handle(Integer::New(port_id)); | 372 const Integer& port_int = Integer::Handle(Integer::New(port_id)); |
| 373 ASSERT(!port_int.IsNull()); | 373 ASSERT(!port_int.IsNull()); |
| 374 const SendPort& send_port = SendPort::Handle(SendPort::New(port_id)); | 374 const SendPort& send_port = SendPort::Handle(SendPort::New(port_id)); |
| 375 const String& name = String::Handle(String::New(isolate->name())); | 375 const String& name = String::Handle(String::New(isolate->name())); |
| 376 ASSERT(!name.IsNull()); | 376 ASSERT(!name.IsNull()); |
| 377 const Array& args = Array::Handle(Array::New(3)); | 377 const Array& args = Array::Handle(Array::New(3)); |
| 378 ASSERT(!args.IsNull()); | 378 ASSERT(!args.IsNull()); |
| 379 args.SetAt(0, port_int); | 379 args.SetAt(0, port_int); |
| 380 args.SetAt(1, send_port); | 380 args.SetAt(1, send_port); |
| 381 args.SetAt(2, name); | 381 args.SetAt(2, name); |
| (...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2384 while (current != NULL) { | 2384 while (current != NULL) { |
| 2385 if (strcmp(name, current->name()) == 0) { | 2385 if (strcmp(name, current->name()) == 0) { |
| 2386 return current; | 2386 return current; |
| 2387 } | 2387 } |
| 2388 current = current->next(); | 2388 current = current->next(); |
| 2389 } | 2389 } |
| 2390 return NULL; | 2390 return NULL; |
| 2391 } | 2391 } |
| 2392 | 2392 |
| 2393 } // namespace dart | 2393 } // namespace dart |
| OLD | NEW |