зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a54705b862
Коммит
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче