Closed Bug 1702712 Opened 3 years ago Closed 3 years ago

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

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Fission Milestone:M7a, firefox90 fixed)

RESOLVED FIXED
90 Branch
Fission Milestone M7a
Tracking Status
firefox90 --- fixed

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
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e95dfc09290c
[devtools] Emit debugger's reloaded event from DOCUMENT_EVENT's dom-complete instead of target's navigate. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: