diff --git a/dom/base/nsGlobalWindowOuter.cpp b/dom/base/nsGlobalWindowOuter.cpp index e5304acbe575..d2066476b688 100644 --- a/dom/base/nsGlobalWindowOuter.cpp +++ b/dom/base/nsGlobalWindowOuter.cpp @@ -5303,6 +5303,8 @@ Nullable 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;