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

Issue 2629913002: fix leak of hbitmap (Closed)

Created:
3 years, 11 months ago by reed1
Modified:
3 years, 11 months ago
Reviewers:
f(malita)
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

fix leak of hbitmap use SaveDC/RestoreDC to track the original/default hbitmap in the DC. This way we can recover the actual hbitmap using GetCurrentObject, use RestoreDC to delect it and restore the original, and then delete our hbitmap and the dc. BUG=680971 Review-Url: https://codereview.chromium.org/2629913002 Cr-Commit-Position: refs/heads/master@{#443583} Committed: https://chromium.googlesource.com/chromium/src/+/1e4883b93bc28febedbf8f3927c88daebf0acbc6

Patch Set 1 #

Total comments: 10

Patch Set 2 : fix dchecks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -3 lines) Patch
M skia/ext/raster_handle_allocator_win.cc View 1 2 chunks +22 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
reed1
3 years, 11 months ago (2017-01-13 15:48:10 UTC) #2
f(malita)
lgtm https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc File skia/ext/raster_handle_allocator_win.cc (right): https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc#newcode28 skia/ext/raster_handle_allocator_win.cc:28: DCHECK(hbitmap); nit: DCHECK_NE(hbitmap, nullptr) https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc#newcode30 skia/ext/raster_handle_allocator_win.cc:30: int success ...
3 years, 11 months ago (2017-01-13 15:51:58 UTC) #6
f(malita)
https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc File skia/ext/raster_handle_allocator_win.cc (right): https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc#newcode68 skia/ext/raster_handle_allocator_win.cc:68: DCHECK(saveIndex != 0); DCHECK_NE(saveIndex, 0)
3 years, 11 months ago (2017-01-13 15:52:44 UTC) #8
reed1
https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc File skia/ext/raster_handle_allocator_win.cc (right): https://codereview.chromium.org/2629913002/diff/1/skia/ext/raster_handle_allocator_win.cc#newcode28 skia/ext/raster_handle_allocator_win.cc:28: DCHECK(hbitmap); On 2017/01/13 15:51:57, f(malita) wrote: > nit: DCHECK_NE(hbitmap, ...
3 years, 11 months ago (2017-01-13 15:58:08 UTC) #9
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/2629913002/20001
3 years, 11 months ago (2017-01-13 16:00:54 UTC) #15
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 16:55:30 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/1e4883b93bc28febedbf8f3927c8...

Powered by Google App Engine
This is Rietveld 408576698