Closed Bug 1752546 Opened 3 years ago Closed 3 years ago

about:debugging doesn't update servers tab's URL for first navigation (away from about:newtab)

Categories

(DevTools :: about:debugging, defect)

defect

Tracking

(firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: whimboo, Assigned: jdescottes)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0 ID:20220123214850

Having the client connected via about:debugging to the server (like Firefox DevEdition) the first navigation within the first tab that shows about:newtab on the server side is not reflected under tabs for the client. When navigating the client still sees about:newtab and clicking that tab will fail because the underlying windowGlobal does no longer exist.

Julian mentioned that this is an old bug but I haven't found an existing bug so just filing it.

Thanks for filing!

The root cause of the issue is that we only refresh our tabs when we receive a "tabListChanged", coming from the root actor: https://searchfox.org/mozilla-central/rev/7056a708787621758bef9793a93aa7ca8375eeef/devtools/server/actors/root.js#311 . This event is a bit hard to track, but it should be driven from BrowserTabList and emitted after the following platform events:

  • "TabOpen"
  • "TabSelect"
  • "TabAttrModified"
  • "TabClose"
  • "pagetitlechanged"

I assume "pagetitlechanged" should react to navigations and page loads (even if it's a very unexpected way to monitor this)? At least it was probably the intent.

Note that we actually also have this issue with local tab debugging. But we usually don't see it because when we do local tab debugging, we select tabs back and forth to switch between the about:debugging tab and the target tab. And the tab selection will trigger a tabListChanged which will refresh the list.

Will try to see why "pagetitlechanged" doesn't behave as expected.

About:debugging seems to be the only consumer of the tabListChanged event at this point.
One of the internal events used by about:debugging was not properly handled. Added a minor fix to change that and added a new mochitest for about:debugging.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d026ced90bda [devtools] Update about:debugging tab list when a page navigates in the connected runtime r=bomsy
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: