mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Fix Linux crash on nsnull pointer as part of blocker 123572 r=danm a=radha sr=sfraser
This commit is contained in:
parent
fea8c2b1e0
commit
527087c717
@ -1441,18 +1441,20 @@ void nsWebShellWindow::LoadContentAreas() {
|
|||||||
// see if we have a webshell with a matching contentAreaID
|
// see if we have a webshell with a matching contentAreaID
|
||||||
nsCOMPtr<nsIDocShellTreeItem> content;
|
nsCOMPtr<nsIDocShellTreeItem> content;
|
||||||
rv = GetContentShellById(contentAreaID.get(), getter_AddRefs(content));
|
rv = GetContentShellById(contentAreaID.get(), getter_AddRefs(content));
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv) && content) {
|
||||||
urlChar = ToNewCString(contentURL);
|
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(content));
|
||||||
if (urlChar) {
|
if (webNav) {
|
||||||
nsUnescape(urlChar);
|
urlChar = ToNewCString(contentURL);
|
||||||
contentURL.AssignWithConversion(urlChar);
|
if (urlChar) {
|
||||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(content));
|
nsUnescape(urlChar);
|
||||||
webNav->LoadURI(contentURL.get(),
|
contentURL.AssignWithConversion(urlChar);
|
||||||
|
webNav->LoadURI(contentURL.get(),
|
||||||
nsIWebNavigation::LOAD_FLAGS_NONE,
|
nsIWebNavigation::LOAD_FLAGS_NONE,
|
||||||
nsnull,
|
nsnull,
|
||||||
nsnull,
|
nsnull,
|
||||||
nsnull);
|
nsnull);
|
||||||
nsMemory::Free(urlChar);
|
nsMemory::Free(urlChar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ NS_IMETHODIMP nsXULWindow::GetContentShellById(const PRUnichar* aID,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsXULWindow::AddChildWindow(nsIXULWindow *aChild)
|
NS_IMETHODIMP nsXULWindow::AddChildWindow(nsIXULWindow *aChild)
|
||||||
|
Loading…
Reference in New Issue
Block a user