Bug 94124

Summary: clipboardwin compile error for win64
Product: WebKit Reporter: Alex Christensen <alex.christensen>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, roger_fong
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch bfulgham: review+, bfulgham: commit-queue-

Description Alex Christensen 2012-08-15 10:51:48 PDT
There are a few places in the clipboard utilities code that use std::min with an unsigned int parameter and a size_t parameter, which doesn't cause a problem when compiling for 32-bit windows, but it does cause a problem when compiling for 64-bit windows.  To resolve this issue, I specify the template type as the type the return value is being cast into.

https://github.com/achristensen07/webkit64prep

patch coming soon
Comment 1 Alex Christensen 2012-08-15 10:56:00 PDT
Created attachment 158592 [details]
Patch
Comment 2 Brent Fulgham 2012-08-15 20:44:20 PDT
Comment on attachment 158592 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=158592&action=review

Looks fine to me (and the EWS).  Please revise the ChangeLog notes and I think we are ready to land/

> Source/WebCore/ChangeLog:5
> +

I think you should include your helpful explanation here:

"The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter. This causes a problem when compiling for 64-bit windows because the two types are not the same size.  To resolve this issue, we specify the template type as the type the return value is being cast into."
Comment 3 Alex Christensen 2012-08-16 13:49:13 PDT
Not only that, but my patch is missing my changes to ClipboardWin.cpp.

Bad news: my computer just died, and I'm just about to change jobs, so it will be a while (~4 months) before I can properly patch this.  If someone else wants to, be my guest.  Sorry.
Comment 4 Brent Fulgham 2012-11-26 14:10:22 PST
Comment on attachment 158592 [details]
Patch

R+ for content. I'm adding the text I asked for in the ChangeLog while landing.
Comment 5 Brent Fulgham 2012-11-26 14:12:28 PST
Committed r135763: <http://trac.webkit.org/changeset/135763>