Bug 1199901 - Clear mObserver when WorkerNotificationObserver is destroyed. r=wchen a=sylvestre
authorNikhil Marathe <nsm.nikhil@gmail.com>
Mon, 31 Aug 2015 13:17:13 -0700
changeset 289232 a04096cb27cc28b78897935815daf9c270572c35
parent 289231 45942620378f11bff0e31685fdddee679c82993c
child 289233 77863b95e7d673f1c805c6aaf5ada73b81fbbb2c
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswchen, sylvestre
bugs1199901
milestone42.0a2
Bug 1199901 - Clear mObserver when WorkerNotificationObserver is destroyed. r=wchen a=sylvestre
dom/notification/Notification.cpp
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -997,16 +997,18 @@ public:
   }
 
 protected:
   virtual ~WorkerNotificationObserver()
   {
     AssertIsOnMainThread();
 
     MOZ_ASSERT(mNotificationRef);
+    notification->mObserver = nullptr;
+
   }
 };
 
 NS_IMPL_ISUPPORTS_INHERITED0(WorkerNotificationObserver, NotificationObserver)
 
 class ServiceWorkerNotificationObserver final : public nsIObserver
 {
 public: