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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user