mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1611505. Remove now-unnecessary null-checks. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61007 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a54705b862
commit
2f0e749001
@ -428,18 +428,15 @@ bool nsScriptErrorBase::ComputeIsFromPrivateWindow(
|
||||
nsGlobalWindowInner* aWindow) {
|
||||
// Never mark exceptions from chrome windows as having come from private
|
||||
// windows, since we always want them to be reported.
|
||||
// winPrincipal needs to be null-checked - Bug 1601175
|
||||
nsIPrincipal* winPrincipal = aWindow->GetPrincipal();
|
||||
return aWindow->IsPrivateBrowsing() &&
|
||||
(!winPrincipal || !winPrincipal->IsSystemPrincipal());
|
||||
return aWindow->IsPrivateBrowsing() && !winPrincipal->IsSystemPrincipal();
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool nsScriptErrorBase::ComputeIsFromChromeContext(
|
||||
nsGlobalWindowInner* aWindow) {
|
||||
nsIPrincipal* winPrincipal = aWindow->GetPrincipal();
|
||||
// winPrincipal needs to be null-checked - Bug 1601175
|
||||
return (winPrincipal && winPrincipal->IsSystemPrincipal());
|
||||
return winPrincipal->IsSystemPrincipal();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsScriptError, nsIConsoleMessage, nsIScriptError)
|
||||
|
Loading…
Reference in New Issue
Block a user