Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 9c737fe80be150c7a124c21b4e39d3af5e520f1b..e4221928e0ca6d6631f9c98957e5bd2bbf49ac0e 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -388,6 +388,12 @@ template <class T> class Persistent : public Handle<T> { |
inline void ClearWeak(); |
/** |
+ * Marks the reference to this object independent. Garbage collector |
+ * is free to ignore any object groups containing this object. |
Vitaly Repeshko
2011/05/16 21:40:37
I still think this comment should be updated.
Vyacheslav Egorov (Chromium)
2011/05/17 11:55:31
Done.
|
+ */ |
+ inline void MarkIndependent(); |
+ |
+ /** |
*Checks if the handle holds the only reference to an object. |
*/ |
inline bool IsNearDeath() const; |
@@ -3106,6 +3112,7 @@ class V8EXPORT V8 { |
void* data, |
WeakReferenceCallback); |
static void ClearWeak(internal::Object** global_handle); |
+ static void MarkIndependent(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, |
@@ -3809,6 +3816,11 @@ void Persistent<T>::ClearWeak() { |
} |
template <class T> |
+void Persistent<T>::MarkIndependent() { |
+ V8::MarkIndependent(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); |
} |