partly import changes from tenfourfox:

- M1739352 M1732572(partial) M1717318(partial) M1586061 (03ffdeadb)
- M1737515 M1730120 M1737009 (fd2b82f13)
This commit is contained in:
2022-01-04 15:15:04 +08:00
parent 8becf49a7d
commit 3e837f054b
7 changed files with 47 additions and 5 deletions
+4
View File
@@ -9202,7 +9202,11 @@ nsDocShell::SetupNewViewer(nsIContentViewer* aNewViewer)
mContentViewer->SetNavigationTiming(mTiming);
if (NS_FAILED(mContentViewer->Init(widget, bounds))) {
nsCOMPtr<nsIContentViewer> viewer = mContentViewer;
viewer->Close(nullptr);
viewer->Destroy();
mContentViewer = nullptr;
mCurrentURI = nullptr;
NS_WARNING("ContentViewer Initialization failed");
return NS_ERROR_FAILURE;
}