mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 12:25:53 +00:00
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:
parent
45f17dde36
commit
bdb84347ee
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user