From: rossb...@chromium.org
Date: Wed, 07 Nov 2012 14:05:54 +0000
Local: Wed, Nov 7 2012 9:05 am
Subject: Re: Object.observe: include oldValue in change records, (issue 11362115)
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> Asking for oldValues for interceptors (or in fact even notifying about
Changed.
changes > to intercepted properties) is going to be a little surprising (though possibly > useful). I didn't notice that the last change handled this. I believe this means > that > Object.observe(document.body.style, ...) > document.body.style.background = 'something' > will emit a record that includes the old value of background. But of course we > won't be notified of any style changes that happen outside of script. Is this > really what we want? https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> On 2012/11/07 10:26:20, rafaelw wrote:
interceptors.
> > Consider using lookup.GetLazyValue()? Note: this would bypass > Might also bypass access checks, though, which I don't think is
right...
Access checks are already handled further up, I think.
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> Consider using lookup.GetLazyValue()? Note: this would bypass
interceptors.
Done, here and elsewhere. With a little tweak to that function
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> self->
Done.
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> self->
Done.
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> out of curiosity: how can it happen that new_attributes !=
old_attributes?
Right, I think it cannot in this case. Removed.
https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> Wouldn't it be less error-prone to make EnqueueChangeRecord a static
Probably, but the same is true for quite a few other methods. In the
method that > takes a handle in for the receiver? face of that, I favour consistency, at least for the time being. https://chromiumcodereview.appspot.com/11362115/diff/1/src/objects.cc...
> ditto: GetLazyValue()
Done.
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||