http://codereview.chromium.org/2819034/diff/1/8
File src/v8natives.js (right):

http://codereview.chromium.org/2819034/diff/1/8#newcode762
src/v8natives.js:762: !IS_UNDETECTABLE(obj)) {
On 2010/07/02 09:21:01, Mads Ager wrote:
On 2010/07/02 09:16:11, Rico wrote:
> On 2010/07/01 14:16:19, Erik Corry wrote:
> > You can't even ask an undetectable object whether it is
extensible?  Deep
> > undercover...
> I guess we could allow this - do we even allow people to add
properties to
> undetectable objects?
>

Undetectable objects behave in a special way only in a few situation
(such as
conversion to boolean). You can add and remove properties to
undetectable
objects and extensible should be orthogonal to undetectability. You
should allow
this for undetectable objects and we should have a test case for
undetectable
objects. :)


As discussed offline this is actually correct behavior, since we
explicitly do not throw an exception if this is undetectable. This is,
however, a pretty good indication that this is not very readable. I will
make another change that cleans this up for all methods in v8natives.js
and runtime.js (where there is actually a bug because of this).

I added a test for undetectable objects and these two methods. I will
add a bug for creating tests for the remaining methods and do this when
I return from vacation.

http://codereview.chromium.org/2819034/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to