Bug 1283674 P0 Drop cached controlling ServiceWorker ref when ServiceWorkerContainer window is disconnect. r=baku a=lizzard
authorBen Kelly <ben@wanderview.com>
Wed, 06 Jul 2016 06:17:42 -0700
changeset 339842 b1ca8e34a9194e4e810d16293af38f50b8e075e8
parent 339841 80731111fb5b08b41cca3efd44ead5d97894902d
child 339843 fd3a743ee4e5ffcaf3cea99a7a2ce41af678ae17
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku, lizzard
bugs1283674
milestone49.0a2
Bug 1283674 P0 Drop cached controlling ServiceWorker ref when ServiceWorkerContainer window is disconnect. r=baku a=lizzard
dom/workers/ServiceWorkerContainer.cpp
--- a/dom/workers/ServiceWorkerContainer.cpp
+++ b/dom/workers/ServiceWorkerContainer.cpp
@@ -64,16 +64,17 @@ ServiceWorkerContainer::ServiceWorkerCon
 ServiceWorkerContainer::~ServiceWorkerContainer()
 {
   RemoveReadyPromise();
 }
 
 void
 ServiceWorkerContainer::DisconnectFromOwner()
 {
+  mControllerWorker = nullptr;
   RemoveReadyPromise();
   DOMEventTargetHelper::DisconnectFromOwner();
 }
 
 void
 ServiceWorkerContainer::ControllerChanged(ErrorResult& aRv)
 {
   mControllerWorker = nullptr;