Bug 136258

Summary: [Win] WebKit IDL incorrectly passes HWND values as OLE_HANDLE
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Severity: Blocker CC: bfulgham, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Description Flags
Patch thorton: review+

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
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]
Comment 4 Brent Fulgham 2014-08-26 14:21:55 PDT
Created attachment 237173 [details]
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
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>.