Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: include/v8.h

Issue 11085015: Allow collection of DOM objects in minor GC cycles. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Comments addressed Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/global-handles.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/global-handles.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698