Closed Bug 1402314 Opened 7 years ago Closed 7 years ago

easy to leak a window with navigator.serviceWorker.ready promise

Categories

(Core :: DOM: Service Workers, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bkelly, Assigned: bkelly)

References

(Blocks 1 open bug)

Details

(Whiteboard: [memShrink])

Attachments

(2 files, 1 obsolete file)

This test site will end up leaking a window:

https://sw-never-ready.glitch.me/

It basically just blocking on navigator.serviceWorker.ready in a situation where a service worker never becomes active for the scope.
Actually, I can't reproduce this now.  Looking at the code it does clean up the ready promise when the window is closed:

https://searchfox.org/mozilla-central/source/dom/workers/ServiceWorkerContainer.cpp#73
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Attached patch bug1402314_p2_mochitest.patch (obsolete) — Splinter Review
For posterity, here are the tests I tried to write before realizing this WORKSFORME.
Attachment #8911306 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: