| 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 "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
| 10 | 10 |
| (...skipping 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3541 } | 3541 } |
| 3542 | 3542 |
| 3543 void Append(PersistentHandle* persistent_handle) { | 3543 void Append(PersistentHandle* persistent_handle) { |
| 3544 JSONObject obj(handles_); | 3544 JSONObject obj(handles_); |
| 3545 obj.AddProperty("type", "_PersistentHandle"); | 3545 obj.AddProperty("type", "_PersistentHandle"); |
| 3546 const Object& object = Object::Handle(persistent_handle->raw()); | 3546 const Object& object = Object::Handle(persistent_handle->raw()); |
| 3547 obj.AddProperty("object", object); | 3547 obj.AddProperty("object", object); |
| 3548 } | 3548 } |
| 3549 | 3549 |
| 3550 void Append(FinalizablePersistentHandle* weak_persistent_handle) { | 3550 void Append(FinalizablePersistentHandle* weak_persistent_handle) { |
| 3551 if (!weak_persistent_handle->raw()->IsHeapObject()) { |
| 3552 return; // Free handle. |
| 3553 } |
| 3554 |
| 3551 JSONObject obj(handles_); | 3555 JSONObject obj(handles_); |
| 3552 obj.AddProperty("type", "_WeakPersistentHandle"); | 3556 obj.AddProperty("type", "_WeakPersistentHandle"); |
| 3553 const Object& object = | 3557 const Object& object = |
| 3554 Object::Handle(weak_persistent_handle->raw()); | 3558 Object::Handle(weak_persistent_handle->raw()); |
| 3555 obj.AddProperty("object", object); | 3559 obj.AddProperty("object", object); |
| 3556 obj.AddPropertyF( | 3560 obj.AddPropertyF( |
| 3557 "peer", | 3561 "peer", |
| 3558 "0x%" Px "", | 3562 "0x%" Px "", |
| 3559 reinterpret_cast<uintptr_t>(weak_persistent_handle->peer())); | 3563 reinterpret_cast<uintptr_t>(weak_persistent_handle->peer())); |
| 3560 obj.AddPropertyF( | 3564 obj.AddPropertyF( |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4175 if (strcmp(method_name, method.name) == 0) { | 4179 if (strcmp(method_name, method.name) == 0) { |
| 4176 return &method; | 4180 return &method; |
| 4177 } | 4181 } |
| 4178 } | 4182 } |
| 4179 return NULL; | 4183 return NULL; |
| 4180 } | 4184 } |
| 4181 | 4185 |
| 4182 #endif // !PRODUCT | 4186 #endif // !PRODUCT |
| 4183 | 4187 |
| 4184 } // namespace dart | 4188 } // namespace dart |
| OLD | NEW |