| 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 2236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 event.AddProperty("type", "ServiceEvent"); | 2247 event.AddProperty("type", "ServiceEvent"); |
| 2248 event.AddProperty("eventType", "_Graph"); | 2248 event.AddProperty("eventType", "_Graph"); |
| 2249 event.AddProperty("isolate", isolate); | 2249 event.AddProperty("isolate", isolate); |
| 2250 } | 2250 } |
| 2251 } | 2251 } |
| 2252 const String& message = String::Handle(String::New(js.ToCString())); | 2252 const String& message = String::Handle(String::New(js.ToCString())); |
| 2253 SendEvent(message, buffer, stream.bytes_written()); | 2253 SendEvent(message, buffer, stream.bytes_written()); |
| 2254 } | 2254 } |
| 2255 | 2255 |
| 2256 | 2256 |
| 2257 void Service::SendInspectEvent(Isolate* isolate, const Object& inspectee) { |
| 2258 ServiceEvent event(isolate, ServiceEvent::kInspect); |
| 2259 event.set_inspectee(&inspectee); |
| 2260 Service::HandleEvent(&event); |
| 2261 } |
| 2262 |
| 2263 |
| 2257 class ContainsAddressVisitor : public FindObjectVisitor { | 2264 class ContainsAddressVisitor : public FindObjectVisitor { |
| 2258 public: | 2265 public: |
| 2259 ContainsAddressVisitor(Isolate* isolate, uword addr) | 2266 ContainsAddressVisitor(Isolate* isolate, uword addr) |
| 2260 : FindObjectVisitor(isolate), addr_(addr) { } | 2267 : FindObjectVisitor(isolate), addr_(addr) { } |
| 2261 virtual ~ContainsAddressVisitor() { } | 2268 virtual ~ContainsAddressVisitor() { } |
| 2262 | 2269 |
| 2263 virtual uword filter_addr() const { return addr_; } | 2270 virtual uword filter_addr() const { return addr_; } |
| 2264 | 2271 |
| 2265 virtual bool FindObject(RawObject* obj) const { | 2272 virtual bool FindObject(RawObject* obj) const { |
| 2266 // Free list elements are not real objects, so skip them. | 2273 // Free list elements are not real objects, so skip them. |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2624 ServiceMethodDescriptor& method = service_methods_[i]; | 2631 ServiceMethodDescriptor& method = service_methods_[i]; |
| 2625 if (strcmp(method_name, method.name) == 0) { | 2632 if (strcmp(method_name, method.name) == 0) { |
| 2626 return &method; | 2633 return &method; |
| 2627 } | 2634 } |
| 2628 } | 2635 } |
| 2629 return NULL; | 2636 return NULL; |
| 2630 } | 2637 } |
| 2631 | 2638 |
| 2632 | 2639 |
| 2633 } // namespace dart | 2640 } // namespace dart |
| OLD | NEW |