Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index c4a54a46ed712f3d41dedce76f7d42dcc75a8502..3cd079516bef8ed8b3c9d604cab9b973dd88ed00 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. |
+ 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. |
+ */ |
Michael Starzinger
2012/10/26 14:16:48
Nit of the day: can we add asterisks to the beginn
haraken
2012/10/30 08:51:17
Done.
|
+ inline void MarkExternallyUnreachable(); |
+ |
/** 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); |
} |