Reviewers: jochen, aaronlink,
Message:
PTAL
Description:
Declare deleted copy constructor and assignment operator of v8::Global to
take
const parameters.
This is required in order for Globals to be stored in STL containers.
Patch from Aaron Link <[email protected]>
BUG=
Please review this at https://codereview.chromium.org/1244033002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+4, -4 lines):
M include/v8.h
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
29fac0be778bf97450329c75ad6827b142b726f9..5f4859d339f3e07ba29f3e8fae9fd5eedf3c80d2
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -638,8 +638,8 @@ template <class T> class PersistentBase {
friend class Object;
explicit V8_INLINE PersistentBase(T* val) : val_(val) {}
- PersistentBase(PersistentBase& other) = delete; // NOLINT
- void operator=(PersistentBase&) = delete;
+ PersistentBase(const PersistentBase& other) = delete; // NOLINT
+ void operator=(const PersistentBase&) = delete;
V8_INLINE static T* New(Isolate* isolate, T* that);
T* val_;
@@ -845,8 +845,8 @@ class Global : public PersistentBase<T> {
private:
template <class F>
friend class ReturnValue;
- Global(Global&) = delete;
- void operator=(Global&) = delete;
+ Global(const Global&) = delete;
+ void operator=(const Global&) = delete;
V8_INLINE T* operator*() const { return this->val_; }
};
--
--
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.