Summary: | RegExp properties should not depend on RegExp.input | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kevin Millikin <kmillikin> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED WORKSFORME | ||||||
Severity: | Normal | CC: | barraclough, dstorey | ||||
Priority: | P2 | Keywords: | HasReduction | ||||
Version: | 523.x (Safari 3) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Kevin Millikin
2007-12-19 04:26:10 PST
Created attachment 17989 [details] Test case MSIE 7 and Firefox 2.0.0.11 report "right" in both cases (as expected). Opera 9.24 reports "undefined" in both cases (apparently doesn't support these properties on their RegExp object). A local debug build of WebKit r28828 with Safari 3.0.4 (523.12) on Mac OS X 10.4.11 (8S165) reports "right" and "wrong". Not a regression from Safari 2.0.4 as it reports "undefined" for both values. Thanks for looking into this. It looks like all the deprecated properties of the RegExp constructor (lastMatch, leftContext, rightContext, lastParen, and $1 through $9) are computed lazily based on RegExp.input. However, RegExp.input is not necessarily the last matching subject string. Looks like this is a very old bug; this works fine in ToT. |