Bug 1718204 - Ensure that there's a content viewer in the docshell we're cloning a document into. r=jfkthame,layout-reviewers

The code below assumes that, and bug 1666247 was hitting assertions
because of that, see D116877.

Differential Revision: https://phabricator.services.mozilla.com/D118810
This commit is contained in:
Emilio Cobos Álvarez 2021-07-15 11:13:59 +00:00
Родитель a8dbc3a00f
Коммит 840d479807
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -5303,6 +5303,8 @@ Nullable<WindowProxyHolder> nsGlobalWindowOuter::Print(
MOZ_DIAGNOSTIC_ASSERT(cv);
} else {
if (aDocShellToCloneInto) {
// Ensure the content viewer is created if needed.
Unused << aDocShellToCloneInto->GetDocument();
bc = aDocShellToCloneInto->GetBrowsingContext();
} else {
AutoNoJSAPI nojsapi;