Bug 1580241 - Fix usage of nsIDocShellTreeItem in nsDocShell::CanSavePresentation r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D56003
This commit is contained in:
Kannan Vijayan
2019-12-06 19:30:49 +00:00
parent 7c61732d5e
commit d68d8d22c1

View File

@@ -6896,9 +6896,7 @@ bool nsDocShell::CanSavePresentation(uint32_t aLoadType,
}
// Don't cache the content viewer if we're in a subframe.
nsCOMPtr<nsIDocShellTreeItem> root;
GetInProcessSameTypeParent(getter_AddRefs(root));
if (root && root != this) {
if (mBrowsingContext->GetParent()) {
return false; // this is a subframe load
}