[webkit-reviews] review denied: [Bug 41956] [WIN] Correct DeleteObject usage in PasteboardWin : [Attachment 61038] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 22 13:13:18 PDT 2010
Adam Roben (aroben) <aroben at apple.com> has denied Patrick R. Gansterer
<paroga at paroga.com>'s request for review:
Bug 41956: [WIN] Correct DeleteObject usage in PasteboardWin
https://bugs.webkit.org/show_bug.cgi?id=41956
Attachment 61038: Patch
https://bugs.webkit.org/attachment.cgi?id=61038&action=review
------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
> if (::OpenClipboard(m_owner)) {
> ::SetClipboardData(CF_BITMAP, resultBitmap);
> ::CloseClipboard();
> - }
> + } else
> + ::DeleteObject(resultBitmap);
> }
If you put resultBitmap into an OwnPtr, and then pass it to SetClipboardData
using leakPtr, you won't have to remember this extra DeleteObject call (as
OwnPtr will do it for you). I think that would be a bit nicer.
Otherwise, this looks great! I'm surprised this hasn't caused any (known)
problems for us so far.
More information about the webkit-reviews
mailing list