Bug 1730350 - Add comments to explains why !XRE_IsE10sParetnProcess() is needed in ClientManagerService. r=dom-worker-reviewers,asuth

Differential Revision: https://phabricator.services.mozilla.com/D125518
This commit is contained in:
Eden Chuang 2021-09-15 08:19:24 +00:00
Родитель a346591234
Коммит 963f6a7e85
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -337,6 +337,16 @@ void ClientManagerService::ForgetFutureSource(
return;
}
// For non-e10s case, ClientChannelHelperParent will be freed before real
// ClientSourceParnet be created. In the end this methoed will be called to
// release the FutureClientSourceParent. That means a ClientHandle operation
// which waits for the FutureClientSourceParent will have no chance to
// connect to the ClientSourceParent. So the FutureClientSourceParent should
// be keep in this case.
// IsAssociated() makes sure there is a ClientHandle operation associated
// with it.
// More details please refer
// https://bugzilla.mozilla.org/show_bug.cgi?id=1730350#c2
if (!XRE_IsE10sParentProcess() &&
entry.Data().as<FutureClientSourceParent>().IsAssociated()) {
return;