Open Bug 2098549 Opened 3 days ago Updated 3 days ago

Document the tab collection and lookup members of Tabbrowser

Categories

(Firefox :: Tabbed Browser, task)

task

Tracking

()

ASSIGNED

People

(Reporter: dao, Assigned: dao)

References

(Blocks 2 open bugs)

Details

Attachments

(3 external files)

Add JSDoc comments, with types, to the members of Tabbrowser that list a window's tabs, tab groups and split views, and that map between tabs, browsers, tab groups and process IDs (e.g. tabs, tabGroups, getTabForBrowser, getBrowserForTab, getTabGroupById, getTabPids).

Without them the type checker sees these parameters as any, and a reader has to work out from the implementation what each collection includes and what a failed lookup returns.

The rename of _awaitingSetURI initializes it to false and resets it to false instead of deleting it; its only reader, the popup notification suppression check in browser.js, tests it for truthiness.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED

Nothing outside Tabbrowser.sys.mjs reads _urlbarOverrideValueAtBeforeTabSwitch, initiatedFromNonWebControlled or _cachedCurrentURI, so this is behavior-neutral apart from the test assertion on the cache, which goes.

Typing getBrowserForTab and getTabForBrowser surfaces type errors at existing call sites. Their fixes are casts, parentElement for parentNode and a string attribute value, all behavior-neutral.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: