Closed
Bug 1119763
Opened 10 years ago
Closed 10 years ago
Service worker install event is fired every time a new window (?) is created for an already installed service worker
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ferjm, Unassigned)
References
Details
I am assuming that the expected behavior is that we should only get the install event once.
STR on Nightly (maple based build and browser.dom.window.dump.enabled):
- Run the browser from the command line.
- Open a tab and browse to https://ferjm.github.io/sw/app/index.html
- You should see this printed in the shell:
ServiceWorker: service_worker
MainPage: Registered
ServiceWorker: oninstall
ServiceWorker: Cache populated
ServiceWorker: onactivate
- Open a new tab, close the previous one and browse to https://ferjm.github.io/sw/app/index.html
- I believe you shouldn't see oninstall printed on the shell, but you do.
I tried disabling e10n, but I get the same behavior. This doesn't happen in Chrome Canary.
I see the same behavior on B2G (after adding the "network.disable.ipc.security" pref to make sw work OOP).
Could you debug before loading the second tab at http://hg.mozilla.org/projects/maple/file/f0e24ac546fb/dom/workers/ServiceWorkerManager.cpp#l558
Then check that registration is non-null and that the checks on line 560 and 561. If the same page has loaded again, it should succeed in all the checks and immediately return. If you could also post what the values of newest->GetScriptSpec(), mScriptSpec and mRegistration->mScriptSpec are for both tab 1 and tab 2?
It would be easiest to gdb on non-e10s. Thanks!
Flags: needinfo?(ferjmoreno)
Reporter | ||
Comment 2•10 years ago
|
||
Hello Nikhil, it seems that this is no longer an issue with the latest maple build (daaf06e2d4f6). Thanks!
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(ferjmoreno)
Resolution: --- → WORKSFORME
What heads did you use for the failure case and the success case. I didn't do anything, so it would be good to know.
Flags: needinfo?(ferjmoreno)
Reporter | ||
Comment 4•10 years ago
|
||
The failure was happening with rev https://hg.mozilla.org/projects/maple/rev/217342aa5d11 before baku's patches to persist service workers registration.
Flags: needinfo?(ferjmoreno)
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•