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

Issue 2923493003: Make ComputedStyleBase internal pointer setters move-only. (Closed)

Created:
3 years, 6 months ago by shend
Modified:
3 years, 6 months ago
Reviewers:
nainar
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ComputedStyleBase internal pointer setters move-only. This patch removes the const ref overload for setters on pointer types. This means that the internal setter can only be used with an rvalue ref. This has two consequences: - We can generate code that works for RefPtrs and std::unique_ptrs (since std::unique_ptrs are not copyable, the const ref overload is meaningless [*]). - RefPtrs are passed to internal setters using std::move, which avoids ref churn. [*] Whilst we could make the const ref overload copy the unique_ptr, we feel that this implicit copying behaviour is bad. Diff of generated files: https://gist.github.com/darrnshn/d809ec84cd6418bb1f65ca6dae986630/revisions This patch does not change behaviour, only the internal API for ComputedStyleBase. BUG=628043 Review-Url: https://codereview.chromium.org/2923493003 Cr-Commit-Position: refs/heads/master@{#477111} Committed: https://chromium.googlesource.com/chromium/src/+/525a0e6f0d79296a4da4f109f7a704ebbcf7f20a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/fields/storage_only.tmpl View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 12 (8 generated)
shend
Hi Naina, PTAL
3 years, 6 months ago (2017-06-05 08:09:54 UTC) #3
nainar
lgtm
3 years, 6 months ago (2017-06-05 16:31:44 UTC) #7
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/2923493003/1
3 years, 6 months ago (2017-06-05 22:45:08 UTC) #9
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 22:50:46 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/525a0e6f0d79296a4da4f109f7a7...

Powered by Google App Engine
This is Rietveld 408576698