Skip to content

[SameObject] for receiver seems wrong #365

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

Closed
annevk opened this issue Nov 9, 2016 · 9 comments
Closed

[SameObject] for receiver seems wrong #365

annevk opened this issue Nov 9, 2016 · 9 comments

Comments

@annevk
Copy link
Member

annevk commented Nov 9, 2016

How can receiver always return the same object? What happens when the browsing context goes away?

@tidoust
Copy link
Member

tidoust commented Nov 14, 2016

@annevk could you clarify what seems wrong?

The presentation.receiver attribute is set by the receiving user agent (the user agent that runs on the "second screen") to an instance of the PresentationReceiver interface when the receiving browsing context is created. That attribute does not exist in the controlling browsing context in particular.

Its value will never change while the receiving browsing context exists. The PresentationReceiver instance will go away when the receiving browsing context goes away, but then I would expect presentation (and navigator) to go away as well. Or does that fail to account for something?

In short, the spec uses [SameObject] to mean "whenever the app running in the receiving browsing context gets the attribute, it will get the same object".

@annevk
Copy link
Member Author

annevk commented Nov 14, 2016

Or does that fail to account for something?

It does. I can hold a reference to those objects while the browsing context could still go away.

@tidoust
Copy link
Member

tidoust commented Nov 14, 2016

Or does that fail to account for something?

It does. I can hold a reference to those objects while the browsing context could still go away.

Ah. How? What's the concrete set of steps that creates this possibility?

@annevk
Copy link
Member Author

annevk commented Nov 15, 2016

@tidoust e.g., remove an