| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index a43446639749441a888509ee2f81ac97f5efded0..bece681a48b630fb7aea2f3e20823867761de399 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -142,6 +142,28 @@ class Isolate;
|
| class Object;
|
| }
|
|
|
| +// Generic-purpose unique identifier.
|
| +class UniqueId {
|
| + public:
|
| + explicit UniqueId(intptr_t data)
|
| + : data_(data) {}
|
| +
|
| + bool operator==(const UniqueId& other) const {
|
| + return data_ == other.data_;
|
| + }
|
| +
|
| + bool operator!=(const UniqueId& other) const {
|
| + return data_ != other.data_;
|
| + }
|
| +
|
| + bool operator<(const UniqueId& other) const {
|
| + return data_ < other.data_;
|
| + }
|
| +
|
| + private:
|
| + intptr_t data_;
|
| +};
|
| +
|
|
|
| // --- Weak Handles ---
|
|
|
| @@ -3443,6 +3465,8 @@ class V8EXPORT V8 {
|
| * for partially dependent handles only.
|
| * See v8-profiler.h for RetainedObjectInfo interface description.
|
| */
|
| + // TODO(marja): deprecate AddObjectGroup. Use SetObjectGroupID and
|
| + // SetRetainedObjectInfo instead.
|
| static void AddObjectGroup(Persistent<Value>* objects,
|
| size_t length,
|
| RetainedObjectInfo* info = NULL);
|
| @@ -3451,6 +3475,14 @@ class V8EXPORT V8 {
|
| size_t length,
|
| RetainedObjectInfo* info = NULL);
|
|
|
| + static void SetObjectGroupId(Isolate* isolate,
|
| + const Persistent<Value>& object,
|
| + UniqueId id);
|
| +
|
| + static void SetRetainedObjectInfo(Isolate* isolate,
|
| + UniqueId id,
|
| + RetainedObjectInfo* info);
|
| +
|
| /**
|
| * Allows the host application to declare implicit references between
|
| * the objects: if |parent| is alive, all |children| are alive too.
|
|
|