mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00

When Fission is on, loading a cross-origin iframe triggers process switching when calling the channel::OnStartReqeust. If a ServiceWorker should intercept the loading, the interception setting is completed while opening the channel. That means the service worker controls the ClientSource created by the old process. After process switching completed, the new ClientSource will be created and resume the loading from the opened channel. However, in the original code, we did not update the controlled Client in the ServiceWorkerManager. And when loading the same origin subresource in the new process, it makes ServiceWorkerManager cannot find the correct ServiceWorker to perform the interception. Since we are going to release sw-e10s, this patch is only for both Fission and sw-e10s are on. Differential Revision: https://phabricator.services.mozilla.com/D49284 --HG-- extra : moz-landing-system : lando