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

Issue 2870543002: Removed PassRefPtr to RefPtr copies from unit tests. (Closed)

Created:
3 years, 7 months ago by Bugs Nash
Modified:
3 years, 7 months ago
Reviewers:
haraken, Yuta Kitamura
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, dshwang, drott+blinkwatch_chromium.org, krit, Eric Willigers, fmalita+watch_chromium.org, Justin Novosad, kinuko+watch, pdr+graphicswatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Removed PassRefPtr to RefPtr copies from unit tests. All instances of PassRefPtr objects being copied into RefPtr objects need to be wrapped in std::move to avoid introducing ref churn in future changes when all PassRefPtr objects will be replaced with RefPtr objects. Some cases create a local RefPtr just to copy the PassRefPtr argument into; in these cases a std::move wrap doesn't make sense as it would result in a final state where a RefPtr argument is moved into a local RefPtr for no reason. So to handle these cases I have converted the PassRefPtr arguments to RefPtr in advance, and removed the local RefPtr argument, instead using the passed RefPtr throughout the methods. Changed include - added std::move wraps to PassReftr objects to force a move - removed local RefPtr objects where PassRefPtr arguments are copied into them, instead change PassRefPtr argument to RefPtr that is directly used. BUG=494719 Review-Url: https://codereview.chromium.org/2870543002 Cr-Commit-Position: refs/heads/master@{#470240} Committed: https://chromium.googlesource.com/chromium/src/+/aa79e549a918ff2530db858e281eb9f1515c2d5b

Patch Set 1 #

Messages

Total messages: 13 (8 generated)
Bugs Nash
3 years, 7 months ago (2017-05-08 02:57:21 UTC) #4
haraken
LGTM
3 years, 7 months ago (2017-05-08 04:10:26 UTC) #5
Yuta Kitamura
lgtm
3 years, 7 months ago (2017-05-08 05:56:10 UTC) #8
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/2870543002/1
3 years, 7 months ago (2017-05-09 04:26:32 UTC) #10
commit-bot: I haz the power
3 years, 7 months ago (2017-05-09 05:48:10 UTC) #13
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/aa79e549a918ff2530db858e281e...

Powered by Google App Engine
This is Rietveld 408576698