Index: runtime/vm/service.h |
diff --git a/runtime/vm/service.h b/runtime/vm/service.h |
index a635dc30d08c7e37cdc9bb0bba341da412552605..4ca3eb01c83f22fcfa962e7b646825159d0e30bf 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: |
+ explicit RingServiceIdZone(ObjectIdRing* ring, ObjectIdRing::IdPolicy policy); |
+ 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* ring_; |
+ ObjectIdRing::IdPolicy policy_; |
+}; |
+ |
+ |
class Service : public AllStatic { |
public: |
// Handles a message which is not directed to an isolate. |