Bug 1334465 - Set mIPCClosed to true before calling SendDeleteSelf in order to avoid race r=bagder

In the previous code, a race condition could cause us to call SendSetPriority() after calling SendDeleteSelf.

For example:
T1: SendDeleteSelf()
T2: if (!mIPCClosed) SendSetPriority()
T1: mIPCClosed = true

MozReview-Commit-ID: 3XOwCaphb2o

--HG--
extra : rebase_source : 609b9d111d97a8e4a60117dd79ecd741725ec611
This commit is contained in:
Valentin Gosu 2018-02-11 03:51:09 +01:00
Родитель c548fd9ae1
Коммит b7deca6e95
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -2292,8 +2292,8 @@ HttpChannelParent::UpdateAndSerializeSecurityInfo(nsACString& aSerializedSecurit
bool
HttpChannelParent::DoSendDeleteSelf()
{
bool rv = SendDeleteSelf();
mIPCClosed = true;
bool rv = SendDeleteSelf();
CleanupBackgroundChannel();