зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1847768 - Storage access API sometimes rejects instead of autogranting - r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D185686
This commit is contained in:
Родитель
693499c1ea
Коммит
f29b435076
|
@ -17318,10 +17318,12 @@ Document::CreatePermissionGrantPromise(
|
|||
if (!autoGrant) {
|
||||
p->Resolve(choice, __func__);
|
||||
} else {
|
||||
// We capture sapr here to prevent it from destructing
|
||||
// before the callbacks complete.
|
||||
sapr->MaybeDelayAutomaticGrants()->Then(
|
||||
GetCurrentSerialEventTarget(), __func__,
|
||||
[p, choice] { p->Resolve(choice, __func__); },
|
||||
[p] { p->Reject(false, __func__); });
|
||||
[p, sapr, choice] { p->Resolve(choice, __func__); },
|
||||
[p, sapr] { p->Reject(false, __func__); });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче