Open Bug 1702712 Opened 1 month ago Updated 2 days ago

Fix debugger's "reloaded" event when doing a bfcache navigation

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Fission Milestone:M7a)

ASSIGNED
Fission Milestone M7a

People

(Reporter: ochameau, Assigned: bomsy)

References

(Blocks 3 open bugs)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(1 file)

Followup from: https://phabricator.services.mozilla.com/D106298#3596491

I think this one failure is specific to bfcache as we target switch to an already loaded document and so navigate won't fire.
For top level target switching, unless the document loads super fast, it should not happen. But theoriticaly it may also happen.

The reloaded event is sent from here:
https://searchfox.org/mozilla-central/rev/54f37fc1ac0f98b590af51e01ce82bb74179bf63/devtools/client/debugger/src/actions/navigation.js#57
And is bound to "navigate" from here:
https://searchfox.org/mozilla-central/rev/54f37fc1ac0f98b590af51e01ce82bb74179bf63/devtools/client/debugger/src/client/firefox.js#110

We could probably fix that by using DOCUMENT_EVENT's dom-complete.
Note that once we have one target per WindowGlobal (when target.followWindowGlobalLifecycle=true), it would be easier to have a "loaded" or "navigated" or "domComplete" promise on target, which would resolve once the document is done loading. But for now, as each target may load many documents, we will have to rely on many possible events.

Whiteboard: dt-fission-m3-triage
Blocks: dbg-fission
Severity: -- → S3
Priority: -- → P3
Fission Milestone: --- → M7a
Whiteboard: dt-fission-m3-triage → dt-fission-m3-mvp
Blocks: 1632141

Note that browser_toolbox_window_title_changes.js was failing because of the missing reloaded event.

Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.