Fix uses of nsHTMLDocument::StartDocumentLoad in dom/html/nsHTMLDocument.cpp
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
Fission Milestone | M7 |
People
(Reporter: djvj, Unassigned)
References
Details
(Whiteboard: [rm-docshell-tree-item:hard])
In file dom/html/nsHTMLDocument.cpp
Uses DocShell tree to get parent item.
Some of the code around this seems to have been fixed for Fission, e.g. the following fix within the call to Document::StartDocumentLoad https://bugzilla.mozilla.org/show_bug.cgi?id=1555050
Obtains the ContentViewer from either the current DocShell or the parent DocShell.
Users of Content-Viewer are conditionalized, and lack of one won’t crash. Might lead to failures in specific tests when the docshell content-viewer is null, and its parent is out of process.
Uses content-viewer exactly twice, here:
- https://searchfox.org/mozilla-central/rev/b2b0077c2e6a516a76bf8077d6f0237c58f5959a/dom/html/nsHTMLDocument.cpp#600
- In the call to TryUserForcedCharset, the content-viewer is only used for mailnews: https://searchfox.org/mozilla-central/rev/2a10f4812f3f7c7645d253a4fe52f26bf58e20e8/dom/html/nsHTMLDocument.cpp#239
- Other use is TryHintCharset here: https://searchfox.org/mozilla-central/rev/2a10f4812f3f7c7645d253a4fe52f26bf58e20e8/dom/html/nsHTMLDocument.cpp#206
- Gets and set charset hint-related data from the ContentViewer.
- Forward Charset Hint data during document creation process, and remove this code.
- IPC not advised.
Updated•5 years ago
|
Comment 1•4 years ago
|
||
Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.
Comment 4•4 years ago
|
||
Nika needinfoed me in the bug that was duplicated against this one. Replying here.
AFAICT, the only remaining use of "hint charset" is holding the encoding that the parser requested a switch to across a parser-triggered encoding reload:
https://searchfox.org/mozilla-central/source/docshell/base/nsDocShell.cpp#12205
Having this on the content viewer is unlikely to be ideal. However, we should have some mechanism for propagating the encoding into the new document load initiation when the parser asks for an encoding reload.
(Also, "hint charset" is a terribly underdescriptive name for this.)
Comment 5•3 years ago
|
||
I don't think the hint charset is likely to cause us issues across process boundaries anymore, so I'm going to close this for now.
Description
•