The service worker job queue can get stuck sometimes, so we don't want the per-process service worker data structure to hold strong references to content. Instead, I add a proxy that is only a weak reference. The wrinkle is that we need to keep the promise alive as long as the job and the window are otherwise alive. I solve this by putting a cycle collected reference to the promise on the window itself. MozReview-Commit-ID: GbmCY4ZIQWk
1.5 KiB
1.5 KiB