Bug 1462077 - Part 1: Make ServiceWorkerManager::DispatchFetchEvent() use the new client if we create one for an STS upgrade. r=asuth, a=RyanVM
authorBen Kelly <ben@wanderview.com>
Wed, 16 May 2018 14:18:36 -0700
changeset 473362 d5c088330e6b7f03294ba7ce1a6a917e4756f993
parent 473361 1c503530315ee29075684a9ad1d634fec6b4094f
child 473363 39f739efe10493ee1bc0da6e059bece3d32ae682
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth, RyanVM
bugs1462077
milestone61.0
Bug 1462077 - Part 1: Make ServiceWorkerManager::DispatchFetchEvent() use the new client if we create one for an STS upgrade. r=asuth, a=RyanVM
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);
     }