You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[1.8>1.9] [MERGE #4607@boingoing] OS#14763260: Correctly update RegExp.$1 after RegExp.prototype.test matches and used a cached value
Merge pull request #4607 from boingoing:FixRegExpTestCache
Regression from #3802 - if we hit the cache, we don't update the Regex constructor object with the last match and so retrieving properties about the match from the regex constructor object fails.
Fixed by adding an invalidation mechanism to the `JavascriptRegExpConstructor`. If we hit the cache, we'll mark the Regex constructor object last match properties as invalidated and we will then compute them on-demand the first time they're needed.
Fixes:
https://microsoft.visualstudio.com/web/wi.aspx?id=14763260
// When we perform a regex test operation it's possible the result of the operation will be loaded from a cache and the match will not be computed and updated in the ctor.
83
+
// In that case we invalidate the last match stored in the ctor and will need to compute it before it will be accessible via $1 etc.
84
+
// Since we only do this for the case of RegExp.prototype.test cache hit, we know several things:
0 commit comments