Bug 1639145 - Add nullptr check to CompositorBridgeParent::NotifyWebRenderContextPurge() r=jrmuizel
authorsotaro <sotaro.ikeda.g@gmail.com>
Wed, 20 May 2020 12:37:11 +0000
changeset 531225 9a840b47f67ab37a7f516c27601f82b3e1b86ba5
parent 531224 5415da14ec9a2f4749e8f405d6111a6f40e8138f
child 531226 4e643b6b3ad992eba4c9c9e16ba1f4410e0c1f15
push id37436
push userncsoregi@mozilla.com
push dateWed, 20 May 2020 21:30:50 +0000
treeherdermozilla-central@6c10970490f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1639145
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1639145 - Add nullptr check to CompositorBridgeParent::NotifyWebRenderContextPurge() r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D76074
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -2499,16 +2499,19 @@ mozilla::ipc::IPCResult CompositorBridge
 }
 
 bool CompositorBridgeParent::IsSameProcess() const {
   return OtherPid() == base::GetCurrentProcId();
 }
 
 void CompositorBridgeParent::NotifyWebRenderContextPurge() {
   MOZ_ASSERT(CompositorThread()->IsOnCurrentThread());
+  if (!mWrBridge) {
+    return;
+  }
   RefPtr<wr::WebRenderAPI> api = mWrBridge->GetWebRenderAPI();
   api->ClearAllCaches();
 }
 
 void CompositorBridgeParent::NotifyWebRenderDisableNativeCompositor() {
   MOZ_ASSERT(CompositorThread()->IsOnCurrentThread());
   if (mWrBridge) {
     mWrBridge->DisableNativeCompositor();