Bug 94124 - clipboardwin compile error for win64
Summary: clipboardwin compile error for win64
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 10:51 PDT by Alex Christensen
Modified: 2012-11-26 14:12 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.42 KB, patch)
2012-08-15 10:56 PDT, Alex Christensen
bfulgham: review+
bfulgham: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>