Fix GetInProcessTopInternal usage in nsGlobalWindowOuter::ShouldPromptToBlockDialogs/AreDialogsEnabled/EnableDialogs/DisableDialogs
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox92 | --- | fixed |
People
(Reporter: kmag, Assigned: annyG)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
| Reporter | ||
Comment 1•6 years ago
|
||
Also goes for nsGlobalWindowOuter::TemporarilyDisableDialogs
| Reporter | ||
Comment 2•6 years ago
|
||
And nsGlobalWindowInner::DialogsAreBeingAbused
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Seems to be related to alert()-spam. With current implementation, would not impact oop subframes.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
I think we should be able to do this by moving topWindow->mAreDialogsEnabled onto the toplevel WindowContext as a synced field, as we only ever clear it to false outside of nsIDOMWindowUtils::EnableDialogs, which can probably be deleted as I don't see any callers in-tree (https://bugzilla.mozilla.org/show_bug.cgi?id=1669392)
The mDialogAbuseCount flag might be nice to support across processes, but that may be trickier. We would probably need to start tracking the information in the parent process on WindowGlobalParent, and move when we're rejecting things to a different process in the dialog flow.
Comment 5•5 years ago
|
||
Doesn't have to block M7, let's fix in M7a.
Updated•5 years ago
|
Comment 6•5 years ago
•
|
||
Johann, do you have thoughts for mDialogAbuseCount (see comment 4)?
Comment 8•5 years ago
|
||
(In reply to Neha Kochar [:neha] from comment #6)
Johann, do you have thoughts for
mDialogAbuseCount(see comment 4)?
Neha, we don't quite understand what you were asking. Could you elaborate your question?
In the meantime, I am redirecting the needinfo to Jens because this code doesn't fit our team's domain expertise.
Comment 9•5 years ago
|
||
I looked into this a bit more with :neha earlier today, and came to the conclusion that these members generally shouldn't be synced between processes, and should continue to be process-local. There is one use-case which might be useful to be process synced, which is setting mAreDialogsEnabled to false in the background thumbnailer code (https://searchfox.org/mozilla-central/rev/f351e19360729b351bfc7c1386d6e4ca4ea676e2/toolkit/actors/BackgroundThumbnailsChild.jsm#97), however that code is no longer being actively used by the newtab page, and will probably be disabled soon (bug 1706449). It seems fairly reasonable to leave mDialogAbuseCount alone for now, as it will still serve its purpose just fine within a process.
The one change which might be worth making here as a clean-up for fission would be to move these two attributes off of nsGlobalWindowInner and instead put them on BrowsingContextGroup, so that they're shared between all in-process documents within a BrowsingContextGroup, rather than only by in-process docShell subtrees. This should involve no functional changes, mostly just moving the attributes and replacing GetInProcessTopInternal() uses with GetBrowsingContext()->Group(). No cross-process syncing should be necessary :-)
Comment 10•5 years ago
|
||
Anny, would you be able to finish up the remaining clean-up here?
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 11•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
| bugherder | ||
Description
•