Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC considerations and user-visible changes in state #102

Closed
rakuco opened this issue Oct 22, 2018 · 3 comments
Closed

GC considerations and user-visible changes in state #102

rakuco opened this issue Oct 22, 2018 · 3 comments

Comments

@rakuco
Copy link

rakuco commented Oct 22, 2018

At the Devices and Sensors WG F2F at TPAC, w3c/wake-lock#128 tracks the problem of locks that currently cannot be released depending on how they are created.

The issue boils down to the fact that fixing that potentially involves describing some actions that must be performed when a lock is garbage collected, but that would also trigger changes to user-visible state (a WakeLocks active member would change). We had a similar problem in w3c/sensors#372, but for sensors there's no changes in object state that is visible to users.

We're wondering if there's a guideline for this kind of issue.

@domenic
Copy link
Member

domenic commented Oct 22, 2018

Isn't https://w3ctag.github.io/design-principles/#js-gc the guidance?

@littledan
Copy link
Contributor

I'm glad the design principles document that best practice. I agree that depending on GC should be avoided. However, I think that, given that WeakRefs is at has cross-browser consensus and is at Stage 2, we should revisit the strength of the guidance (see #100). WeakRefs leave open a much bigger space for observation of GC than the linked issue. And this leak seems intolerably bad.

@torgo
Copy link
Member

torgo commented Mar 30, 2020

Discussed on breakout 30-march-2020 and we think this has been addressed already in the document.

@torgo torgo closed this as completed Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants