The non-standard properties on RegExp (eg. lastMatch, lastParen, leftContext, rightContext) are data properties in Safari, but accessor properties in current versions of Chrome, Firefox and Edge. Here's a simple repro: http://output.jsbin.com/yubojom On Chrome, Edge and Firefox it prints: RegExp.lastMatch: get,set,enumerable,configurable RegExp.lastParen: get,set,enumerable,configurable RegExp.leftContext: get,set,enumerable,configurable RegExp.rightContext: get,set,enumerable,configurable On Safari it prints: RegExp.lastMatch: value,writable,enumerable,configurable RegExp.lastParen: value,writable,enumerable,configurable RegExp.leftContext: value,writable,enumerable,configurable RegExp.rightContext: value,writable,enumerable,configurable Unfortunately, despite being widely supported, these APIs do not appear to be standardized (https://tc39.github.io/ecma262/#sec-regexp-constructor). The difference is unlikely to matter much in practice, but in theory it could cause interop issue. One specific (though rather special) example is here: https://github.com/GoogleChrome/confluence/issues/202. If it's trivial for JSC to change to match the other JS engines, perhaps it's worth doing?
Sorry, correction. They're data accessors on Edge 15 as well, they're just writable=true where safari is writable=false.
<rdar://problem/34873681>
(In reply to Rick Byers from comment #0) > Unfortunately, despite being widely supported, these APIs do not appear to > be standardized (https://tc39.github.io/ecma262/#sec-regexp-constructor). > The difference is unlikely to matter much in practice, but in theory it > could cause interop issue. One specific (though rather special) example is > here: https://github.com/GoogleChrome/confluence/issues/202. If it's > trivial for JSC to change to match the other JS engines, perhaps it's worth > doing? Thanks for the report. These APIs are now being standardized (https://github.com/tc39/proposal-regexp-legacy-features) as an accessors, and were implemented as such in r280460. *** This bug has been marked as a duplicate of bug 220233 ***