Bug 255529 - start variable should be checked before being passed to RegularExpression.match()
Summary: start variable should be checked before being passed to RegularExpression.mat...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-04-17 09:42 PDT by Seija K.
Modified: 2024-06-04 12:46 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Seija K. 2023-04-17 09:42:20 PDT
The first iteration of regex.match is guaranteed to have start be less
than content.length(). This is because of the isEmpty check at the
beginning of the function, which means that the only time start should
be checked is when it changes. This also saves us a function call when
start is at the end of the content.
Comment 1 Radar WebKit Bug Importer 2023-04-24 09:43:19 PDT
<rdar://problem/108457928>
Comment 2 Ahmad Saleem 2024-06-04 12:46:44 PDT
PR - https://github.com/WebKit/WebKit/pull/12809