On 2014/12/10 12:38:17, Dmitry Lomov (chromium) wrote:
On 2014/12/10 12:16:43, mathias wrote:
> 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?
`flags` call `this.global` and that throws since `this` in this case is
RegExp.prototype.
Ah, of course! Test removed.
Since none of the major ECMAScript engines seem to implement step 3 of
`RegExp.prototype.global`’s algorithm (and similar for the other
`RegExp.prototype` getters) maybe the spec should just be changed to reflect
reality. I’ve filed https://bugs.ecmascript.org/show_bug.cgi?id=3432 for
that.
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.