Closed Bug 1477343 Opened Last year Closed Last year

content process isParentWindowMainWidgetVisible implementation seems to be dead code

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: bzbarsky, Assigned: mrbkap)

Details

Attachments

(1 file)

I think this was added in bug 899648.

TabParent::RecvIsParentWindowMainWidgetVisible would crash if called as of today (because windows don't QI to nsIDOMWindowUtils and then we'd get a null-deref).  But it's never called, because the only consumer of isParentWindowMainWidgetVisible is in nsPrompter.js in openModalWindow, which is only called in the parent process.

Can we just remove the IPC bits here and have nsDOMWindowUtils::GetIsParentWindowMainWidgetVisible throw or return false or crash when called in a child process?

Note that bug 1476145 will change TabParent to code that doesn't crash, but it's still dead code.
Flags: needinfo?(mrbkap)
Yeah, we can just remove this (and kill the sync message while we're at it).
Assignee: nobody → mrbkap
Flags: needinfo?(mrbkap)
Comment on attachment 8994715 [details]
Bug 1477343 - Remove PBrowser::IsParentWindowMainWidgetVisible. r=bz

Boris Zbarsky [:bz] (no decent commit message means r-) has approved the revision.

https://phabricator.services.mozilla.com/D2347
Attachment #8994715 - Flags: review+
Comment on attachment 8994715 [details]
Bug 1477343 - Remove PBrowser::IsParentWindowMainWidgetVisible. r=bz

Andrew McCreight [:mccr8] has approved the revision.

https://phabricator.services.mozilla.com/D2347
Attachment #8994715 - Flags: review+
Pushed by mrbkap@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b9fac2e27ef
Remove PBrowser::IsParentWindowMainWidgetVisible. r=mccr8,bzbarsky
https://hg.mozilla.org/mozilla-central/rev/2b9fac2e27ef
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.