[webkit-reviews] review requested: [Bug 78389] wtf/ThreadingWin.cpp doesn't build for 64-bit Windows : [Attachment 126582] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 10 14:22:57 PST 2012


Kalev Lember <kalevlember at gmail.com> has asked	for review:
Bug 78389: wtf/ThreadingWin.cpp doesn't build for 64-bit Windows
https://bugs.webkit.org/show_bug.cgi?id=78389

Attachment 126582: Patch
https://bugs.webkit.org/attachment.cgi?id=126582&action=review

------- Additional Comments from Kalev Lember <kalevlember at gmail.com>
The thread proc function passed to _beginthreadex() has unsigned int
return type. However, the actual worker function it calls returns
void*. The current code in wtfThreadEntryPoint() tried to cast the
void* to unsigned int, and then return that value. This however
doesn't work on 64-bit Windows where a pointer is a 64 bit and an int
is a 32 bit value.

Instead, just return 0 to signal success, and 1 for failure.

This shouldn't currently affect any client code, because
waitForThreadCompletion implementation in ThreadingWin doesn't
actually query the return value and does not return anything through
**result.

* wtf/ThreadingWin.cpp:
(WTF::wtfThreadEntryPoint): Avoid casting void* to unsigned int.


More information about the webkit-reviews mailing list