[Webkit-unassigned] [Bug 41956] [WIN] Correct DeleteObject usage in PasteboardWin
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 22 13:13:18 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=41956
Adam Roben (aroben) <aroben at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #61038|review?, commit-queue? |review-
Flag| |
--- Comment #2 from Adam Roben (aroben) <aroben at apple.com> 2010-07-22 13:13:19 PST ---
(From update of attachment 61038)
> 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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list