mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1382335 - 4. Check for shutdown in more LayerViewSupport functions; r=esawin
Check for shutdown so we don't crash on accessing a null window pointer. MozReview-Commit-ID: FRky4dcuhrw
This commit is contained in:
parent
2725fc3827
commit
b70b6eb453
@ -365,7 +365,9 @@ public:
|
||||
: mWindow(aPtr, aWindow)
|
||||
, mNPZC(aNPZC)
|
||||
, mPreviousButtons(0)
|
||||
{}
|
||||
{
|
||||
MOZ_ASSERT(mWindow);
|
||||
}
|
||||
|
||||
~NPZCSupport()
|
||||
{}
|
||||
@ -827,7 +829,9 @@ public:
|
||||
: mWindow(aPtr, aWindow)
|
||||
, mCompositor(aInstance)
|
||||
, mCompositorPaused(true)
|
||||
{}
|
||||
{
|
||||
MOZ_ASSERT(mWindow);
|
||||
}
|
||||
|
||||
~LayerViewSupport()
|
||||
{}
|
||||
@ -859,6 +863,9 @@ private:
|
||||
void OnResumedCompositor()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (!mWindow) {
|
||||
return; // Already shut down.
|
||||
}
|
||||
|
||||
// When we receive this, the compositor has already been told to
|
||||
// resume. (It turns out that waiting till we reach here to tell
|
||||
@ -919,7 +926,9 @@ public:
|
||||
jni::Object::Param aSurface)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(mWindow);
|
||||
if (!mWindow) {
|
||||
return; // Already shut down.
|
||||
}
|
||||
|
||||
mSurface = aSurface;
|
||||
mWindow->CreateLayerManager(aWidth, aHeight);
|
||||
|
Loading…
x
Reference in New Issue
Block a user