mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Bug 1730120, close ContentViewer properly if initialization fails, r=nika a=RyanVM
This commit is contained in:
parent
6036639e99
commit
bf632ce22a
2 changed files with 4 additions and 2 deletions
|
|
@ -9353,7 +9353,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue