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

Unified Diff: include/v8.h

Issue 7043003: Version 3.3.8 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: 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 | « ChangeLog ('k') | src/api.cc » ('j') | no next file with comments »
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 c01856d660ae13e39d16adfb14ad7eadf8b9e245..411c2f1169dd0051159e338e4634860a536afd72 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -388,6 +388,15 @@ 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.
+ * Weak callback for an independent handle should not
+ * assume that it will be preceded by a global GC prologue callback
+ * or followed by a global GC epilogue callback.
+ */
+ inline void MarkIndependent();
+
+ /**
*Checks if the handle holds the only reference to an object.
*/
inline bool IsNearDeath() const;
@@ -3106,6 +3115,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 +3819,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 | « ChangeLog ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698