Bug 169495 - Allow regular expressions to be used when selecting a process name in JSC config file
Summary: Allow regular expressions to be used when selecting a process name in JSC con...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-10 17:13 PST by Michael Saboff
Modified: 2017-03-11 22:27 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.19 KB, patch)
2017-03-10 17:16 PST, Michael Saboff
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2017-03-10 17:13:12 PST
Currently process names filters need to match exactly.  It would be better to allow for regular expression matching.
Comment 1 Michael Saboff 2017-03-10 17:13:30 PST
<rdar://problem/30986750>
Comment 2 Michael Saboff 2017-03-10 17:16:01 PST
Created attachment 304104 [details]
Patch
Comment 3 Saam Barati 2017-03-10 17:29:21 PST
Comment on attachment 304104 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=304104&action=review

LGTM

> Source/JavaScriptCore/runtime/ConfigFile.cpp:148
> +        char* stringStart = ++m_srcPtr;

Should you `--m_srcPtr` if the below returns nullptr?
Or perhaps, just do, stringStart = m_srcPtr + 1, and then modify m_srcPtr on success?
Comment 4 Michael Saboff 2017-03-11 22:16:24 PST
Comment on attachment 304104 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=304104&action=review

>> Source/JavaScriptCore/runtime/ConfigFile.cpp:148
>> +        char* stringStart = ++m_srcPtr;
> 
> Should you `--m_srcPtr` if the below returns nullptr?
> Or perhaps, just do, stringStart = m_srcPtr + 1, and then modify m_srcPtr on success?

Good catch.  I'll address with "stringStart = m_srcPtr + 1" before landing.
Comment 5 Michael Saboff 2017-03-11 22:27:52 PST
Committed r213768: <http://trac.webkit.org/changeset/213768>