Bug 1140363 - fire recording-window-ended on gUM failures, like we do on deny r=jesup

This commit is contained in:
Jan-Ivar Bruaroey 2015-03-06 13:23:33 -05:00
parent 197a72de9d
commit a3c50f7ac2

View File

@ -1098,6 +1098,8 @@ public:
MOZ_ASSERT(!mOnFailure);
NS_DispatchToMainThread(runnable);
// Do after ErrorCallbackRunnable Run()s, as it checks active window list
NS_DispatchToMainThread(new GetUserMediaListenerRemove(mWindowID, mListener));
}
void
@ -1154,11 +1156,8 @@ public:
manager->RemoveFromWindowList(mWindowID, mListener);
} else {
// This will re-check the window being alive on main-thread
// Note: we must remove the listener on MainThread as well
// and remove the listener on MainThread as well
Fail(aName, aMessage);
// MUST happen after ErrorCallbackRunnable Run()s, as it checks the active window list
NS_DispatchToMainThread(new GetUserMediaListenerRemove(mWindowID, mListener));
}
MOZ_ASSERT(!mOnSuccess);