From 9231dfc6ed8b8ee3a3b7dc9bd9025c48c81909fe Mon Sep 17 00:00:00 2001 From: Gerald Squelart Date: Wed, 19 Apr 2017 15:48:32 +1200 Subject: [PATCH] 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 --- dom/media/gmp/GMPServiceChild.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dom/media/gmp/GMPServiceChild.cpp b/dom/media/gmp/GMPServiceChild.cpp index 81edd4d3a708..1f838f028369 100644 --- a/dom/media/gmp/GMPServiceChild.cpp +++ b/dom/media/gmp/GMPServiceChild.cpp @@ -426,6 +426,7 @@ GeckoMediaPluginServiceChild::RemoveGMPContentParent(GMPContentParent* aGMPConte if (mServiceChild) { mServiceChild->RemoveGMPContentParent(aGMPContentParent); if (mShuttingDownOnGMPThread && !mServiceChild->HaveContentParents()) { + mServiceChild->Close(); mServiceChild = nullptr; } }