mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-29 17:31:07 +00:00
[DOM] Deny web notifications if principal can't resolve.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user