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

[[Notifier]]'s realm depends on the caller of the GetNotifier abstract operation #8

Open
ajklein opened this issue Dec 15, 2014 · 6 comments

Comments

@ajklein
Copy link
Collaborator

ajklein commented Dec 15, 2014

[[Notifier]] is initialized to undefined when an object is created. This means that, for example:

// Realm1
var obj = {};

...

// Realm2
otherRealm.obj.foo = 'bar'

obj's [[Notifier]] is now in Realm 2, since GetNotifier is called by EnqueueChangeRecord.

Ideally the [[Notifier]] should belong to the same realm as the object, but this might have implementation difficulties in some engines.

@arv
Copy link
Owner

arv commented Dec 15, 2014

Like I said in #3, we could use the realm of the callback function. This probably means that we need some intermediate objects since we don't know the realm of an object and we don't know the realm until we get to the callback.

@ajklein
Copy link
Collaborator Author

ajklein commented Dec 15, 2014

Which callback function? Objects only have one notifier. Are you suggesting we give them multiple notifiers, one per realm that's observing them?

@arv
Copy link
Owner

arv commented Dec 15, 2014

Yes. That is isomorphic to what I was trying to say.

@ajklein
Copy link
Collaborator Author

ajklein commented Dec 15, 2014

Aha! Multiple notifier objects seems like it might be a bigger change...

@arv
Copy link
Owner

arv commented Dec 15, 2014

We can have a single [[Notifier]] but create the user observable objects in the same realms as the callback functions.

@arv
Copy link
Owner

arv commented Jan 20, 2015

Closing this in favor for #3

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

2 participants