NPRemoteWindow.window shouldn't be unsigned long

RESOLVED FIXED

Status

()

Core
Plug-ins
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: m_kato, Assigned: Josh Aas)

Tracking

Trunk
x86_64
Windows Vista
Points:
---

Firefox Tracking Flags

(firefox9 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
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...
(Assignee)

Updated

6 years ago
Assignee: m_kato → joshmoz
(Assignee)

Comment 2

6 years ago
Created attachment 556858 [details] [diff] [review]
fix v1.0

This is ugly, but maybe less ugly?
(Assignee)

Updated

6 years ago
Attachment #556858 - Flags: review?(m_kato)
(Reporter)

Updated

6 years ago
Attachment #556858 - Flags: review?(m_kato) → review+
(Assignee)

Updated

6 years ago
Attachment #556858 - Flags: review?(jones.chris.g)
Attachment #556858 - Flags: review?(jones.chris.g) → review+
(Assignee)

Comment 3

6 years ago
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/1bba630bb3a0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Assignee)

Updated

6 years ago
status-firefox9: --- → fixed
Nothing here that QA needs to verify.
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.