Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 9c737fe80be150c7a124c21b4e39d3af5e520f1b..3325b3fa51bc99be13c3f2cf3b4f6b6213dbaba5 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -388,6 +388,12 @@ template <class T> class Persistent : public Handle<T> { |
inline void ClearWeak(); |
/** |
+ * Mark the reference to this object independent. Garbage collector |
antonm
2011/05/16 14:13:19
nit: Mark[s]
Vyacheslav Egorov (Chromium)
2011/05/16 14:55:34
I will fix it, but it seems that we have two style
|
+ * is free to ignore any object groups containing this object. |
Vitaly Repeshko
2011/05/16 13:42:11
I think we should also mention that the gc prologu
Vyacheslav Egorov (Chromium)
2011/05/16 14:15:46
Prologue/epilogue will be called with kGCTypeScave
Vitaly Repeshko
2011/05/16 14:31:22
The ones taking the type argument are only used fo
Vyacheslav Egorov (Chromium)
2011/05/16 14:55:34
Yep you are right about callback. Global one will
Vitaly Repeshko
2011/05/16 15:04:03
There are e.g. active DOM objects with weak handle
|
+ */ |
+ 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); |
} |