diff options
author | Gaming4JC <g4jc@bulletmail.org> | 2018-09-07 20:28:40 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@bulletmail.org> | 2018-09-07 20:31:48 -0400 |
commit | 22bb99a3220272dd20b43d946741761c7efe37c5 (patch) | |
tree | 5b64c1e91a1e0b427d4ad3d91bac6464860bce84 /extensions | |
parent | b728af02255cd35bf061f2ea11e2c028108d8b4a (diff) | |
download | UXP-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')
-rw-r--r-- | extensions/cookie/nsPermissionManager.cpp | 6 |
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); |