summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-09-07 20:28:40 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-09-07 20:31:48 -0400
commite4582843fbe48240ba1a87a4d4046d9680dd7b21 (patch)
tree5b64c1e91a1e0b427d4ad3d91bac6464860bce84
parentff663c33008e9187247d3c61bf939d14790cbf5f (diff)
downloadaura-central-e4582843fbe48240ba1a87a4d4046d9680dd7b21.tar.gz
backport mozbug 1350090: Turn off the spammy warning that goes off every time we create an about:blank content viewer; r=mystor
During a debug session, log spam appears because we are trying to get the origin out of a principal for about:blank, which will throw, which is expected.
-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);