NPWindow.window is HWND in Windows. It is that Win32 is 4 bytes, Win64 is 8bytes.
But NPRemoteWindow.window is defined as unsigned long... Since Win64 model is LLP64, sizeof(unsigned long) is 4, not 8.
Correct me if I'm wrong but "unsigned long" is generally 64 bits on 64-bit Unix machines and 32 bits on 64-bit Windows machines. This means casting void* to unsigned long and back would probably work on Unix but not on Windows, which would explain why nobody reported this for Linux but it is an issue on Windows...
Created attachment 556858 [details] [diff] [review]
This is ugly, but maybe less ugly?
pushed to mozilla-central
Nothing here that QA needs to verify.