mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1216945 - Uninitialised value use in nsXULWindow::SizeShellTo. r=bzbarsky.
This commit is contained in:
parent
4b5bb1380b
commit
03a524fde7
@ -1025,9 +1025,12 @@ void nsXULWindow::OnChromeLoaded()
|
||||
nsCOMPtr<nsIDocShellTreeOwner> treeOwner;
|
||||
docShellAsItem->GetTreeOwner(getter_AddRefs(treeOwner));
|
||||
if (treeOwner) {
|
||||
int32_t width, height;
|
||||
cv->GetContentSize(&width, &height);
|
||||
treeOwner->SizeShellTo(docShellAsItem, width, height);
|
||||
// GetContentSize can fail, so initialise |width| and |height| to be
|
||||
// on the safe side.
|
||||
int32_t width = 0, height = 0;
|
||||
if (NS_SUCCEEDED(cv->GetContentSize(&width, &height))) {
|
||||
treeOwner->SizeShellTo(docShellAsItem, width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user