зеркало из https://github.com/mozilla/gecko-dev.git
Bug 307310 - "crash [@ nsAbout::NewChannel]" [p=b.jacques@planet.nl (Bastiaan Jacques) r=timeless a1.9=schrep]
This commit is contained in:
Родитель
906552a37c
Коммит
305f28b0a9
|
@ -54,21 +54,20 @@ nsAbout::NewChannel(nsIURI *aURI, nsIChannel **result)
|
|||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIIOService> ioService(do_GetService(NS_IOSERVICE_CONTRACTID, &rv));
|
||||
if ( NS_FAILED(rv) )
|
||||
return rv;
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIChannel> tempChannel;
|
||||
rv = ioService->NewChannel(NS_LITERAL_CSTRING(kURI), nsnull, nsnull, getter_AddRefs(tempChannel));
|
||||
rv = ioService->NewChannel(NS_LITERAL_CSTRING(kURI), nsnull, nsnull,
|
||||
getter_AddRefs(tempChannel));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIScriptSecurityManager> securityManager =
|
||||
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
rv = securityManager->GetCodebasePrincipal(aURI, getter_AddRefs(principal));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsISupports> owner = do_QueryInterface(principal);
|
||||
rv = tempChannel->SetOwner(owner);
|
||||
|
|
Загрузка…
Ссылка в новой задаче