<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>250539</bug_id>
          
          <creation_ts>2023-01-12 18:18:41 -0800</creation_ts>
          <short_desc>Web features should be able to bind to JSC Options</short_desc>
          <delta_ts>2023-01-12 19:56:28 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>247926</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Williams">emw</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>caitp</cc>
    
    <cc>justin_michaud</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1925209</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Williams">emw</who>
    <bug_when>2023-01-12 18:18:41 -0800</bug_when>
    <thetext>Currently there is no link between web features (declared in UnifiedWebPreferences.yaml, accessible to WebCore and WebKit) and JavaScriptCore options. These aren&apos;t 1:1, but there are some examples of situations where it would be valuable to use feature toggles to A/B test a JSC feature, or use the default values associated with feature status to control JSC&apos;s defaults (e.g. turning something on in testing and Safari Technology Preview, but not in stable browsers).

I propose we add an optional &quot;JavaScriptCoreBinding&quot; field to the preference generator, which maps a feature to a JSC option name. At web content process creation time, the UI process can pass these options as environment variables to JSC.

We can&apos;t set JSC options after the VM is initialized, so there&apos;s no way to wire up the WebCore::Settings machinery to change settings in a running page. But browsers can prompt users to restart or open a new tab. If we wanted to be more heavy-handed, we could do a WebProcessPool::terminateAllWebContentProcesses() to recreate all VMs in response to such a change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925215</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-12 19:56:28 -0800</bug_when>
    <thetext>&lt;rdar://problem/104207681&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>