Bug 169495

Summary: Allow regular expressions to be used when selecting a process name in JSC config file
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, saam
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch saam: review+

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>