mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
[DOM] Deny web notifications if principal can't resolve.
This commit is contained in:
parent
058e936f62
commit
850464c616
1 changed files with 5 additions and 0 deletions
|
|
@ -1688,6 +1688,11 @@ Notification::GetPermissionInternal(nsISupports* aGlobal, ErrorResult& aRv)
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (!principal) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return NotificationPermission::Denied;
|
||||
}
|
||||
|
||||
return GetPermissionInternal(principal, aRv);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue