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

Unified Diff: include/v8.h

Issue 11369131: Implement MarkIndependent(Isolate*) and MarkPartiallyDependent(Isolate*) (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 8 years, 1 month 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') | 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 fe7198e3cbf59b35e8c251407ed3eba57ebcf0b9..28bea2e3e4435b39a4b50a140513560b80b3fd85 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -413,6 +413,7 @@ template <class T> class Persistent : public Handle<T> {
* or followed by a global GC epilogue callback.
*/
inline void MarkIndependent();
+ inline void MarkIndependent(Isolate* isolate);
/**
* Marks the reference to this object partially dependent. Partially
@@ -423,6 +424,7 @@ template <class T> class Persistent : public Handle<T> {
* after each garbage collection.
*/
inline void MarkPartiallyDependent();
+ inline void MarkPartiallyDependent(Isolate* isolate);
/** Returns true if this handle was previously marked as independent. */
inline bool IsIndependent() const;
@@ -3533,7 +3535,11 @@ class V8EXPORT V8 {
WeakReferenceCallback);
static void ClearWeak(internal::Object** global_handle);
static void MarkIndependent(internal::Object** global_handle);
+ static void MarkIndependent(internal::Isolate* isolate,
+ internal::Object** global_handle);
static void MarkPartiallyDependent(internal::Object** global_handle);
+ static void MarkPartiallyDependent(internal::Isolate* isolate,
+ internal::Object** global_handle);
static bool IsGlobalIndependent(internal::Object** global_handle);
static bool IsGlobalIndependent(internal::Isolate* isolate,
internal::Object** global_handle);
@@ -4336,11 +4342,23 @@ void Persistent<T>::MarkIndependent() {
}
template <class T>
+void Persistent<T>::MarkIndependent(Isolate* isolate) {
+ V8::MarkIndependent(reinterpret_cast<internal::Isolate*>(isolate),
+ reinterpret_cast<internal::Object**>(**this));
+}
+
+template <class T>
void Persistent<T>::MarkPartiallyDependent() {
V8::MarkPartiallyDependent(reinterpret_cast<internal::Object**>(**this));
}
template <class T>
+void Persistent<T>::MarkPartiallyDependent(Isolate* isolate) {
+ V8::MarkPartiallyDependent(reinterpret_cast<internal::Isolate*>(isolate),
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698