Bug 1462077 P1 Make ServiceWorkerManager::DispatchFetchEvent() use the new client if we create one for an STS upgrade. r=asuth
authorBen Kelly <ben@wanderview.com>
Wed, 16 May 2018 14:18:36 -0700
changeset 418616 2bd63f2afbb7f93a428186f74b8c341668197e2f
parent 418615 4efe0fc2cd0ca4cb66ff364cf21e53f8f93b9967
child 418617 e5fb8f83dbf0037e87c35049570834acd7964259
push id34007
push usercsabou@mozilla.com
push dateThu, 17 May 2018 09:47:02 +0000
treeherdermozilla-central@8fb36531f7d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1462077
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 1462077 P1 Make ServiceWorkerManager::DispatchFetchEvent() use the new client if we create one for an STS upgrade. r=asuth
dom/serviceworkers/ServiceWorkerManager.cpp
--- a/dom/serviceworkers/ServiceWorkerManager.cpp
+++ b/dom/serviceworkers/ServiceWorkerManager.cpp
@@ -2213,16 +2213,18 @@ ServiceWorkerManager::DispatchFetchEvent
                            : SystemGroup::EventTargetFor(TaskCategory::Other);
 
           reservedClient.reset();
           reservedClient = ClientManager::CreateSource(ClientType::Window,
                                                        target,
                                                        principal);
 
           loadInfo->GiveReservedClientSource(Move(reservedClient));
+
+          clientInfo = loadInfo->GetReservedClientInfo();
         }
       }
 
       // First, attempt to mark the reserved client controlled directly.  This
       // will update the controlled status in the ClientManagerService in the
       // parent.  It will also eventually propagate back to the ClientSource.
       StartControllingClient(clientInfo.ref(), registration);
     }