Bug 1200673 - Try to create the audio channel agent in the constructor for AutoNotifyAudioChannelAgent too; r=baku

Landed on a CLOSED TREE
This commit is contained in:
Ehsan Akhgari 2015-09-01 12:01:49 -04:00
parent 22d8871a7e
commit 59a54a96b2

View File

@ -130,7 +130,10 @@ public:
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
if (mShouldNotify) {
mElement->NotifyAudioChannelAgent(false);
// The audio channel agent may not exist now.
if (mElement->MaybeCreateAudioChannelAgent()) {
mElement->NotifyAudioChannelAgent(false);
}
}
}
~AutoNotifyAudioChannelAgent()