Closed Bug 906237 Opened 6 years ago Closed 6 years ago

[e10s] Serialize nsKeyEvent::mNativeKeyEvent to the child process

Categories

(Core :: IPC, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dvander, Assigned: dvander)

References

Details

Attachments

(1 file)

bug 282097 introduced a new field in nsKeyEvent. It's only used on OS X, where it contains an NSEvent. It is currently not serializable across IPC, so keyboard input does not really work on Mac.

I'm going to try just serializing whatever bits of it are needed to reconstruct the NSEvent on the other side.
I don't understand how events work to do a good fix here, yet. In the meantime, we can get text input working again on e10s by just making sure the nsKeyEvent field isn't garbage.
Attachment #792017 - Flags: review?
Attachment #792017 - Flags: review? → review?(masayuki)
Comment on attachment 792017 [details] [diff] [review]
null_native_key_event.patch

mNativeKeyEvent will be used on GTK2 too in my plan (for same purpose as Mac OS X).

The native key event is necessary to query native keyboard shortcut. So, this patch disables a lot of system wide shortcut keys on Mac OS X if e10s is enabled.
Attachment #792017 - Flags: review?(masayuki) → review-
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #2)
> Comment on attachment 792017 [details] [diff] [review]
> null_native_key_event.patch
> 
> mNativeKeyEvent will be used on GTK2 too in my plan (for same purpose as Mac
> OS X).
> 
> The native key event is necessary to query native keyboard shortcut. So,
> this patch disables a lot of system wide shortcut keys on Mac OS X if e10s
> is enabled.

Unless I'm misunderstanding something, this patch doesn't break anything. Text input on OS X is completely broken on e10s. Any keypress will cause it to crash because mNativeKeyEvent isn't initialized.

This patch makes sure the field is initialized to NULL, so we can at least use the browser again until we can figure out a full-fledged solution.
Comment on attachment 792017 [details] [diff] [review]
null_native_key_event.patch

It's only with great reluctance that I override your r-, Masayuki, but this patch looks harmless to me.  Also, it seems to be urgently needed for Electrolysis part deux, which is getting announced at tomorrow's Platform meeting.

Please let me know if I've misunderstood, and if so we can undo the damage later :-)
Attachment #792017 - Flags: review- → review+
https://hg.mozilla.org/mozilla-central/rev/c7f5065c808c
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Okay, but please file a bug for improving the Mac OS X's system wide shortcut key handling.
Flags: needinfo?(dvander)
Filed as bug 950255
Flags: needinfo?(dvander)
You need to log in before you can comment on or make changes to this bug.