Reviewers: dcarney, svenpanne,

Message:
dcarney, svenpanne, ptal.

This needs to wait for https://codereview.chromium.org/16226011/ before landing
but that shouldn't take too long.

Description:
Remove V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS.

Blink has migrated to use the new style visitors.

BUG=

Please review this at https://codereview.chromium.org/16360005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M include/v8.h
  M src/api.cc
  M test/cctest/test-api.cc


Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index a41445d82f313c3ab05d5b52e5deef8741a17d8c..28a63f092efb5a7831ccd5a891a9cffddbf4f655 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -223,7 +223,6 @@ class WeakReferenceCallbacks {


 #define V8_USE_UNSAFE_HANDLES
-#define V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS

 /**
  * An object reference managed by the v8 garbage collector.
@@ -4125,13 +4124,8 @@ class V8EXPORT ExternalResourceVisitor {  // NOLINT
 class V8EXPORT PersistentHandleVisitor {  // NOLINT
  public:
   virtual ~PersistentHandleVisitor() {}
-#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS
-  virtual void VisitPersistentHandle(Persistent<Value> value,
-                                     uint16_t class_id) {}
-#else
   virtual void VisitPersistentHandle(Persistent<Value>* value,
                                      uint16_t class_id) {}
-#endif
 };


Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 9556b69b92b7a05120cb4de9cd1d94ad1fdb85e0..5b6b6446a798aad5f5b3f6f45328db9adc36cb75 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5087,14 +5087,9 @@ class VisitorAdapter : public i::ObjectVisitor {
     UNREACHABLE();
   }
   virtual void VisitEmbedderReference(i::Object** p, uint16_t class_id) {
-#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS
-    visitor_->VisitPersistentHandle(ToApi<Value>(i::Handle<i::Object>(p)),
-                                    class_id);
-#else
     Value* value = ToApi<Value>(i::Handle<i::Object>(p));
     visitor_->VisitPersistentHandle(
         reinterpret_cast<Persistent<Value>*>(&value), class_id);
-#endif
   }
  private:
   PersistentHandleVisitor* visitor_;
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index b88eedf39bf34d60c0aa1b41fb1bdd2e34c21c9c..cb3a38eee8e95f66dc294dce3dc5197050bc630e 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -17537,13 +17537,6 @@ 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) return;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to