OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 template <class F> | 631 template <class F> |
632 friend class Global; | 632 friend class Global; |
633 template<class F> friend class PersistentBase; | 633 template<class F> friend class PersistentBase; |
634 template<class F> friend class ReturnValue; | 634 template<class F> friend class ReturnValue; |
635 template <class F1, class F2, class F3> | 635 template <class F1, class F2, class F3> |
636 friend class PersistentValueMapBase; | 636 friend class PersistentValueMapBase; |
637 template<class F1, class F2> friend class PersistentValueVector; | 637 template<class F1, class F2> friend class PersistentValueVector; |
638 friend class Object; | 638 friend class Object; |
639 | 639 |
640 explicit V8_INLINE PersistentBase(T* val) : val_(val) {} | 640 explicit V8_INLINE PersistentBase(T* val) : val_(val) {} |
641 PersistentBase(PersistentBase& other) = delete; // NOLINT | 641 PersistentBase(const PersistentBase& other) = delete; // NOLINT |
642 void operator=(PersistentBase&) = delete; | 642 void operator=(const PersistentBase&) = delete; |
643 V8_INLINE static T* New(Isolate* isolate, T* that); | 643 V8_INLINE static T* New(Isolate* isolate, T* that); |
644 | 644 |
645 T* val_; | 645 T* val_; |
646 }; | 646 }; |
647 | 647 |
648 | 648 |
649 /** | 649 /** |
650 * Default traits for Persistent. This class does not allow | 650 * Default traits for Persistent. This class does not allow |
651 * use of the copy constructor or assignment operator. | 651 * use of the copy constructor or assignment operator. |
652 * At present kResetInDestructor is not set, but that will change in a future | 652 * At present kResetInDestructor is not set, but that will change in a future |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 Global Pass() { return static_cast<Global&&>(*this); } | 838 Global Pass() { return static_cast<Global&&>(*this); } |
839 | 839 |
840 /* | 840 /* |
841 * For compatibility with Chromium's base::Bind (base::Passed). | 841 * For compatibility with Chromium's base::Bind (base::Passed). |
842 */ | 842 */ |
843 typedef void MoveOnlyTypeForCPP03; | 843 typedef void MoveOnlyTypeForCPP03; |
844 | 844 |
845 private: | 845 private: |
846 template <class F> | 846 template <class F> |
847 friend class ReturnValue; | 847 friend class ReturnValue; |
848 Global(Global&) = delete; | 848 Global(const Global&) = delete; |
849 void operator=(Global&) = delete; | 849 void operator=(const Global&) = delete; |
850 V8_INLINE T* operator*() const { return this->val_; } | 850 V8_INLINE T* operator*() const { return this->val_; } |
851 }; | 851 }; |
852 | 852 |
853 | 853 |
854 // UniquePersistent is an alias for Global for historical reason. | 854 // UniquePersistent is an alias for Global for historical reason. |
855 template <class T> | 855 template <class T> |
856 using UniquePersistent = Global<T>; | 856 using UniquePersistent = Global<T>; |
857 | 857 |
858 | 858 |
859 /** | 859 /** |
(...skipping 7452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8312 */ | 8312 */ |
8313 | 8313 |
8314 | 8314 |
8315 } // namespace v8 | 8315 } // namespace v8 |
8316 | 8316 |
8317 | 8317 |
8318 #undef TYPE_CHECK | 8318 #undef TYPE_CHECK |
8319 | 8319 |
8320 | 8320 |
8321 #endif // V8_H_ | 8321 #endif // V8_H_ |
OLD | NEW |