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

Unified Diff: include/v8.h

Issue 7031005: Extend Handle API with MarkIndependent. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: do not process PENDING dependent handles after SCAVENGE Created 9 years, 7 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') | test/cctest/test-api.cc » ('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 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);
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698