RESOLVED FIXED 76303
[Windows] Convert usage of GetDC to HWndDC.
https://bugs.webkit.org/show_bug.cgi?id=76303
Summary [Windows] Convert usage of GetDC to HWndDC.
David Levin
Reported 2012-01-13 13:28:46 PST
I'm not touching the wince, wx, qt, or Cairo ports (because I worry about breaking them and not having lots of time to solve it -- with having to install lots of other stuff, etc.)
Attachments
Patch (35.99 KB, patch)
2012-01-13 14:19 PST, David Levin
no flags
Patch (37.63 KB, patch)
2012-01-17 15:07 PST, David Levin
no flags
Patch (37.65 KB, patch)
2012-01-18 15:15 PST, David Levin
no flags
Patch (36.02 KB, patch)
2012-01-18 21:51 PST, David Levin
no flags
David Levin
Comment 1 2012-01-13 14:19:41 PST
David Levin
Comment 2 2012-01-13 14:20:17 PST
Adding folks whom I believe work on Windows.
Adam Roben (:aroben)
Comment 3 2012-01-17 08:34:17 PST
Why is this patch obsolete?
David Levin
Comment 4 2012-01-17 08:45:24 PST
(In reply to comment #3) > Why is this patch obsolete? Two reasons: 1.I moved the header file. 2. I decided that I hated the OwnPtr thing I did and wanted to make delayed allocation part of the class itself.
David Levin
Comment 5 2012-01-17 15:07:53 PST
WebKit Review Bot
Comment 6 2012-01-17 15:10:14 PST
Attachment 122821 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.cpp:812: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebCore/platform/win/HWndDC.h:64: Use the class HWndDC instead of calling GetDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebKit/win/FullscreenVideoController.cpp:489: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebCore/platform/win/PopupMenuWin.cpp:571: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebKit2/Shared/win/ShareableBitmapWin.cpp:46: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Total errors found: 5 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
David Levin
Comment 7 2012-01-17 15:11:59 PST
(In reply to comment #6) > Attachment 122821 [details] did not pass style-queue: > > Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 > > Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.cpp:812: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] > Source/WebCore/platform/win/HWndDC.h:64: Use the class HWndDC instead of calling GetDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] > Source/WebKit/win/FullscreenVideoController.cpp:489: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] > Source/WebCore/platform/win/PopupMenuWin.cpp:571: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] > Source/WebKit2/Shared/win/ShareableBitmapWin.cpp:46: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] > Total errors found: 5 in 21 files > Some are because I'm not changing over more things in this patch and a few point out the need for me to fix the style checker to look for adoptPtr instead of OwnPtr when looking for the leaky pattern. Filed: https://bugs.webkit.org/show_bug.cgi?id=76483
David Levin
Comment 8 2012-01-18 15:15:27 PST
David Levin
Comment 9 2012-01-18 15:16:50 PST
(In reply to comment #3) > Why is this patch obsolete? It is good now. Please feel free to review it :).
WebKit Review Bot
Comment 10 2012-01-18 15:19:04 PST
Attachment 123007 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.cpp:812: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebCore/platform/win/HWndDC.h:64: Use the class HWndDC instead of calling GetDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebKit/win/FullscreenVideoController.cpp:489: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebCore/platform/win/PopupMenuWin.cpp:571: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebKit2/Shared/win/ShareableBitmapWin.cpp:46: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Total errors found: 5 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
David Levin
Comment 11 2012-01-18 21:51:19 PST
WebKit Review Bot
Comment 12 2012-01-18 21:53:27 PST
Attachment 123072 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit2/UIProcess/win/WebPopupMenuProxyWin.cpp:812: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebCore/platform/win/HWndDC.h:64: Use the class HWndDC instead of calling GetDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebKit/win/FullscreenVideoController.cpp:489: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebCore/platform/win/PopupMenuWin.cpp:571: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Source/WebKit2/Shared/win/ShareableBitmapWin.cpp:46: Use OwnPtr<HDC> when calling CreateCompatibleDC to avoid potential memory leaks. [runtime/leaky_pattern] [5] Total errors found: 5 in 21 files If any of these errors are false positives, please file a bug against check-webkit-style.
David Levin
Comment 13 2012-01-19 01:39:56 PST
Comment on attachment 123072 [details] Patch cq? since it builds fine on Windows now.
David Levin
Comment 14 2012-01-20 13:11:06 PST
Comment on attachment 123072 [details] Patch Will break into smaller patches especially for functionality changes.
David Levin
Comment 15 2012-01-24 09:58:43 PST
As soon as the last patch goes through the commit queue this is done.
Note You need to log in before you can comment on or make changes to this bug.