Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 83a5744278afe03f7a7869379f17217e74a80ea4..41bf9e22a66c77cf8667adcb47488958fc514499 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -396,6 +396,12 @@ template <class T> class Persistent : public Handle<T> { |
*/ |
inline bool IsWeak() const; |
+ /** |
+ * Assigns a wrapper class ID to the handle. See RetainedObjectInfo |
+ * interface description in v8-profiler.h for details. |
+ */ |
+ inline void SetWrapperClassId(uint16_t class_id); |
+ |
private: |
friend class ImplementationUtilities; |
friend class ObjectTemplate; |
@@ -2533,6 +2539,8 @@ class V8EXPORT HeapStatistics { |
}; |
+class RetainedObjectInfo; |
+ |
/** |
* Container class for static utility functions. |
*/ |
@@ -2702,8 +2710,11 @@ class V8EXPORT V8 { |
* intended to be used in the before-garbage-collection callback |
* function, for instance to simulate DOM tree connections among JS |
* wrapper objects. |
+ * See v8-profiler.h for RetainedObjectInfo interface description. |
*/ |
- static void AddObjectGroup(Persistent<Value>* objects, size_t length); |
+ static void AddObjectGroup(Persistent<Value>* objects, |
+ size_t length, |
+ RetainedObjectInfo* info = NULL); |
/** |
* Initializes from snapshot if possible. Otherwise, attempts to |
@@ -2912,6 +2923,8 @@ class V8EXPORT V8 { |
static void ClearWeak(internal::Object** global_handle); |
static bool IsGlobalNearDeath(internal::Object** global_handle); |
static bool IsGlobalWeak(internal::Object** global_handle); |
+ static void SetWrapperClassId(internal::Object** global_handle, |
+ uint16_t class_id); |
template <class T> friend class Handle; |
template <class T> friend class Local; |
@@ -3560,6 +3573,10 @@ void Persistent<T>::ClearWeak() { |
V8::ClearWeak(reinterpret_cast<internal::Object**>(**this)); |
} |
+template <class T> |
+void Persistent<T>::SetWrapperClassId(uint16_t class_id) { |
+ V8::SetWrapperClassId(reinterpret_cast<internal::Object**>(**this), class_id); |
+} |
Arguments::Arguments(internal::Object** implicit_args, |
internal::Object** values, int length, |