When running javascript: URIs in chrome, fall back on a null principal instead

of crashing.  Bug 328697, r=mrbkap, sr=jst
This commit is contained in:
bzbarsky%mit.edu 2006-04-08 01:46:29 +00:00
Родитель 45f17dde36
Коммит bdb84347ee
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -251,6 +251,10 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel)
if (principal) {
nsCOMPtr<nsIURI> uri;
rv = principal->GetURI(getter_AddRefs(uri));
if (!uri) {
rv = NS_ERROR_NOT_AVAILABLE;
}
if (NS_SUCCEEDED(rv)) {
nsCAutoString spec;
uri->GetSpec(spec);