Descriptiongfx::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. #
Depends on Patchset: Messages
Total messages: 14 (7 generated)
|