зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1197012 - Fix ThrowTypeError in Notification. r=mccr8
--HG-- extra : commitid : EfR8HuHT7WA extra : rebase_source : 9d713b3293a1b0e08f2be6015a81a179e4aa1c0e
This commit is contained in:
Родитель
c272f132ec
Коммит
d5c8bfc780
|
@ -2266,7 +2266,8 @@ Notification::ShowPersistentNotification(nsIGlobalObject *aGlobal,
|
|||
|
||||
if (NS_WARN_IF(NS_FAILED(loadChecker->Result()))) {
|
||||
if (loadChecker->Result() == NS_ERROR_NOT_AVAILABLE) {
|
||||
aRv.ThrowTypeError(MSG_NO_ACTIVE_WORKER);
|
||||
nsAutoString scope(aScope);
|
||||
aRv.ThrowTypeError(MSG_NO_ACTIVE_WORKER, &scope);
|
||||
} else {
|
||||
aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
}
|
||||
|
|
|
@ -688,7 +688,7 @@ ServiceWorkerRegistrationMainThread::ShowNotification(JSContext* aCx,
|
|||
|
||||
nsRefPtr<workers::ServiceWorker> worker = GetActive();
|
||||
if (!worker) {
|
||||
aRv.ThrowTypeError(MSG_NO_ACTIVE_WORKER);
|
||||
aRv.ThrowTypeError(MSG_NO_ACTIVE_WORKER, &mScope);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче