Compartment/realm handling for various RegExp annex B functions/accessor functions appears to be wrong
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
People
(Reporter: Waldo, Unassigned)
References
(Blocks 1 open bug)
Details
Updating test262 hits a bunch of new test failures for /foo/.compile
and various RegExp.<prop>
accessors. Filing to get a bug number to cite when updating...
Reporter | ||
Comment 1•4 years ago
|
||
anba notes these tests are for the legacy-regexp feature, and for now at least (after bug 1670504 lands) we can just mark it as unsupported, so in some sense these are no longer failures (in that we won't have to list them in jstests.list manually).
Updated•4 years ago
|
Comment 2•4 years ago
|
||
I was looking into this and have a spec question. For something like get RegExp.prototype.dotAll
, step 3.a. says:
a. If SameValue(R, %RegExp.prototype%) is true, return undefined.
Is that condition only true if R
(this
) is equal to the same-realm %RegExp.prototype%
?
Comment 3•4 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #2)
Is that condition only true if
R
(this
) is equal to the same-realm%RegExp.prototype%
?
Yes. From https://tc39.es/ecma262/#sec-well-known-intrinsic-objects:
Within this specification a reference such as %name% means the intrinsic object, associated with the current realm, corresponding to the name.
Comment 4•4 years ago
|
||
I was a bit off-track in my previous comments. This is about the test introduced by #2650. This for the Legacy RegExp features in JavaScript proposal. These are for "static" getters like RegExp.lastMatch
. I opened bug 1675240 for the RegExp.prototype getters.
Description
•