Bug 1469085 - Notification object is not released correctly on workers, r=asuth
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 15 Jun 2018 18:36:23 -0700
changeset 476995 00907af32292bb6d38b05c829cd3e7292092e0e5
parent 476994 d29e2de76c3981b66f469bbfb9c713d27895ed2e
child 476996 3c49d41af70aa67f119b154c41187691c02d599c
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1469085
milestone62.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 1469085 - Notification object is not released correctly on workers, r=asuth
dom/notification/Notification.cpp
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -419,16 +419,23 @@ public:
     , mNotification(aNotification)
   {}
 
   void
   WorkerRunInternal(WorkerPrivate* aWorkerPrivate) override
   {
     mNotification->ReleaseObject();
   }
+
+  nsresult
+  Cancel() override
+  {
+    mNotification->ReleaseObject();
+    return NS_OK;
+  }
 };
 
 // Create one whenever you require ownership of the notification. Use with
 // UniquePtr<>. See Notification.h for details.
 class NotificationRef final {
   friend class WorkerNotificationObserver;
 
 private: