diff --git a/dom/clients/manager/ClientManagerService.cpp b/dom/clients/manager/ClientManagerService.cpp index 9baf17f854a2..0390b4a9536f 100644 --- a/dom/clients/manager/ClientManagerService.cpp +++ b/dom/clients/manager/ClientManagerService.cpp @@ -167,6 +167,18 @@ void ClientManagerService::Shutdown() { CopyableAutoTArray(mManagerList)) { Unused << PClientManagerParent::Send__delete__(actor); } + + // Destroying manager actors should've also destroyed all source actors, so + // the only sources left will be future sources, which need to be aborted. + for (auto& entry : mSourceTable) { + MOZ_RELEASE_ASSERT(entry.GetData().is()); + CopyableErrorResult rv; + rv.ThrowInvalidStateError("Client creation aborted."); + entry.GetModifiableData() + ->as() + .RejectPromiseIfExists(rv); + } + mSourceTable.Clear(); } ClientSourceParent* ClientManagerService::MaybeUnwrapAsExistingSource(