Bug 1283674 P0 Drop cached controlling ServiceWorker ref when ServiceWorkerContainer window is disconnect. r=baku
authorBen Kelly <ben@wanderview.com>
Mon, 04 Jul 2016 06:50:25 -0700
changeset 303500 b538dc963f3bd25044a26a88911e78c13236247f
parent 303499 98f89b57943876e8dac433773378d1e879509f6c
child 303501 a2fd213837b84fab63104d1ab5bb034909647c33
push id79106
push userbkelly@mozilla.com
push dateMon, 04 Jul 2016 13:50:34 +0000
treeherdermozilla-inbound@e28b6e2e44d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1283674
milestone50.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 1283674 P0 Drop cached controlling ServiceWorker ref when ServiceWorkerContainer window is disconnect. r=baku
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;