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

Clear Registration should call Update Registration State before Update Worker State #1270

Closed
wanderview opened this issue Feb 1, 2018 · 1 comment

Comments

@wanderview
Copy link
Member

We have two different algorithms for updating DOM objects on their various javascript threads:

  • Update Worker State sets the DOM object's .state value and fires a statechange event.
  • Update Registration State sets the DOM object's .installing, .waiting, and .active properties. It does not fire an event.

Both of these algorithms independently queue tasks to do the DOM object modifications.

In nearly all cases in the spec Update Registration State occurs before Update Worker State. This is good because it means the registration DOM objects will be in a consistent state the statechange event fires.

The Clear Registration algorithm, though, does things in the reverse order. It calls Update Worker State for moving each worker to the redundant state. It then calls Update Registration State afterwards to clear its reference on the registration DOM object.

I think this is wrong because it means the statechange event to redundant will fire while the worker is still visible on the registration.

@wanderview
Copy link
Member Author

Close in favor of #1273.

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

1 participant