WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
41956
[WIN] Correct DeleteObject usage in PasteboardWin
https://bugs.webkit.org/show_bug.cgi?id=41956
Summary
[WIN] Correct DeleteObject usage in PasteboardWin
Patrick R. Gansterer
Reported
2010-07-09 06:05:38 PDT
see patch
Attachments
Patch
(2.33 KB, patch)
2010-07-09 06:09 PDT
,
Patrick R. Gansterer
aroben
: review-
Details
Formatted Diff
Diff
Patch (with OwnPtr)
(2.47 KB, patch)
2010-07-22 13:26 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2010-07-09 06:09:57 PDT
Created
attachment 61038
[details]
Patch
Adam Roben (:aroben)
Comment 2
2010-07-22 13:13:19 PDT
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.
Patrick R. Gansterer
Comment 3
2010-07-22 13:26:47 PDT
Created
attachment 62331
[details]
Patch (with OwnPtr)
Adam Roben (:aroben)
Comment 4
2010-07-22 13:43:09 PDT
Comment on
attachment 62331
[details]
Patch (with OwnPtr) r=me
WebKit Commit Bot
Comment 5
2010-07-22 19:15:20 PDT
Comment on
attachment 62331
[details]
Patch (with OwnPtr) Clearing flags on attachment: 62331 Committed
r63940
: <
http://trac.webkit.org/changeset/63940
>
WebKit Commit Bot
Comment 6
2010-07-22 19:15:24 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug