mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Bug 604026 - Sync event loops in workers should be created only if compatible with the worker shutdown status
This commit is contained in:
parent
df880ae53f
commit
98546534b0
17 changed files with 102 additions and 56 deletions
|
|
@ -1881,7 +1881,7 @@ Notification::GetPermission(nsIGlobalObject* aGlobal, ErrorResult& aRv)
|
|||
MOZ_ASSERT(worker);
|
||||
RefPtr<GetPermissionRunnable> r =
|
||||
new GetPermissionRunnable(worker);
|
||||
r->Dispatch(aRv);
|
||||
r->Dispatch(Terminating, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return NotificationPermission::Denied;
|
||||
}
|
||||
|
|
@ -2484,7 +2484,7 @@ NotificationWorkerHolder::Notify(Status aStatus)
|
|||
RefPtr<CloseNotificationRunnable> r =
|
||||
new CloseNotificationRunnable(kungFuDeathGrip);
|
||||
ErrorResult rv;
|
||||
r->Dispatch(rv);
|
||||
r->Dispatch(Killing, rv);
|
||||
// XXXbz I'm told throwing and returning false from here is pointless (and
|
||||
// also that doing sync stuff from here is really weird), so I guess we just
|
||||
// suppress the exception on rv, if any.
|
||||
|
|
@ -2627,7 +2627,7 @@ Notification::ShowPersistentNotification(JSContext* aCx,
|
|||
worker->AssertIsOnWorkerThread();
|
||||
RefPtr<CheckLoadRunnable> loadChecker =
|
||||
new CheckLoadRunnable(worker, NS_ConvertUTF16toUTF8(aScope));
|
||||
loadChecker->Dispatch(aRv);
|
||||
loadChecker->Dispatch(Terminating, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue