<?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>186610</bug_id>
          
          <creation_ts>2018-06-13 15:41:09 -0700</creation_ts>
          <short_desc>[WPE][GTK] Enable process swap on navigation to new origin</short_desc>
          <delta_ts>2019-06-23 10:55:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=186542</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>beidson</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>calvaris</cc>
    
    <cc>cdumez</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1432846</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-13 15:41:09 -0700</bug_when>
    <thetext>We should probably enable process swap on navigation to new origin for WPE/GTK. (...right?)

Hey Brady, could you help us understand:

 * Is there any reason we would NOT want to do this unconditionally? (It doesn&apos;t seem like something to expose public GTK/WPE API for.)
 * This is important because it&apos;s required for site isolation slash Spectre mitigation... right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432848</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-13 15:44:41 -0700</bug_when>
    <thetext>Patch is trivial:

diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
index b52591d625e..829734126bc 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
@@ -335,6 +335,7 @@ static void webkitWebContextConstructed(GObject* object)
     configuration.setInjectedBundlePath(WebCore::FileSystem::stringFromFileSystemRepresentation(bundleFilename.get()));
     configuration.setMaximumProcessCount(1);
     configuration.setDiskCacheSpeculativeValidationEnabled(true);
+    configuration.setProcessSwapsOnNavigation(true);
 
     WebKitWebContext* webContext = WEBKIT_WEB_CONTEXT(object);
     WebKitWebContextPrivate* priv = webContext-&gt;priv;

I tested this out and it sort of works. The navigation swap seems to occur as expected. However, back/forward list is broken: trying to navigate back past a process swap does not work properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432849</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-06-13 15:46:15 -0700</bug_when>
    <thetext>It is not enabled by default for COCOA yet. We are still working on layout test failures and then we&apos;ll have to work on performance. There is a cost to launching new processes (launch time and losing caches for e.g.).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1432861</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-13 16:10:09 -0700</bug_when>
    <thetext>OK, let&apos;s definitely delay until you think it&apos;s ready for Cocoa.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1547188</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-06-23 10:55:31 -0700</bug_when>
    <thetext>Enabled in r246148.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>