Type the window and browser handles SessionStore.sys.mjs passes around
Categories
(Firefox :: Session Restore, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Several call sites hand a mozIDOMWindowProxy to a method taking a Window, a Window to one taking a ChromeWindow, an interface requestor without the cast to nsIInterfaceRequestor, an empty object where window state is expected, and a BrowsingContext read for properties its type doesn't declare. A few string and number mixups sit beside them: parseInt on a number, JSON.parse on a value that may already be parsed, and an undo_close trigger option the callee's option type doesn't list. Each is a local cast or a corrected annotation, and one or two may be real mismatches.
The module stays on the exclude list in browser/components/sessionstore/tsconfig.json until the last of the bugs splitting this work up takes it off.
| Assignee | ||
Comment 1•2 months ago
|
||
This is behavior-neutral apart from the four no-op methods on SHistoryListener: nsSHistory calls OnHistoryTruncate, OnDocumentViewerEvicted, OnHistoryCommit and OnEntryUpdated on every listener, and each of those calls used to fail in XPConnect because the JS listener lacked the method.
resetBrowserToLazyState now stores a literal 0 for userTypedClear. Only lazy browsers have that property, and the function returns early for them, so the read always yielded the default. selectTab drops parseInt because the session schema declares selected an integer.
Updated•2 months ago
|
Comment 3•1 month ago
|
||
| bugherder | ||
Updated•1 month ago
|
Description
•