зеркало из https://github.com/mozilla/pjs.git
Fix for bug #60083. Check for QI return code and help prevent crashes. r=me sr=shaver
This commit is contained in:
Родитель
1cbd42df66
Коммит
e3d8c43eea
|
@ -461,8 +461,13 @@ GtkMozEmbedPrivate::OnChromeStateChange(nsIWebProgress *aWebProgress,
|
|||
{
|
||||
nsXPIDLCString uriString;
|
||||
nsCString chromeString;
|
||||
nsresult rv;
|
||||
// get the original URI for this
|
||||
nsCOMPtr <nsIChannel> channel = do_QueryInterface(aRequest);
|
||||
nsCOMPtr <nsIChannel> channel = do_QueryInterface(aRequest, &rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ERROR("Error querying request to nsIChannel");
|
||||
return rv;
|
||||
}
|
||||
nsCOMPtr <nsIURI> origURI;
|
||||
channel->GetOriginalURI(getter_AddRefs(origURI));
|
||||
origURI->GetSpec(getter_Copies(uriString));
|
||||
|
|
Загрузка…
Ссылка в новой задаче