зеркало из https://github.com/mozilla/pjs.git
Bug #12198 --> bullet proof this code. return if we don't have a nsIURI instead of trying to dereference it. r=sspitzer
This commit is contained in:
Родитель
48e4116d09
Коммит
03e702040e
|
@ -2133,6 +2133,8 @@ nsWebShell::LoadURI(nsIURI * aUri,
|
|||
CancelRefreshURITimers();
|
||||
nsXPIDLCString scheme, CUriSpec;
|
||||
|
||||
if (!aUri) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
rv = aUri->GetScheme(getter_Copies(scheme));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = aUri->GetSpec(getter_Copies(CUriSpec));
|
||||
|
|
|
@ -2133,6 +2133,8 @@ nsWebShell::LoadURI(nsIURI * aUri,
|
|||
CancelRefreshURITimers();
|
||||
nsXPIDLCString scheme, CUriSpec;
|
||||
|
||||
if (!aUri) return NS_ERROR_NULL_POINTER;
|
||||
|
||||
rv = aUri->GetScheme(getter_Copies(scheme));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = aUri->GetSpec(getter_Copies(CUriSpec));
|
||||
|
|
Загрузка…
Ссылка в новой задаче