summaryrefslogtreecommitdiffstats
path: root/extensions/cookie/nsPermissionManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/cookie/nsPermissionManager.cpp')
-rw-r--r--extensions/cookie/nsPermissionManager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp
index 1f3c257dd..13ae7fd35 100644
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -107,7 +107,11 @@ nsresult
GetOriginFromPrincipal(nsIPrincipal* aPrincipal, nsACString& aOrigin)
{
nsresult rv = aPrincipal->GetOriginNoSuffix(aOrigin);
- NS_ENSURE_SUCCESS(rv, rv);
+ // The principal may belong to the about:blank content viewer, so this can be
+ // expected to fail.
+ if (NS_FAILED(rv)) {
+ return rv;
+ }
nsAutoCString suffix;
rv = aPrincipal->GetOriginSuffix(suffix);