summaryrefslogtreecommitdiffstats
path: root/extensions/cookie
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
commit22bb99a3220272dd20b43d946741761c7efe37c5 (patch)
tree5b64c1e91a1e0b427d4ad3d91bac6464860bce84 /extensions/cookie
parentb728af02255cd35bf061f2ea11e2c028108d8b4a (diff)
downloadUXP-22bb99a3220272dd20b43d946741761c7efe37c5.tar
UXP-22bb99a3220272dd20b43d946741761c7efe37c5.tar.gz
UXP-22bb99a3220272dd20b43d946741761c7efe37c5.tar.lz
UXP-22bb99a3220272dd20b43d946741761c7efe37c5.tar.xz
UXP-22bb99a3220272dd20b43d946741761c7efe37c5.zip
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.
Diffstat (limited to 'extensions/cookie')
-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);