Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index e52dde37c994fea3d04b3444bb5cc8a6cf8d0836..0e10194020bd7ccc7019618dafd3b80ee4bc320b 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -17785,12 +17785,19 @@ class Visitor42 : public v8::PersistentHandleVisitor { |
explicit Visitor42(v8::Persistent<v8::Object> object) |
: counter_(0), object_(object) { } |
+#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS |
virtual void VisitPersistentHandle(Persistent<Value> value, |
uint16_t class_id) { |
+ VisitPersistentHandle(&value, class_id); |
+ } |
+#endif |
+ |
+ virtual void VisitPersistentHandle(Persistent<Value>* value, |
+ uint16_t class_id) { |
if (class_id == 42) { |
- CHECK(value->IsObject()); |
+ CHECK((*value)->IsObject()); |
v8::Persistent<v8::Object> visited = |
- v8::Persistent<v8::Object>::Cast(value); |
+ v8::Persistent<v8::Object>::Cast(*value); |
CHECK_EQ(42, visited.WrapperClassId(v8::Isolate::GetCurrent())); |
CHECK_EQ(Handle<Value>(*object_), Handle<Value>(*visited)); |
++counter_; |