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

of crashing.  Bug 328697, r=mrbkap, sr=jst


git-svn-id: svn://10.0.0.236/trunk@193901 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-04-08 01:46:29 +00:00
parent 7c4038bbd0
commit bb70e37bca

View File

@@ -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);