-
Notifications
You must be signed in to change notification settings - Fork 312
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
spec behavior when ServiceWorkerContainer parent client is dead #777
Comments
I guess to be more accurate, gecko is going to return a rejected promise, but we don't fire promise callbacks for closed windows. So the .catch() callback won't fire. |
It appears chrome canary returns undefined instead of a promise object in this case. |
The object is not destroyed, kinda sorta. Existing spec language assumes that all things leak forever and the browser never cleans anything up. Clearly that's not reasonable, so in practice browsers by and large implement different things which are not interoperable. Sometimes browsers are not internally consistent (e.g. treating removing an iframe from the DOM tree one way in terms of what happens to the Window currently in it and navigating the iframe in a different way, and closing a toplevel tab in yet a third way). Oh, and there may be some actual web compat constraints around this stuff for some APIs. I seem to recall that when Gecko tried turning off scripts altogether in a Window whose iframe has been removed from the DOM we ran into web compat issues. None of that helps you with your current situation, of course... |
https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/platform-architecture-dev/CaIci4Ezebs/9cpUzZ1yAgAJ has some recent blink discussion about this as well. |
F2F:
|
|
In Edge, the reference is emptied (that is, the object has no properties nor functions) when the window is closed. This means that you are not able to access anything which makes it not possible for us to fail by throwing an error or returning a rejected promise. |
Notes:
|
We move this to V2 to have more discussion and experiments. |
This is kind of a corner case, but I don't think the spec really handles it currently:
In this case we're calling .register() for a window that is already closed. I'm intending to reject with InvalidStateErr, but I guess it would be nice to spec it.
The text was updated successfully, but these errors were encountered: