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

Issue 2064273003: Fix a SkImage leak in ImageBitmap:cropImage() (Closed)

Created:
4 years, 6 months ago by f(malita)
Modified:
4 years, 6 months ago
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a SkImage leak in ImageBitmap:cropImage() We're currently using the raw pointer API for image subsetting, and not adopting the result immediately. Then if we take the unPremulSkImageToPremul() path, we leak. Convert to the safer sk_sp API and adopt into a RefPtr to avoid leaking. R=reed@google.com,xidachen@chromium.org BUG=619893 Committed: https://crrev.com/9315dfe2897c1586d4d54bfae5fc876345bf1c8f Cr-Commit-Position: refs/heads/master@{#399869}

Patch Set 1 #

Patch Set 2 : use a RefPtr #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M third_party/WebKit/Source/core/frame/ImageBitmap.cpp View 1 1 chunk +3 lines, -3 lines 3 comments Download

Messages

Total messages: 12 (5 generated)
f(malita)
There's more ImageBitmap code that should be converted to sk_sp APIs, but I'm keeping this ...
4 years, 6 months ago (2016-06-15 08:41:54 UTC) #3
xidachen
lgtm Thank you for cleaning this up. https://codereview.chromium.org/2064273003/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2064273003/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode155 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:155: croppedSkImage->preroll(); On ...
4 years, 6 months ago (2016-06-15 08:56:11 UTC) #4
xidachen
https://codereview.chromium.org/2064273003/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): https://codereview.chromium.org/2064273003/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode155 third_party/WebKit/Source/core/frame/ImageBitmap.cpp:155: croppedSkImage->preroll(); On 2016/06/15 08:56:11, xidachen wrote: > On 2016/06/15 ...
4 years, 6 months ago (2016-06-15 08:57:29 UTC) #5
f(malita)
On 2016/06/15 08:57:29, xidachen wrote: > https://codereview.chromium.org/2064273003/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp > File third_party/WebKit/Source/core/frame/ImageBitmap.cpp (right): > > https://codereview.chromium.org/2064273003/diff/20001/third_party/WebKit/Source/core/frame/ImageBitmap.cpp#newcode155 > ...
4 years, 6 months ago (2016-06-15 09:10:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2064273003/20001
4 years, 6 months ago (2016-06-15 09:11:06 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-15 09:43:48 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-06-15 09:45:14 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9315dfe2897c1586d4d54bfae5fc876345bf1c8f
Cr-Commit-Position: refs/heads/master@{#399869}

Powered by Google App Engine
This is Rietveld 408576698