Bug 903466 - eliminate static constructors in widget/android/; r=blassey

This commit is contained in:
Nathan Froyd 2013-08-09 11:21:51 -04:00
parent 9ebfa27137
commit 1199998558
3 changed files with 18 additions and 4 deletions

View File

@ -47,7 +47,7 @@ using namespace mozilla;
NS_IMPL_ISUPPORTS0(nsFilePickerCallback)
nsRefPtr<AndroidBridge> AndroidBridge::sBridge = nullptr;
StaticRefPtr<AndroidBridge> AndroidBridge::sBridge;
static unsigned sJavaEnvThreadIndex = 0;
static void JavaThreadDetachFunc(void *arg);
@ -1431,7 +1431,7 @@ namespace mozilla {
nsCOMPtr<nsIThread> mMainThread;
};
nsCOMPtr<TracerRunnable> sTracerRunnable;
StaticRefPtr<TracerRunnable> sTracerRunnable;
bool InitWidgetTracing() {
if (!sTracerRunnable)

View File

@ -421,7 +421,7 @@ public:
const int32_t aPort,
nsACString & aResult);
protected:
static nsRefPtr<AndroidBridge> sBridge;
static StaticRefPtr<AndroidBridge> sBridge;
nsTArray<nsCOMPtr<nsIMobileMessageCallback> > mSmsRequests;
// the global JavaVM

View File

@ -89,7 +89,21 @@ static bool gTryRealloc = true;
static class GLFunctions
{
public:
GLFunctions() : mInitialized(false)
MOZ_CONSTEXPR GLFunctions() : mInitialized(false),
fGetDisplay(nullptr),
fEGLGetError(nullptr),
fCreateImageKHR(nullptr),
fDestroyImageKHR(nullptr),
fImageTargetTexture2DOES(nullptr),
fBindTexture(nullptr),
fGLGetError(nullptr),
fGraphicBufferCtor(nullptr),
fGraphicBufferDtor(nullptr),
fGraphicBufferLock(nullptr),
fGraphicBufferLockRect(nullptr),
fGraphicBufferUnlock(nullptr),
fGraphicBufferGetNativeBuffer(nullptr),
fGraphicBufferReallocate(nullptr)
{
}