mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1729458 - Part 3: Clean up future client sources during shutdown, r=asuth
Depends on D124800 Differential Revision: https://phabricator.services.mozilla.com/D125248
This commit is contained in:
parent
0c06ba67db
commit
8defd39d49
@ -167,6 +167,18 @@ void ClientManagerService::Shutdown() {
|
||||
CopyableAutoTArray<ClientManagerParent*, 16>(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<FutureClientSourceParent>());
|
||||
CopyableErrorResult rv;
|
||||
rv.ThrowInvalidStateError("Client creation aborted.");
|
||||
entry.GetModifiableData()
|
||||
->as<FutureClientSourceParent>()
|
||||
.RejectPromiseIfExists(rv);
|
||||
}
|
||||
mSourceTable.Clear();
|
||||
}
|
||||
|
||||
ClientSourceParent* ClientManagerService::MaybeUnwrapAsExistingSource(
|
||||
|
Loading…
Reference in New Issue
Block a user