Disable copy constructor in public: section or use macro.
According to our style guide on Copyable and Movable Types, copy/move operators should be disabled in the public: section, not in the private: section. If disabled with a macro such as DISALLOW_COPY_AND_ASSIGN, it should be at the end of the private: section, and should be the last thing in the class. BUG= Review-Url: https://codereview.chromium.org/2271043003 Cr-Commit-Position: refs/heads/master@{#38878}
This commit is contained in:
parent
a8d8620f9b
commit
b2fee84f87
@ -39,10 +39,9 @@ struct StreamedSource {
|
|||||||
std::unique_ptr<ParseInfo> info;
|
std::unique_ptr<ParseInfo> info;
|
||||||
std::unique_ptr<Parser> parser;
|
std::unique_ptr<Parser> parser;
|
||||||
|
|
||||||
private:
|
// Prevent copying.
|
||||||
// Prevent copying. Not implemented.
|
StreamedSource(const StreamedSource&) = delete;
|
||||||
StreamedSource(const StreamedSource&);
|
StreamedSource& operator=(const StreamedSource&) = delete;
|
||||||
StreamedSource& operator=(const StreamedSource&);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -525,6 +525,8 @@ class StackFrame BASE_EMBEDDED {
|
|||||||
|
|
||||||
Isolate* isolate() const { return isolate_; }
|
Isolate* isolate() const { return isolate_; }
|
||||||
|
|
||||||
|
void operator=(const StackFrame& original) = delete;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline explicit StackFrame(StackFrameIteratorBase* iterator);
|
inline explicit StackFrame(StackFrameIteratorBase* iterator);
|
||||||
virtual ~StackFrame() { }
|
virtual ~StackFrame() { }
|
||||||
@ -563,9 +565,6 @@ class StackFrame BASE_EMBEDDED {
|
|||||||
friend class StackFrameIteratorBase;
|
friend class StackFrameIteratorBase;
|
||||||
friend class StackHandlerIterator;
|
friend class StackHandlerIterator;
|
||||||
friend class SafeStackFrameIterator;
|
friend class SafeStackFrameIterator;
|
||||||
|
|
||||||
private:
|
|
||||||
void operator=(const StackFrame& original);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -293,8 +293,6 @@ class HandleScope {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Prevent heap allocation or illegal handle scopes.
|
// Prevent heap allocation or illegal handle scopes.
|
||||||
HandleScope(const HandleScope&);
|
|
||||||
void operator=(const HandleScope&);
|
|
||||||
void* operator new(size_t size);
|
void* operator new(size_t size);
|
||||||
void operator delete(void* size_t);
|
void operator delete(void* size_t);
|
||||||
|
|
||||||
@ -320,6 +318,8 @@ class HandleScope {
|
|||||||
friend class DeferredHandleScope;
|
friend class DeferredHandleScope;
|
||||||
friend class HandleScopeImplementer;
|
friend class HandleScopeImplementer;
|
||||||
friend class Isolate;
|
friend class Isolate;
|
||||||
|
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(HandleScope);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user