зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1348874 - If origin is an opaque origin, reject promise with a TypeError, r=janv
This commit is contained in:
Родитель
1bffdaa737
Коммит
d1021ec94a
|
@ -287,6 +287,13 @@ ExecuteOpOnMainOrWorkerThread(nsIGlobalObject* aGlobal,
|
|||
nsCOMPtr<nsIPrincipal> principal = doc->NodePrincipal();
|
||||
MOZ_ASSERT(principal);
|
||||
|
||||
// Storage Standard 7. API
|
||||
// If origin is an opaque origin, then reject promise with a TypeError.
|
||||
if (principal->GetIsNullPrincipal()) {
|
||||
promise->MaybeReject(NS_ERROR_DOM_TYPE_ERR);
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
switch (aType) {
|
||||
case RequestResolver::Type::Persisted: {
|
||||
RefPtr<RequestResolver> resolver =
|
||||
|
|
Загрузка…
Ссылка в новой задаче