Index: Source/bindings/v8/V8GCController.cpp |
diff --git a/Source/bindings/v8/V8GCController.cpp b/Source/bindings/v8/V8GCController.cpp |
index 10a56b4b30672335f9173a06ced969060d16c8bd..eb6abe5fa2bf6294f540ffb941095cf9f0caf41e 100644 |
--- a/Source/bindings/v8/V8GCController.cpp |
+++ b/Source/bindings/v8/V8GCController.cpp |
@@ -109,8 +109,17 @@ public: |
UNUSED_PARAM(m_isolate); |
} |
+#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS |
virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE |
{ |
+ VisitPersistentHandle(&value, classId); |
+ } |
+ |
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) |
+#else |
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) OVERRIDE |
+#endif |
+ { |
// A minor DOM GC can collect only Nodes. |
if (classId != v8DOMNodeClassId) |
return; |
@@ -126,13 +135,13 @@ public: |
if (m_nodesInNewSpace.size() >= wrappersHandledByEachMinorGC) |
return; |
- ASSERT(value->IsObject()); |
+ ASSERT((*value)->IsObject()); |
#ifdef V8_USE_UNSAFE_HANDLES |
- v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value); |
+ v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(*value); |
#else |
- v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(value); |
+ v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(*value); |
#endif |
- ASSERT(V8DOMWrapper::maybeDOMWrapper(value)); |
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(*value)); |
ASSERT(V8Node::HasInstanceInAnyWorld(wrapper, m_isolate)); |
Node* node = V8Node::toNative(wrapper); |
// A minor DOM GC can handle only node wrappers in the main world. |
@@ -238,21 +247,30 @@ public: |
{ |
} |
+#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS |
virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE |
{ |
- ASSERT(value->IsObject()); |
+ VisitPersistentHandle(&value, classId); |
+ } |
+ |
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) |
+#else |
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) OVERRIDE |
+#endif |
+ { |
+ ASSERT((*value)->IsObject()); |
#ifdef V8_USE_UNSAFE_HANDLES |
- v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value); |
+ v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(*value); |
#else |
- v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(value); |
+ v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(*value); |
#endif |
if (classId != v8DOMNodeClassId && classId != v8DOMObjectClassId) |
return; |
- ASSERT(V8DOMWrapper::maybeDOMWrapper(value)); |
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(*value)); |
- if (value.IsIndependent(m_isolate)) |
+ if (value->IsIndependent(m_isolate)) |
return; |
WrapperTypeInfo* type = toWrapperTypeInfo(wrapper); |