Closed Bug 1141709 Opened 10 years ago Closed 10 years ago

[e10s] Make IsMainProcessWidgetVisible message urgent

Categories

(Firefox :: Menus, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1140859
Tracking Status
e10s m8+ ---

People

(Reporter: mconley, Assigned: billm)

References

Details

Attachments

(1 file)

STR: 1) Visit the test case attachment. 2) Right-click on a link and choose "Save Link As.." In the console, we get: Error: child process crashed or timedout nsPrompter.js:356:24 in toolkit/components/prompts/src/nsPrompter.js: function openModalWindow(domWin, uri, args) { // There's an implied contract that says modal prompts should still work // when no "parent" window is passed for the dialog (eg, the "Master // Password" dialog does this). These prompts must be shown even if there // are *no* visible windows at all. // There's also a requirement for prompts to be blocked if a window is // passed and that window is hidden (eg, auth prompts are supressed if the // passed window is the hidden window). // See bug 875157 comment 30 for more... if (domWin) { // a domWin was passed, so we can apply the check for it being hidden. let winUtils = domWin.QueryInterface(Ci.nsIInterfaceRequestor) <- Causes CPOW warning .getInterface(Ci.nsIDOMWindowUtils); if (winUtils && !winUtils.isParentWindowMainWidgetVisible) { <- Causes CPOW warning, crash throw Components.Exception("Cannot call openModalWindow on a hidden window", Cr.NS_ERROR_NOT_AVAILABLE); } } else { // We try and find a window to use as the parent, but don't consider // if that is visible before showing the prompt. domWin = Services.ww.activeWindow; // domWin may still be null here if there are _no_ windows open. } // Note that we don't need to fire DOMWillOpenModalDialog and // DOMModalDialogClosed events here, wwatcher's OpenWindowInternal // will do that. Similarly for enterModalState / leaveModalState. Services.ww.openWindow(domWin, uri, "_blank", "centerscreen,chrome,modal,titlebar", args); }
Here's a crash report: a71427dc-5651-4429-b4f0-73b7b2150310
So the problem is that we're trying to send a sync message up to the parent while servicing a CPOW. We fail this assertion in MessageChannel::Send: IPC_ASSERT(aMsg->priority() >= DispatchingSyncMessagePriority(), "can't send sync message of a lesser priority than what's being dispatched");
So actually, this will probably get fixed once bug 1140859 gets fixed.
Let's repurpose this bug to make the IsMainProcessWidgetVisible message urgent.
Given that this crash has been fixed in bug 1140859, should this bug be marked fixed, or do you want to keep it around and mutate it for the work mentioned in comment #6?
Flags: needinfo?(wmccloskey)
Let's keep it around. I don't think we have any other bugs for IsMainProcessWidgetVisible.
Flags: needinfo?(wmccloskey)
Assignee: nobody → wmccloskey
Summary: [e10s] nsContextMenu.saveHelper() in remote browser crashes content process on links to non-existent domains → [e10s] Make IsMainProcessWidgetVisible message urgent
Looking at this more closely, we actually only use this code in nsPrompter.js. Even if we make the message urgent, I don't think the prompter code will start working through a CPOW. If we see this crash again, I think the solution is a shim for whatever the add-on is doing to open the prompt.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: