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 470830 d5c088330e6b
parent 470829 1c503530315e
child 470831 39f739efe104
push id9235
push userryanvm@gmail.com
push date2018-05-17 13:49 +0000
treeherdermozilla-beta@39f739efe104 [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);
     }