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

Unified Diff: include/v8.h

Issue 15994003: remove most remaining V8_ALLOW_ACCESS_TO* defines (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 7 months 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 | samples/lineprocessor.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 30ba24367f0a6b82f858bf98935065a009af441c..7481a81950b952e7190ce0234898a1f5f5539589 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -370,11 +370,11 @@ template <class T> class Handle {
#endif
private:
- template<class F>
- friend class Persistent;
- template<class F>
- friend class Local;
+ template<class F> friend class Persistent;
+ template<class F> friend class Local;
friend class Arguments;
+ template<class F> friend class FunctionCallbackInfo;
+ template<class F> friend class PropertyCallbackInfo;
friend class String;
friend class Object;
friend class AccessorInfo;
@@ -385,6 +385,7 @@ template <class T> class Handle {
friend class Context;
friend class InternalHandleHelper;
friend class LocalContext;
+ friend class HandleScope;
#ifndef V8_USE_UNSAFE_HANDLES
V8_INLINE(static Handle<T> New(Isolate* isolate, T* that));
@@ -458,17 +459,18 @@ template <class T> class Local : public Handle<T> {
#endif
private:
- template<class F>
- friend class Persistent;
- template<class F>
- friend class Handle;
+ template<class F> friend class Persistent;
+ template<class F> friend class Handle;
friend class Arguments;
+ template<class F> friend class FunctionCallbackInfo;
+ template<class F> friend class PropertyCallbackInfo;
friend class String;
friend class Object;
friend class AccessorInfo;
friend class Context;
friend class InternalHandleHelper;
friend class LocalContext;
+ friend class HandleScope;
V8_INLINE(static Local<T> New(Isolate* isolate, T* that));
};
@@ -751,6 +753,10 @@ template <class T> class Persistent // NOLINT
*/
V8_INLINE(void Reset(Isolate* isolate, const Handle<T>& other));
+#ifndef V8_USE_UNSAFE_HANDLES
+ V8_INLINE(void Reset(Isolate* isolate, const Persistent<T>& other));
+#endif
+
/**
* Returns the underlying raw pointer and clears the handle. The caller is
* responsible of eventually destroying the underlying object (by creating a
@@ -800,10 +806,8 @@ template <class T> class Persistent // NOLINT
#endif
private:
- template<class F>
- friend class Handle;
- template<class F>
- friend class Local;
+ template<class F> friend class Handle;
+ template<class F> friend class Local;
friend class ImplementationUtilities;
friend class ObjectTemplate;
friend class Context;
@@ -5629,6 +5633,21 @@ void Persistent<T>::Reset(Isolate* isolate, const Handle<T>& other) {
}
+#ifndef V8_USE_UNSAFE_HANDLES
+template <class T>
+void Persistent<T>::Reset(Isolate* isolate, const Persistent<T>& other) {
+ Dispose(isolate);
+ if (other.IsEmpty()) {
+ this->val_ = NULL;
+ return;
+ }
+ internal::Object** p = reinterpret_cast<internal::Object**>(other.val_);
+ this->val_ = reinterpret_cast<T*>(
+ V8::GlobalizeReference(reinterpret_cast<internal::Isolate*>(isolate), p));
+}
+#endif
+
+
template <class T>
T* Persistent<T>::ClearAndLeak() {
T* old;
« no previous file with comments | « no previous file | samples/lineprocessor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698