Skip to content

Commit

Permalink
Bug 1278574 - [2.2] Instantiate MediaPrefs on Android during AndroidB…
Browse files Browse the repository at this point in the history
…ridge construction. r=jya
  • Loading branch information
Eugen Sawin committed Jun 23, 2016
1 parent 72fbf11 commit 52dd796
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions layout/build/nsLayoutStatics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ nsLayoutStatics::Initialize()
Servo_Initialize();
#endif

#ifndef MOZ_WIDGET_ANDROID
// On Android, we instantiate it when constructing AndroidBridge.
MediaPrefs::GetSingleton();
#endif

return NS_OK;
}

Expand Down
2 changes: 2 additions & 0 deletions widget/android/AndroidBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "mozilla/UniquePtr.h"
#include "mozilla/dom/ContentChild.h"
#include "nsIObserverService.h"
#include "MediaPrefs.h"

using namespace mozilla;
using namespace mozilla::gfx;
Expand Down Expand Up @@ -169,6 +170,7 @@ AndroidBridge::ConstructBridge()
MOZ_ASSERT(!sBridge);
sBridge = new AndroidBridge();

MediaPrefs::GetSingleton();
}

void
Expand Down

0 comments on commit 52dd796

Please sign in to comment.