Fix usage of nsIDocShellTreeItem in nsDocShell::CanSavePresentation
Categories
(Core :: DOM: Navigation, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: djvj, Assigned: djvj)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rm-docshell-tree-item:simple])
Attachments
(1 file)
https://searchfox.org/mozilla-central/source/docshell/base/nsDocShell.cpp#7155
This should be a simple fix, but there is an existing confusion in the code here (it seems to be correct, but for the wrong reasons).
nsCOMPtr<nsIDocShellTreeItem> root;
GetInProcessSameTypeParent(getter_AddRefs(root));
if (root && root != this) {
return false; // this is a subframe load
}
The variable is called root
, and the code checks the variable using logic that would work if it was actually the root, but the variable is set to the parent docshell, which incidentally happens to also work under the logic (if the parent exists and returns non-null, then the root != this
condition will always be true anyway).
Getting back to the Fission fix - this should be changed to use the BrowsingContext to query for the same-type parent, and also change the code to call the variable parent
, and the conditional to simply if (parent) { ... }
.
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
This blocks toolkit/components/passwordmgr/test/mochitest/test_autofill_from_bfcache.html for fission.
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Pushed by kvijayan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dcd04d1caf93 Fix usage of nsIDocShellTreeItem in nsDocShell::CanSavePresentation r=kmag
Comment 4•4 years ago
|
||
bugherder |
Comment 5•4 years ago
|
||
(In reply to Neha Kochar [:neha] from comment #1)
This blocks toolkit/components/passwordmgr/test/mochitest/test_autofill_from_bfcache.html for fission.
Note that this bug didn't enable that test and it still fails with the fix.
Description
•