Bug 1440465 - initialize more things in AutoPointerEventTargetUpdater; r=dholbert
authorNathan Froyd <froydnj@mozilla.com>
Wed, 28 Feb 2018 15:00:04 -0500
changeset 761268 cdb1de7522a998937acd695942aaa63f158357f4
parent 761267 341f20ef2627e0b19a324de14f9b32ed743bda92
child 761269 dcadcf486b78e82cb0cbf716be72805a489fc9a4
push id100926
push userrwood@mozilla.com
push dateWed, 28 Feb 2018 21:51:29 +0000
reviewersdholbert
bugs1440465
milestone60.0a1
Bug 1440465 - initialize more things in AutoPointerEventTargetUpdater; r=dholbert
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -555,16 +555,18 @@ class MOZ_STACK_CLASS AutoPointerEventTa
 public:
   AutoPointerEventTargetUpdater(PresShell* aShell,
                                 WidgetEvent* aEvent,
                                 nsIFrame* aFrame,
                                 nsIContent** aTargetContent)
   {
     MOZ_ASSERT(aEvent);
     if (!aTargetContent || aEvent->mClass != ePointerEventClass) {
+      // Make the destructor happy.
+      mTargetContent = nullptr;
       return;
     }
     MOZ_ASSERT(aShell);
     MOZ_ASSERT(aFrame);
     MOZ_ASSERT(!aFrame->GetContent() ||
                aShell->GetDocument() == aFrame->GetContent()->OwnerDoc());
 
     MOZ_ASSERT(PointerEventHandler::IsPointerEventEnabled());