WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 220233
151348
Nonstandard RegExp own properties do not observe invariability of nonwritable, nonconfigurable property
https://bugs.webkit.org/show_bug.cgi?id=151348
Summary
Nonstandard RegExp own properties do not observe invariability of nonwritable...
Claude Pache
Reported
2015-11-17 05:39:49 PST
Testcase:
> Object.getOwnPropertyDescriptor(RegExp, 'lastMatch')
< {value: "", writable: false, enumerable: true, configurable: false}
> /a/.exec('a')
> Object.getOwnPropertyDescriptor(RegExp, 'lastMatch')
< {value: "a", writable: false, enumerable: true, configurable: false} The value of the property changes even when it is marked as nonwritable and nonconfigurable. This must not be the case; for reference, see:
http://www.ecma-international.org/ecma-262/6.0/#sec-invariants-of-the-essential-internal-methods
paragraph [[GetOwnProperty]] (P), third bullet The best thing to do, here, is to use an accessor property.
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2021-07-23 16:52:52 PDT
Thank you for detailed report and your effort on
https://github.com/tc39/proposal-regexp-legacy-features
proposal, Claude! Legacy RegExp field are being turned into accessors in
https://bugs.webkit.org/show_bug.cgi?id=220233
. *** This bug has been marked as a duplicate of
bug 220233
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug