Commit b2fee84f authored by franzih's avatar franzih Committed by Commit bot

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}
parent a8d8620f
......@@ -39,10 +39,9 @@ struct StreamedSource {
std::unique_ptr<ParseInfo> info;
std::unique_ptr<Parser> parser;
private:
// Prevent copying. Not implemented.
StreamedSource(const StreamedSource&);
StreamedSource& operator=(const StreamedSource&);
// Prevent copying.
StreamedSource(const StreamedSource&) = delete;
StreamedSource& operator=(const StreamedSource&) = delete;
};
......
......@@ -525,6 +525,8 @@ class StackFrame BASE_EMBEDDED {
Isolate* isolate() const { return isolate_; }
void operator=(const StackFrame& original) = delete;
protected:
inline explicit StackFrame(StackFrameIteratorBase* iterator);
virtual ~StackFrame() { }
......@@ -563,9 +565,6 @@ class StackFrame BASE_EMBEDDED {
friend class StackFrameIteratorBase;
friend class StackHandlerIterator;
friend class SafeStackFrameIterator;
private:
void operator=(const StackFrame& original);
};
......
......@@ -293,8 +293,6 @@ class HandleScope {
private:
// Prevent heap allocation or illegal handle scopes.
HandleScope(const HandleScope&);
void operator=(const HandleScope&);
void* operator new(size_t size);
void operator delete(void* size_t);
......@@ -320,6 +318,8 @@ class HandleScope {
friend class DeferredHandleScope;
friend class HandleScopeImplementer;
friend class Isolate;
DISALLOW_COPY_AND_ASSIGN(HandleScope);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment