Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Issue 2781313004: Implement RefCountedCopyable<T>. (Closed)

Created:
3 years, 8 months ago by shend
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -16 lines) Patch
M third_party/WebKit/Source/core/style/StyleBoxData.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleBoxData.cpp View 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/wtf/RefCounted.h View 1 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (10 generated)
shend
Hi Alan, PTAL :)
3 years, 8 months ago (2017-03-31 05:22:36 UTC) #4
alancutter (OOO until 2018)
You'll need platform OWNERs review as well. https://codereview.chromium.org/2781313004/diff/1/third_party/WebKit/Source/platform/wtf/RefCounted.h File third_party/WebKit/Source/platform/wtf/RefCounted.h (right): https://codereview.chromium.org/2781313004/diff/1/third_party/WebKit/Source/platform/wtf/RefCounted.h#newcode169 third_party/WebKit/Source/platform/wtf/RefCounted.h:169: // compiler-generated ...
3 years, 8 months ago (2017-04-03 12:07:45 UTC) #7
alancutter (OOO until 2018)
lgtm
3 years, 8 months ago (2017-04-03 12:07:50 UTC) #8
shend
Hi haraken, PTAL for platform/ :)
3 years, 8 months ago (2017-04-03 22:23:50 UTC) #10
haraken
LGTM!
3 years, 8 months ago (2017-04-04 05:36:34 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2781313004/20001
3 years, 8 months ago (2017-04-04 06:29:21 UTC) #14
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 08:03:22 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/de33c94cc211c5ee1994ce3fa0d4...

Powered by Google App Engine
This is Rietveld 408576698