Assertion failure: !mPostedToRemoteProcess when you type key on plugin with debug build on macOS

RESOLVED FIXED in Firefox 64

Status

()

defect
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla64
Points:
---

Firefox Tracking Flags

(firefox64 fixed)

Details

Attachments

(1 attachment)

When you type any key, your debug build on macOS hits "Assertion failure: !mPostedToRemoteProcess, at /Volumes/dev/fx-dbg/dist/include/mozilla/BasicEvents.h:248". The stack is:

#01: mozilla::dom::Event::PreventDefaultInternal(bool, nsIPrincipal*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x285d34c]
#02: nsPluginInstanceOwner::HandleEvent(mozilla::dom::Event*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x301b413]
#03: non-virtual thunk to nsPluginInstanceOwner::HandleEvent(mozilla::dom::Event*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x301b60d]
#04: mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x286a1a5]
#05: mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x286ac1a]
#06: mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2860fb5]
#07: mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2860631]
#08: mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x28632a7]
#09: mozilla::PresShell::DispatchEventToDOM(mozilla::WidgetEvent*, nsEventStatus*, nsPresShellEventCB*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3784582]
#10: mozilla::PresShell::HandleEventInternal(mozilla::WidgetEvent*, nsEventStatus*, bool, nsIContent*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3781336]
#11: mozilla::PresShell::HandleEvent(nsIFrame*, mozilla::WidgetGUIEvent*, bool, nsEventStatus*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x377f912]
#12: nsViewManager::DispatchEvent(mozilla::WidgetGUIEvent*, nsView*, nsEventStatus*)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34a0e63]
#13: nsView::HandleEvent(mozilla::WidgetGUIEvent*, bool)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34a0aa8]
#14: mozilla::widget::PuppetWidget::DispatchEvent(mozilla::WidgetGUIEvent*, nsEventStatus&)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34cbf2a]
#15: mozilla::layers::APZCCallbackHelper::DispatchWidgetEvent(mozilla::WidgetGUIEvent&)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x10ff91e]
#16: mozilla::dom::TabChild::RecvRealKeyEvent(mozilla::WidgetKeyboardEvent const&)[/Volumes/dev/fx-dbg/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3178f77]
PuppetWidget::StartPluginIME() calls TabChild::SendStartPluginIME()
with given WidgetKeyboardEvent instance.  Then, the keyboard event
will be marked as "posted to remote process" by
ParamTraits<mozilla::WidgetEvent>::Write().  However, the method
sends back the keyboard event to the main process synchronously.
So, we don't want the event is treated as "posted" since the
flag is used to check whether the process handles posted event
*before* the remote process or not.

So, PuppetWidget::StartPluginIME() should use the given keyboard
instance directly.  Instead, it should use local copy of the
given keyboard event.
Attachment #9013928 - Attachment description: Bug 1495978 - Make PuppetWidget::StartPluginIME() use local copy of given WidgetKeyboardEvent → Bug 1495978 - Make PuppetWidget::StartPluginIME() restore cross process dispatching state of given keyboard event instance after sending it to the main process synchronously
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/80f3e8b1d66f
Make PuppetWidget::StartPluginIME() restore cross process dispatching state of given keyboard event instance after sending it to the main process synchronously r=m_kato
https://hg.mozilla.org/mozilla-central/rev/80f3e8b1d66f
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.