Bug 136258 - [Win] WebKit IDL incorrectly passes HWND values as OLE_HANDLE
Summary: [Win] WebKit IDL incorrectly passes HWND values as OLE_HANDLE
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P1 Blocker
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-08-26 10:31 PDT by Brent Fulgham
Modified: 2014-08-26 14:57 PDT (History)
2 users (show)

See Also:


Attachments
Patch (87.58 KB, patch)
2014-08-26 14:13 PDT, Brent Fulgham
no flags Details | Formatted Diff | Diff
Patch (87.31 KB, patch)
2014-08-26 14:21 PDT, Brent Fulgham
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-08-26 10:31:10 PDT
We have a 64-bit porting problem with HWND's through the WebKit IDL layer. For some reason, these handles were declared as OLE_HANDLE values, which map to 32-bits on both 32- and 64-bit platforms. Internally, these are converted to HWND, which are 64-bit values on 64-bit builds. This causes problems when WebCore attempts to locate and use the windows associated with these incorrect HWND values.

This problem can be difficult to reproduce as we only experience a problem when the original HWND included active bits in the unique 64-bit portion of the HWND value.
Comment 1 Brent Fulgham 2014-08-26 11:06:43 PDT
<rdar://problem/18134138>
Comment 2 Brent Fulgham 2014-08-26 12:59:42 PDT
HWND, HBITMAP, HDC, HICON, HCURSOR, and HMENU are now passed as these types, since they have proper 32-bit and 64-bit behavior depending on compile platform.

OLE_HANDLE for certificates and other "void*" types are now ULONG_PTR.
Comment 3 Brent Fulgham 2014-08-26 14:13:28 PDT
Created attachment 237172 [details]
Patch
Comment 4 Brent Fulgham 2014-08-26 14:21:55 PDT
Created attachment 237173 [details]
Patch
Comment 5 Brent Fulgham 2014-08-26 14:40:07 PDT
Committed r172977: <http://trac.webkit.org/changeset/172977>
Comment 6 Brent Fulgham 2014-08-26 14:57:07 PDT
<rdar://problem/18134163>
Comment 7 Brent Fulgham 2014-08-26 14:57:27 PDT
(In reply to comment #1)
> <rdar://problem/18134138>

Whoops!  I meant <rdar://problem/18134163>.