Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index c4a54a46ed712f3d41dedce76f7d42dcc75a8502..441decab7fd717b51225f17cad2046307e605d0c 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -402,6 +402,16 @@ template <class T> class Persistent : public Handle<T> { |
*/ |
inline void MarkIndependent(); |
+ /** |
+ * Marks the reference to this object externally unreachable. |
Michael Starzinger
2012/11/05 10:47:27
The comment should not describe the underlying imp
haraken
2012/11/05 12:42:07
Done.
|
+ * Scavenger GC treats this object unreachable if all objects |
+ * in the object group which this object belongs to are neither |
+ * strongly reachable nor weakly reachable. This mark is cleared |
+ * after each scavenger GC. If this object is not in the new |
+ * space, this API has no effect. |
+ */ |
+ inline void MarkExternallyUnreachable(); |
Michael Starzinger
2012/11/05 10:47:27
As discussed offline: The name of this flag is not
haraken
2012/11/05 12:42:07
Done.
|
+ |
/** Returns true if this handle was previously marked as independent. */ |
inline bool IsIndependent() const; |
@@ -3493,6 +3503,7 @@ class V8EXPORT V8 { |
WeakReferenceCallback); |
static void ClearWeak(internal::Object** global_handle); |
static void MarkIndependent(internal::Object** global_handle); |
+ static void MarkExternallyUnreachable(internal::Object** global_handle); |
static bool IsGlobalIndependent(internal::Object** global_handle); |
static bool IsGlobalNearDeath(internal::Object** global_handle); |
static bool IsGlobalWeak(internal::Object** global_handle); |
@@ -4264,6 +4275,11 @@ void Persistent<T>::MarkIndependent() { |
} |
template <class T> |
+void Persistent<T>::MarkExternallyUnreachable() { |
+ V8::MarkExternallyUnreachable(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); |
} |