see patch
Created attachment 61038 [details] Patch
Comment on attachment 61038 [details] Patch > 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.
Created attachment 62331 [details] Patch (with OwnPtr)
Comment on attachment 62331 [details] Patch (with OwnPtr) r=me
Comment on attachment 62331 [details] Patch (with OwnPtr) Clearing flags on attachment: 62331 Committed r63940: <http://trac.webkit.org/changeset/63940>
All reviewed patches have been landed. Closing bug.