Reviewers: dcarney,

Message:
Minor cleanup. I won't be able to check-in until the usages in Chromium have
been removed, though. (That CL has been sent, too.)

Description:
Remove V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR.

The usage of this define has been obsoleted by removal of UnsafePersistent
from Chromium.

Depends on https://codereview.chromium.org/230613005

[email protected]
BUG=276323

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

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

Affected files (+8, -24 lines):
  M include/v8.h


Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index b1ec504031cdf0fdf2401734caedd6327044d6c1..b040261c3a9983cc53c5617ad935e2ea760661e1 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -316,15 +316,6 @@ template <class T> class Handle {
     return New(isolate, that.val_);
   }

-#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
-
- private:
-#endif
-  /**
-   * Creates a new handle for the specified value.
-   */
-  V8_INLINE explicit Handle(T* val) : val_(val) {}
-
  private:
   friend class Utils;
   template<class F, class M> friend class Persistent;
@@ -343,6 +334,11 @@ template <class T> class Handle {
   friend class Object;
   friend class Private;

+  /**
+   * Creates a new handle for the specified value.
+   */
+  V8_INLINE explicit Handle(T* val) : val_(val) {}
+
   V8_INLINE static Handle<T> New(Isolate* isolate, T* that);

   T* val_;
@@ -396,12 +392,6 @@ template <class T> class Local : public Handle<T> {
   V8_INLINE static Local<T> New(Isolate* isolate,
                                 const PersistentBase<T>& that);

-#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
-
- private:
-#endif
-  template <class S> V8_INLINE Local(S* that) : Handle<T>(that) { }
-
  private:
   friend class Utils;
   template<class F> friend class Eternal;
@@ -420,6 +410,7 @@ template <class T> class Local : public Handle<T> {
   template<class F1, class F2, class F3> friend class PersistentValueMap;
   template<class F1, class F2> friend class PersistentValueVector;

+  template <class S> V8_INLINE Local(S* that) : Handle<T>(that) { }
   V8_INLINE static Local<T> New(Isolate* isolate, T* that);
 };

@@ -729,15 +720,6 @@ template <class T, class M> class Persistent : public PersistentBase<T> {
   // This will be removed.
   V8_INLINE T* ClearAndLeak();

-  // TODO(dcarney): remove
-#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR
-
- private:
-#endif
- template <class S> V8_INLINE Persistent(S* that) : PersistentBase<T>(that) { }
-
-  V8_INLINE T* operator*() const { return this->val_; }
-
  private:
   friend class Isolate;
   friend class Utils;
@@ -746,6 +728,8 @@ template <class T, class M> class Persistent : public PersistentBase<T> {
   template<class F1, class F2> friend class Persistent;
   template<class F> friend class ReturnValue;

+ template <class S> V8_INLINE Persistent(S* that) : PersistentBase<T>(that) { }
+  V8_INLINE T* operator*() const { return this->val_; }
   template<class S, class M2>
   V8_INLINE void Copy(const Persistent<S, M2>& that);
 };


--
--
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/d/optout.

Reply via email to