I am not insisting on DontDelete. The thing I don't like: I think that if delete o.x returns true, then o.x must be undefined after that (either property was present and deleted, or it wasn't present at all).
Currently intercepted properties misbehave in this regard (but that is an interpretation, I know). And I bet if there would exist propertyIsDeletable method, we would return true, which is kind of lie. Ditto if Object.getOwnPropertyDescriptor worked on intercepted properties. Anyway, I am not insisting. yours, anton. On Fri, May 28, 2010 at 4:31 PM, Mads Sig Ager <[email protected]> wrote: > I don't think we should change anything in connection with DontDelete > here. If you want intercepted properties to be reflected in the delete > operator you need to specify a property deleter. If you do not V8 will > act as if the property is not here (by returning true on delete). > Similarly for ReadOnly I think. > > Cheers, -- Mads > > On Fri, May 28, 2010 at 1:54 PM, Anton Muhin <[email protected]> wrote: >> Of course. And I am going to add a layout test as well. >> >> I wonder if we should be even more restrictive. DontDelete seems a >> reasonable option for me, currently: >> >>> var s = document.body.style >>> delete s.color >> true >>> s.color >> "" >> >> But ReadOnly is probably too much. What do you think? >> >> yours, >> anton. >> >> On Thu, May 27, 2010 at 11:24 PM, <[email protected]> wrote: >>> I think this makes sense. LGTM. >>> >>> We should have a look at the V8 WebKit bindings and make sure that property >>> enumerator and query callbacks are always both defined and that they agree. >>> >>> http://codereview.chromium.org/2270005/show >>> >> > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
