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.
This commit is contained in:
Gaming4JC 2018-09-07 20:28:40 -04:00 committed by Roy Tam
commit fdec621f51

View file

@ -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);