mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1172717 - Fail on UNKNOWN_APP_ID instead of crashing. r=bholley a=RyanVM
This commit is contained in:
parent
f1f794f19b
commit
29d8e53169
@ -2546,6 +2546,11 @@ ServiceWorkerManager::GetServiceWorkerRegistrationInfo(nsIPrincipal* aPrincipal,
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(aURI);
|
||||
|
||||
//XXXnsm Temporary fix until Bug 1171432 is fixed.
|
||||
if (NS_WARN_IF(BasePrincipal::Cast(aPrincipal)->AppId() == nsIScriptSecurityManager::UNKNOWN_APP_ID)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsAutoCString originAttributesSuffix;
|
||||
nsresult rv = PrincipalToScopeKey(aPrincipal, originAttributesSuffix);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
|
Loading…
Reference in New Issue
Block a user