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

Issue 1769433002: gfx::Image: Refactor to avoid assuming scoped_ptr lifetime. (Closed)

Created:
4 years, 9 months ago by Matt Giuca
Modified:
4 years, 9 months ago
Reviewers:
Robert Sesek
CC:
rsesek+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

gfx::Image: Refactor to avoid assuming scoped_ptr lifetime. Previously, ToImageSkia, ToUIImage and ToNSImage would assume the scoped_ptr they pass to AddRepresentation would remain valid after that method returns. This *should* be the case, but it is poor form to assume it. Now AddRepresentation returns a valid pointer and the callers return that, rather than assuming the scoped_ptr stays alive. BUG=590882 Committed: https://crrev.com/ce72b2661074ea7d583a276248d50e9763df5ede Cr-Commit-Position: refs/heads/master@{#381607}

Patch Set 1 #

Patch Set 2 : Rebase onto r381141; now just a refactor. #

Patch Set 3 : Fix comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -9 lines) Patch
M ui/gfx/image/image.h View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
M ui/gfx/image/image.cc View 1 5 chunks +7 lines, -7 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 14 (7 generated)
Matt Giuca
Hi Robert, what are your thoughts on this? See my analysis in https://crbug.com/590882#c4.
4 years, 9 months ago (2016-03-04 06:19:42 UTC) #2
Robert Sesek
Seems reasonable. LGTM.
4 years, 9 months ago (2016-03-04 17:33:01 UTC) #3
Matt Giuca
Now that https://codereview.chromium.org/1773433002 has landed, I still think this change is an improvement (but it's ...
4 years, 9 months ago (2016-03-15 02:25:14 UTC) #7
Robert Sesek
Yeah, I think this is still good. LGTM
4 years, 9 months ago (2016-03-16 20:15:45 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1769433002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1769433002/60001
4 years, 9 months ago (2016-03-16 23:20:21 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years, 9 months ago (2016-03-17 00:38:35 UTC) #12
commit-bot: I haz the power
4 years, 9 months ago (2016-03-17 00:40:51 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ce72b2661074ea7d583a276248d50e9763df5ede
Cr-Commit-Position: refs/heads/master@{#381607}

Powered by Google App Engine
This is Rietveld 408576698