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
|
||||
nsCOMPtr<nsIDocShellTreeItem> content;
|
||||
rv = GetContentShellById(contentAreaID.get(), getter_AddRefs(content));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
urlChar = ToNewCString(contentURL);
|
||||
if (urlChar) {
|
||||
nsUnescape(urlChar);
|
||||
contentURL.AssignWithConversion(urlChar);
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(content));
|
||||
webNav->LoadURI(contentURL.get(),
|
||||
if (NS_SUCCEEDED(rv) && content) {
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(content));
|
||||
if (webNav) {
|
||||
urlChar = ToNewCString(contentURL);
|
||||
if (urlChar) {
|
||||
nsUnescape(urlChar);
|
||||
contentURL.AssignWithConversion(urlChar);
|
||||
webNav->LoadURI(contentURL.get(),
|
||||
nsIWebNavigation::LOAD_FLAGS_NONE,
|
||||
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_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsXULWindow::AddChildWindow(nsIXULWindow *aChild)
|
||||
|
Loading…
Reference in New Issue
Block a user