Closed Bug 527800 Opened 16 years ago Closed 16 years ago

NPCocoaEvent structures sometimes not initialized in nsChildView.mm

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smichaud, Assigned: smichaud)

Details

Attachments

(1 file, 1 obsolete file)

Support was recently added on the trunk for the Cocoa event model in plugins. But this support still has problems -- among them the following: There are several places in nsChildView.mm where an NPCocoaEvent structure is created (and sent to a plugin) without being properly initialized. This can lead to crashes, both in my DebugPluginEvents plugin from bug 441880 and in Apple's NetscapeCocoaPlugin example from WebKit code. What specifically causes the crashes is that, in the case of an NPCocoaEventFlagsChanged event, the data.key.characters and data.key.charactersIgnoringModifiers fields are unitialized. Each of these is a pointer to an NPNSString (the equivalent of a pointer to an NSString). A patch will follow shortly.
Attached patch Fix (obsolete) — Splinter Review
Attachment #411545 - Flags: review?(joshmoz)
Assignee: nobody → smichaud
We should just call "InitNPCocoaEvent" at the top of "ConvertCocoaKeyEventToNPCocoaEvent".
That also works.
Attachment #411545 - Attachment is obsolete: true
Attachment #411694 - Flags: review?(joshmoz)
Attachment #411545 - Flags: review?(joshmoz)
Attachment #411694 - Flags: review?(joshmoz) → review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: