mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Backed out changeset 21a5c9152c3b (bug 1183925) for B2G debug mochitest crashes.
This commit is contained in:
parent
52428897a6
commit
1ec1df2206
@ -207,7 +207,8 @@ NS_IMPL_ADDREF(AudioChannelService)
|
||||
NS_IMPL_RELEASE(AudioChannelService)
|
||||
|
||||
AudioChannelService::AudioChannelService()
|
||||
: mDefChannelChildID(CONTENT_PROCESS_ID_UNKNOWN)
|
||||
: mDisabled(false)
|
||||
, mDefChannelChildID(CONTENT_PROCESS_ID_UNKNOWN)
|
||||
, mTelephonyChannel(false)
|
||||
, mContentOrNormalChannel(false)
|
||||
, mAnyChannel(false)
|
||||
@ -237,6 +238,10 @@ void
|
||||
AudioChannelService::RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
|
||||
AudioChannel aChannel)
|
||||
{
|
||||
if (mDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint64_t windowID = aAgent->WindowID();
|
||||
AudioChannelWindow* winData = GetWindowData(windowID);
|
||||
if (!winData) {
|
||||
@ -267,6 +272,10 @@ AudioChannelService::RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
|
||||
void
|
||||
AudioChannelService::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent)
|
||||
{
|
||||
if (mDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
AudioChannelWindow* winData = GetWindowData(aAgent->WindowID());
|
||||
if (!winData) {
|
||||
return;
|
||||
@ -457,8 +466,8 @@ AudioChannelService::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
if (!strcmp(aTopic, "xpcom-shutdown")) {
|
||||
mDisabled = true;
|
||||
mWindows.Clear();
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
@ -43,6 +43,11 @@ public:
|
||||
*/
|
||||
static already_AddRefed<AudioChannelService> GetOrCreate();
|
||||
|
||||
/**
|
||||
* Shutdown the singleton.
|
||||
*/
|
||||
static void Shutdown();
|
||||
|
||||
static bool IsAudioChannelMutedByDefault();
|
||||
|
||||
/**
|
||||
@ -131,11 +136,6 @@ private:
|
||||
AudioChannelService();
|
||||
~AudioChannelService();
|
||||
|
||||
/**
|
||||
* Shutdown the singleton.
|
||||
*/
|
||||
static void Shutdown();
|
||||
|
||||
void MaybeSendStatusUpdate();
|
||||
|
||||
bool ContentOrNormalChannelIsActive();
|
||||
@ -204,6 +204,8 @@ private:
|
||||
nsTArray<SpeakerManagerService*> mSpeakerManager;
|
||||
#endif
|
||||
|
||||
bool mDisabled;
|
||||
|
||||
nsCOMPtr<nsIRunnable> mRunnable;
|
||||
|
||||
uint64_t mDefChannelChildID;
|
||||
|
@ -435,6 +435,8 @@ nsLayoutStatics::Shutdown()
|
||||
nsHyphenationManager::Shutdown();
|
||||
nsDOMMutationObserver::Shutdown();
|
||||
|
||||
AudioChannelService::Shutdown();
|
||||
|
||||
DataStoreService::Shutdown();
|
||||
|
||||
ContentParent::ShutDown();
|
||||
|
Loading…
Reference in New Issue
Block a user