On 2014/12/10 11:25:08, Dmitry Lomov (chromium) wrote:

https://codereview.chromium.org/770333005/diff/20001/test/mjsunit/harmony/reg...
> > test/mjsunit/harmony/regexp-flags.js:7: assertEquals('',
> > RegExp.prototype.flags);
> > On 2014/12/10 02:54:50, arv wrote:
> > > Shouldn't this throw since the prototype object does not have
> > [[OriginalFlags]]?
> > >
> > > I guess this is a really a bug in our implementation of
> > RegExp.prototype.global.
> > > But once/if we fix that then this test will start to fail.
> >
> > Ack. What do you want to do here – fix the separate bug later and leave
the
> test
> > for now? Or just remove this test?
>
> Remove the test. It is incorrect per spec.
> What you really want to test here is subclasses of RegExp but we do not
support
> that currently.

[Sorry that came out unclear:
- the test asserts the behavior that is contrary to the spec, so should be
removed
- subclassing comment is separate, not related to assertEquals('',
RegExp.prototype.flags line]

I’m confused. The spec for `RegExp.prototype.global` says:

3. If R does not have an [[OriginalFlags]] internal slot throw a TypeError
exception.

But `RegExp.prototype.flags` doesn’t seem to have such a restriction. What makes
you say this should throw?

https://codereview.chromium.org/770333005/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to