DescriptionImplement RefCountedCopyable<T>.
Currently, subclasses of RefCounted<T> must explicitly handwrite their
copy constructors because RefCounted<T> has a deleted copy constructor.
This is tedious for subclasses that have a lot of members (e.g.
StyleRareNonInheritedData).
RefCountedCopyable<T> is a base class for ref-counted classes that
want to be copyable as well. RefCountedCopyable<T> implements a
protected copy constructor that resets the ref count to zero. Because
the copy constructor is protected, the compiler is able to generate a
default copy constructor for subclasses.
This patch moves StyleBoxData to RefCountedCopyable as an example.
BUG=628043
Review-Url: https://codereview.chromium.org/2781313004
Cr-Commit-Position: refs/heads/master@{#461656}
Committed: https://chromium.googlesource.com/chromium/src/+/de33c94cc211c5ee1994ce3fa0d43abc355a4e9c
Patch Set 1 #
Total comments: 1
Patch Set 2 : Address comments #
Messages
Total messages: 17 (10 generated)
|