Chromium Code Reviews| Index: runtime/vm/service.h |
| diff --git a/runtime/vm/service.h b/runtime/vm/service.h |
| index a635dc30d08c7e37cdc9bb0bba341da412552605..041cdc35940972fb254c9d2e4a189ff55bea96e5 100644 |
| --- a/runtime/vm/service.h |
| +++ b/runtime/vm/service.h |
| @@ -8,6 +8,7 @@ |
| #include "include/dart_api.h" |
| #include "vm/allocation.h" |
| +#include "vm/object_id_ring.h" |
| #include "vm/os_thread.h" |
| namespace dart { |
| @@ -15,6 +16,7 @@ namespace dart { |
| class Array; |
| class EmbedderServiceHandler; |
| class GCEvent; |
| +class GrowableObjectArray; |
| class Instance; |
| class Isolate; |
| class JSONStream; |
| @@ -23,6 +25,40 @@ class RawInstance; |
| class ServiceEvent; |
| class String; |
| +class ServiceIdZone { |
| + public: |
| + ServiceIdZone(); |
| + virtual ~ServiceIdZone(); |
| + |
| + // Returned string will be zone allocated. |
| + virtual char* GetServiceId(const Object& obj) = 0; |
| + |
| + private: |
| +}; |
| + |
| + |
| +class RingServiceIdZone : public ServiceIdZone { |
| + public: |
| + // Use the isolate's object id ring. |
| + explicit RingServiceIdZone(ObjectIdRing::IdPolicy policy); |
|
turnidge
2015/05/12 20:08:01
Why not pass the object id ring into the construct
Cutch
2015/05/12 23:32:59
Done.
|
| + virtual ~RingServiceIdZone(); |
| + |
| + // Returned string will be zone allocated. |
| + virtual char* GetServiceId(const Object& obj); |
| + |
| + void set_policy(ObjectIdRing::IdPolicy policy) { |
| + policy_ = policy; |
| + } |
| + |
| + ObjectIdRing::IdPolicy policy() const { |
| + return policy_; |
| + } |
| + |
| + private: |
| + ObjectIdRing::IdPolicy policy_; |
| +}; |
| + |
| + |
| class Service : public AllStatic { |
| public: |
| // Handles a message which is not directed to an isolate. |