Bug 1511701 - Apply a band-aid null check for crashes happening in the wild. r=botond, a=RyanVM
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 14 Dec 2018 21:30:23 +0000
changeset 509044 d55ede8c39ff502e2e54cac78ef4be87256dd84c
parent 509043 97d55c66f8eeac0d8fa22e8338d4181b30dfccd3
child 509045 3df85c62c1d86e1f515f23f1b06268bdc14cfcda
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, RyanVM
bugs1511701
milestone65.0
Bug 1511701 - Apply a band-aid null check for crashes happening in the wild. r=botond, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D14621
gfx/layers/apz/src/APZCTreeManager.cpp
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -812,18 +812,20 @@ void APZCTreeManager::NotifyScrollbarDra
   controller->NotifyAsyncScrollbarDragInitiated(aDragBlockId, aGuid.mScrollId,
                                                 aDirection);
 }
 
 void APZCTreeManager::NotifyScrollbarDragRejected(
     const ScrollableLayerGuid& aGuid) const {
   RefPtr<GeckoContentController> controller =
       GetContentController(aGuid.mLayersId);
-  MOZ_ASSERT(controller);
-  controller->NotifyAsyncScrollbarDragRejected(aGuid.mScrollId);
+  MOZ_ASSERT(controller); // If you hit this crash and have STR, please file a bug!
+  if (controller) {
+    controller->NotifyAsyncScrollbarDragRejected(aGuid.mScrollId);
+  }
 }
 
 void APZCTreeManager::NotifyAutoscrollRejected(
     const ScrollableLayerGuid& aGuid) const {
   RefPtr<GeckoContentController> controller =
       GetContentController(aGuid.mLayersId);
   MOZ_ASSERT(controller);
   controller->NotifyAsyncAutoscrollRejected(aGuid.mScrollId);