Bug 1592435 - Avoid a shutdown-crash during gtests. r=tnikkel

This is unrelated to this bug, I just ran into it while running the tests.

Differential Revision: https://phabricator.services.mozilla.com/D51201

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-10-31 01:02:08 +00:00
Родитель 68e7c55743
Коммит 4525952bde
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -21,10 +21,10 @@
#include "mozilla/dom/Touch.h" // for Touch
#include "mozilla/gfx/CompositorHitTestInfo.h"
#include "mozilla/gfx/LoggingConstants.h"
#include "mozilla/gfx/gfxVars.h" // for gfxVars
#include "mozilla/gfx/GPUParent.h" // for GPUParent
#include "mozilla/gfx/Logging.h" // for gfx::TreeLog
#include "mozilla/gfx/Point.h" // for Point
#include "mozilla/gfx/gfxVars.h" // for gfxVars
#include "mozilla/gfx/GPUParent.h" // for GPUParent
#include "mozilla/gfx/Logging.h" // for gfx::TreeLog
#include "mozilla/gfx/Point.h" // for Point
#include "mozilla/layers/APZSampler.h" // for APZSampler
#include "mozilla/layers/APZThreadUtils.h" // for AssertOnControllerThread, etc
#include "mozilla/layers/APZUpdater.h" // for APZUpdater
@ -3372,6 +3372,10 @@ bool APZCTreeManager::GetAPZTestData(LayersId aLayersId,
void APZCTreeManager::SendSubtreeTransformsToChromeMainThread(
const AsyncPanZoomController* aAncestor) {
if (!mRootNode) {
// Event dispatched during shutdown, after ClearTree().
return;
}
RefPtr<GeckoContentController> controller =
GetContentController(mRootLayersId);
if (!controller) {