Closed Bug 1516343 Opened 5 years ago Closed 4 years ago

BrowsingContext::Close should only set mClosed after sending the DOMWindowClose event

Categories

(Core :: DOM: Core & HTML, task, P3)

task

Tracking

()

RESOLVED WONTFIX
Fission Milestone M6a
Tracking Status
firefox66 --- affected

People

(Reporter: peterv, Assigned: u608768)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

      No description provided.
Priority: -- → P1
Component: DOM → DOM: Core & HTML
Assignee: peterv → nobody
Blocks: improve-bc
No longer blocks: oop-frames, fission
Priority: P1 → P3
No longer blocks: fission
Assignee: nobody → kmadan
Type: enhancement → task
Priority: P3 → P2
Status: NEW → ASSIGNED
Blocks: 1527321
Depends on: 1561899
Fission Milestone: --- → M4

Since unload events aren't currently fired for OOP frames, we need to flip
mClosed prior to dispatching DOMWindowClose. We should eventually only call
BC::SetClosed in nsGlobalWindowOuter::FinalClose (after firing DOMWindowClose).

BrowsingContext currently uses mClosed in various locations under the
assumption that it is never actually flipped, so this should not land before
bug 1561899.

Attachment #9075487 - Attachment description: Bug 1516343 - Mark BrowsingContext as closed in nsGlobalWindowOuter::{CloseOuter,ForceClose}, r=nika → Bug 1516343 - Set mClosed for the associated BrowsingContext in nsGlobalWindowOuter::FinalClose, r=nika

This work has exposed some odd window.close behaviour (particularly with how unload events are fired for cross process iframes), so we plan to hold off work on this until we clear things up.

No longer blocks: 1527321
Fission Milestone: M4 → M5

Kris might have already done this. Kris, please confirm.

Flags: needinfo?(kmaglione+bmo)
Assignee: kmadan → nobody
Status: ASSIGNED → NEW

Does this bug need to block Fission dogfooding (M5)?

Kris might have already done this. Kris, please confirm.

Even if the underlying code bug has been fixed, we need to remove peterv's FIXME comment mentioning this bug #:

https://searchfox.org/mozilla-central/rev/652014ca1183c56bc5f04daf01af180d4e50a91c/docshell/base/BrowsingContext.cpp#965-968

Priority: P2 → P3
Attachment #9075487 - Attachment is obsolete: true

Assigning to kmag to remove FIXME comment linked from comment 4. Tracking for Fission Nightly (M6) because removing the comment doesn't block dogfooding.

Nika wonders whether we will need to set mClosed synchronously without syncing for webcompat. We want to avoid this because this behavior is janky (but matches Chrome's implementation).

Assignee: nobody → kmaglione+bmo
Fission Milestone: M5 → M6

(In reply to Chris Peterson [:cpeterson] from comment #5)

Nika wonders whether we will need to set mClosed synchronously without syncing for webcompat. We want to avoid this because this behavior is janky (but matches Chrome's implementation).

We'll probably need this for bug 1620714.

See Also: → 1620714

Reassigning to Kashav because he is working on this.

M6a

Assignee: kmaglione+bmo → kmadan
Fission Milestone: M6 → M6a

We ended up needing to set BrowsingContext::Closed before actually sending DOMWindowClose for bug 1620714.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(kmaglione+bmo)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: