From 12d00a2d709b86a7ca33792b47e5fae6648a1694 Mon Sep 17 00:00:00 2001 From: JerryShih Date: Tue, 31 Oct 2017 13:52:41 +0800 Subject: [PATCH] Bug 1413043 - check WR enabling status before the WR calls. r=pchang MozReview-Commit-ID: 29mkllmDQ0L --- gfx/thebes/gfxPlatform.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index a1d52a4f7137..8c4b4de6cb91 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -1008,6 +1008,10 @@ gfxPlatform::Shutdown() gfx::Factory::ShutDown(); + if (gfxConfig::IsEnabled(Feature::WEBRENDER)) { + mozilla::wr::wr_shutdown_external_log_handler(); + } + delete gGfxPlatformPrefsLock; gfxVars::Shutdown(); @@ -1016,8 +1020,6 @@ gfxPlatform::Shutdown() gfxConfig::Shutdown(); - mozilla::wr::wr_shutdown_external_log_handler(); - gPlatform->WillShutdown(); delete gPlatform;