Bug 169387

Summary: Add plumbing to WebProcess to enable JavaScriptCore configuration and logging
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: WebKit2Assignee: 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
fpizlo: review+
Patch for landing - Speculative Windows build fix
none
Patch for landing - Speculative gtk build fix none

Description Michael Saboff 2017-03-08 14:43:20 PST
This is to add the ability to configure JavaScriptCore debug and logging from within the Web process through the presence of a configuration file.
Comment 1 Michael Saboff 2017-03-08 14:43:44 PST
<rdar://problem/30930797>
Comment 2 Michael Saboff 2017-03-08 15:08:40 PST
Created attachment 303852 [details]
Patch
Comment 3 WebKit Commit Bot 2017-03-08 15:10:44 PST
Attachment 303852 [details] did not pass style-queue:


ERROR: Source/WebCore/ForwardingHeaders/runtime/ConfigFile.h:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
ERROR: Source/JavaScriptCore/runtime/ConfigFile.cpp:469:  Missing space before {  [whitespace/braces] [5]
Total errors found: 2 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Geoffrey Garen 2017-03-09 12:34:59 PST
Comment on attachment 303852 [details]
Patch

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

> Source/JavaScriptCore/runtime/ConfigFile.cpp:39
> +#include <mutex>

This is the Windows build failure.

> Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:482
> +    path = path + "/Library/WebKit/JavaScriptConfig";

I would call this JavaScriptCoreDebug since it will include debug output in addition to configuration files.

We might need to make sure not to put anything in the Framework or app bundle, otherwise we might invalidate the bundle signature.
Comment 5 Michael Saboff 2017-03-09 13:17:19 PST
Created attachment 303972 [details]
Patch for landing - Speculative Windows build fix
Comment 6 Michael Saboff 2017-03-09 13:19:04 PST
(In reply to comment #4)
> Comment on attachment 303852 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=303852&action=review
> 
> > Source/JavaScriptCore/runtime/ConfigFile.cpp:39
> > +#include <mutex>
> 
> This is the Windows build failure.
> 
> > Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm:482
> > +    path = path + "/Library/WebKit/JavaScriptConfig";
> 
> I would call this JavaScriptCoreDebug since it will include debug output in
> addition to configuration files.
> 
> We might need to make sure not to put anything in the Framework or app
> bundle, otherwise we might invalidate the bundle signature.

I made these changes.  I also changed the name of the config file to JSC.config.
Comment 7 WebKit Commit Bot 2017-03-09 13:19:23 PST
Attachment 303972 [details] did not pass style-queue:


ERROR: Source/WebCore/ForwardingHeaders/runtime/ConfigFile.h:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
ERROR: Source/JavaScriptCore/runtime/ConfigFile.cpp:469:  Missing space before {  [whitespace/braces] [5]
Total errors found: 2 in 20 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Michael Saboff 2017-03-09 15:22:57 PST
Created attachment 304000 [details]
Patch for landing - Speculative gtk build fix
Comment 9 WebKit Commit Bot 2017-03-09 15:25:28 PST
Attachment 304000 [details] did not pass style-queue:


ERROR: Source/WebCore/ForwardingHeaders/runtime/ConfigFile.h:0:  No copyright message found.  You should have a line: "Copyright [year] <Copyright Owner>"  [legal/copyright] [5]
ERROR: Source/JavaScriptCore/runtime/ConfigFile.cpp:469:  Missing space before {  [whitespace/braces] [5]
Total errors found: 2 in 21 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Michael Saboff 2017-03-09 16:53:11 PST
Committed r213690: <http://trac.webkit.org/changeset/213690>