Bug 1356516 - Close channel before destroying GMPServiceChild - r=billm

mServiceChild is a UniquePtr, so nulling it will destroy the GMPServiceChild,
which will destroy the associated message channel. So we need to close the
channel first before it gets destroyed. (Just as it was correctly done in
Observe() above.)

MozReview-Commit-ID: INuHN2Is7bC

--HG--
extra : rebase_source : 2a927bb06dd8fb4f1114dc0b64025cbdddc7c133
This commit is contained in:
Gerald Squelart 2017-04-19 15:48:32 +12:00
Родитель 75fd170e4c
Коммит 9231dfc6ed
1 изменённых файлов: 1 добавлений и 0 удалений

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

@ -426,6 +426,7 @@ GeckoMediaPluginServiceChild::RemoveGMPContentParent(GMPContentParent* aGMPConte
if (mServiceChild) {
mServiceChild->RemoveGMPContentParent(aGMPContentParent);
if (mShuttingDownOnGMPThread && !mServiceChild->HaveContentParents()) {
mServiceChild->Close();
mServiceChild = nullptr;
}
}