<?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>201033</bug_id>
          
          <creation_ts>2019-08-22 06:28:16 -0700</creation_ts>
          <short_desc>[GTK][WPE] WebKitWebPage ID doesn&apos;t match</short_desc>
          <delta_ts>2019-10-11 05:10:20 -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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=202847</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="Milan Crha">mcrha</reporter>
          <assigned_to name="Claudio Saavedra">csaavedra</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>berto</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cdumez</cc>
    
    <cc>cgarcia</cc>
    
    <cc>csaavedra</cc>
    
    <cc>ggaren</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1564026</commentid>
    <comment_count>0</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-22 06:28:16 -0700</bug_when>
    <thetext>This had been reported upstream here:
https://gitlab.gnome.org/GNOME/evolution/issues/587

Using Fedora rawhide with webkit2gtk3 2.25.x (from .2 to .4), when one tries to open two composer windows in Evolution the second composer lost track of the WebKitWebPage and claims that the WebKitWebProcess cannot find page with certain ID (interestingly, three independent runs and it&apos;s always number 22).

It&apos;s not only about the composer, I see the same when I run evolution in the Mail view, and switch to Contacts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564027</commentid>
    <comment_count>1</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-22 06:35:20 -0700</bug_when>
    <thetext>Looking more closely to this, it seems that each WebKitWebView instance runs its own WebKitWebProcess. This wasn&apos;t the case, it used to run one WebKitWebProcess per each WebKitWebContext. Evolution uses two WebKitWebContext-s, one for all previews and one for all the composers. Each of these two WebKitWebProcess-es load different set of web-extension-s and evolution talks to those through these extensions over D-Bus. The value used in the call of webkit_web_context_set_web_extensions_initialization_user_data() when the corresponding WebKitWebContext is used to distinguish between these two WebKitWebProcess-es, just as it had been intended. Evolution relies on this behavior heavily.

What did change in WebKit in this regard, please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564028</commentid>
    <comment_count>2</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-22 06:52:54 -0700</bug_when>
    <thetext>Maybe the default for webkit_web_context_set_web_process_count_limit() should be changed from 0 to 1, to keep backward compatibility? The properties of WebKitWebContext added in 2.26 do not seem related, thus it can be some fix around this count limit, I guess, which introduced the changed behaviour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564036</commentid>
    <comment_count>3</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 07:41:34 -0700</bug_when>
    <thetext>This might have gone under the radar, but the process limit has been made a no-op internally, which means that the API should be deprecated. See https://bugs.webkit.org/show_bug.cgi?id=193725

Instead there is a new API that might exposing, to set whether the process pool should use a single web process.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564038</commentid>
    <comment_count>4</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 07:45:26 -0700</bug_when>
    <thetext>&gt; Looking more closely to this, it seems that each WebKitWebView instance runs its own WebKitWebProcess.

This is something I need to investigate, as I think the default value of the internal SPI is FALSE so there shouldn&apos;t be only one web process per pool. I will check that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564049</commentid>
    <comment_count>5</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-22 08:10:58 -0700</bug_when>
    <thetext>(In reply to Claudio Saavedra from comment #3)
&gt; This might have gone under the radar, but the process limit has been made a
&gt; no-op internally

I see, I can confirm it, I changed the value to &apos;1&apos; with no effect.

(In reply to Claudio Saavedra from comment #4)
&gt; ..., as I think the default value of the internal SPI is FALSE so there
&gt; shouldn&apos;t be only one web process per pool.

Looking into the patch attached in the bug you referenced it&apos;s correct. There is one &apos;YES&apos; value, but I do not know what that is for. I do not see from the patch how I can change it. If the MiniBrowser/Safari can (according to the ChangeLog there), then I should be able to do it too, right?

Still, the previous behaviour was to have one process per WebKitWebContext. Keeping this the default would help for applications which do not recompile on every WebKitGTK+ update.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564050</commentid>
    <comment_count>6</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 08:22:07 -0700</bug_when>
    <thetext>You cannot change it because we haven&apos;t exposed yet this SPI to a public API in the GTK and WPE ports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564056</commentid>
    <comment_count>7</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-22 08:37:59 -0700</bug_when>
    <thetext>Hrm. I know this had been discovered/reported too late in the release cycle, but is there any chance (and hope) to have a fix in 2.26.0, please? I&apos;d prefer to change the default (at least for the ports where it cannot be changed by the API user), but if new API will be added then I&apos;m fine with it too, at least partly (my concern here is that, at least in Fedora, the webkit2gtk3 is updated down in three stable releases, while this particular change will break all the older application versions which won&apos;t be rebuilt with required fix).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564059</commentid>
    <comment_count>8</comment_count>
      <attachid>377009</attachid>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 08:44:13 -0700</bug_when>
    <thetext>Created attachment 377009
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564060</commentid>
    <comment_count>9</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 08:45:03 -0700</bug_when>
    <thetext>This is still a preliminary patch as I still need to add deprecation guards for the limit API and update the API tests as well, but feel free to give this a try for now. I will see if I can finish it tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564063</commentid>
    <comment_count>10</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 08:47:54 -0700</bug_when>
    <thetext>Also, I think the default in the now-to-be-deprecated API is 0, meaning no limit. So I think a default value for this should be True unless I am misunderstanding something. My patch is inconsistent in that but I&apos;ll fix it tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564072</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-22 09:05:09 -0700</bug_when>
    <thetext>See also: bug #193749</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564073</commentid>
    <comment_count>12</comment_count>
      <attachid>377009</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-22 09:08:27 -0700</bug_when>
    <thetext>Comment on attachment 377009
Patch

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

&gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:1626
&gt; +void webkit_web_context_set_uses_single_web_process(WebKitWebContext* context, gboolean usesSingleWebProcess)

Problem is as I mentioned in the other bug, you can&apos;t call this function until after the WebKitWebContext has been constructed, by which time it&apos;s too late to change the process limit. It doesn&apos;t actually work, does it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564150</commentid>
    <comment_count>13</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-22 11:51:38 -0700</bug_when>
    <thetext>Then I&apos;ll make it a construct-only property, that should work. But I need to check the other bug tomorrow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564386</commentid>
    <comment_count>14</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-22 23:14:39 -0700</bug_when>
    <thetext>(In reply to Claudio Saavedra from comment #10)
&gt; Also, I think the default in the now-to-be-deprecated API is 0, meaning no
&gt; limit.

Right, that&apos;s what the documentation says, though looking into bug #193725 comment #2, if I read it correctly, then this:

-    if (m_processes.size() &lt; maximumNumberOfProcesses())
-        return createNewWebProcess(websiteDataStore);

was always false for the default &apos;0&apos; returned by maximumNumberOfProcesses(), thus there had been &quot;always&quot; (+/- other conditions about page count) reused the old process, if existed. That is, the default behaviour was similar as if the maximumNumberOfProcesses() was 1. The actual behaviour of the code confirms it.

To have 0 as an unlimited count of processes it should look like:

    if (!maximumNumberOfProcesses() || m_processes.size() &lt; maximumNumberOfProcesses())
        return createNewWebProcess(websiteDataStore);

I&apos;ll give a try to your patch, it&apos;ll only take some time, till webkit is built here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564395</commentid>
    <comment_count>15</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-23 00:56:21 -0700</bug_when>
    <thetext>If your observation is correct, then we had a serious bug there. Since for security reasons a single web process per context is not a good idea, I&apos;m afraid you&apos;ll have to patch your application to go back to the behavior desired.

My patch won&apos;t work for the reasons Michael explained earlier; this is set too late to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564397</commentid>
    <comment_count>16</comment_count>
      <attachid>377109</attachid>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-23 01:00:42 -0700</bug_when>
    <thetext>Created attachment 377109
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564398</commentid>
    <comment_count>17</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-23 01:01:07 -0700</bug_when>
    <thetext>This is still preliminary but feel free to try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564410</commentid>
    <comment_count>18</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-23 02:29:17 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #14)
&gt; I&apos;ll give a try to your patch, it&apos;ll only take some time, till webkit is
&gt; built here.

With only a quick test the previous patch (comment #8) fixed evolution. I&apos;ll try the new (comment #16) too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564411</commentid>
    <comment_count>19</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-23 02:54:30 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #18)
&gt; I&apos;ll try the new (comment #16) too.

The second patch doesn&apos;t work, I get the same behaviour as without it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564416</commentid>
    <comment_count>20</comment_count>
    <who name="Claudio Saavedra">csaavedra</who>
    <bug_when>2019-08-23 03:30:32 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #19)
&gt; (In reply to Milan Crha from comment #18)
&gt; &gt; I&apos;ll try the new (comment #16) too.
&gt; 
&gt; The second patch doesn&apos;t work, I get the same behaviour as without it.

Did you change the value of the &quot;single-web-process&quot; in the WebKitWebContext? You need to. It&apos;s a construct-only property so you have to set it during creation, ie.:

WebKitWebContext *context = g_object_new (WEBKIT_TYPE_WEB_CONTEXT, 
                                          ...some non-default properties...,
                                          &quot;single-web-process&quot;, TRUE, NULL);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564418</commentid>
    <comment_count>21</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-23 03:48:52 -0700</bug_when>
    <thetext>&gt; Did you change the value of the &quot;single-web-process&quot; in the WebKitWebContext?

Nope, I didn&apos;t. The first patch worked without any change on the client side, with which I kind of counted. This is good for backward compatibility too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564420</commentid>
    <comment_count>22</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-23 03:53:33 -0700</bug_when>
    <thetext>&gt; It&apos;s a construct-only property

It means I cannot use webkit_web_context_get_default() any more. Not a big deal, neither ideal, just another obstacle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564423</commentid>
    <comment_count>23</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-23 03:57:30 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #21)
&gt; &gt; Did you change the value of the &quot;single-web-process&quot; in the WebKitWebContext?
&gt; 
&gt; Nope, I didn&apos;t. The first patch worked without any change on the client
&gt; side, with which I kind of counted. This is good for backward compatibility
&gt; too.

Right, with that added it works.

What would be your suggestions with respect of dealing with these spontaneous page ID changes and (more importantly) new WebKitWebProcess-es with respect of reliable web-extension connection over D-Bus? A very silly workaround would be to use one WebKitWebContext for each WebKitWebView (because I can pass the initial arguments to the web extension, thus tell it what service name it should use), but it won&apos;t fix it everywhere, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564769</commentid>
    <comment_count>24</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-23 22:19:09 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #14)
&gt; Right, that&apos;s what the documentation says, though looking into bug #193725
&gt; comment #2, if I read it correctly, then this:
&gt; 
&gt; -    if (m_processes.size() &lt; maximumNumberOfProcesses())
&gt; -        return createNewWebProcess(websiteDataStore);
&gt; 
&gt; was always false for the default &apos;0&apos; returned by maximumNumberOfProcesses(),
&gt; thus there had been &quot;always&quot; (+/- other conditions about page count) reused
&gt; the old process, if existed. That is, the default behaviour was similar as
&gt; if the maximumNumberOfProcesses() was 1. The actual behaviour of the code
&gt; confirms it.

Huh, this really needs to be investigated. I&apos;m confident such a bug does not exist, but it certainly looks like there is a problem with this code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564770</commentid>
    <comment_count>25</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-23 22:23:19 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #23)
&gt; Right, with that added it works.
&gt; 
&gt; What would be your suggestions with respect of dealing with these
&gt; spontaneous page ID changes and (more importantly) new WebKitWebProcess-es
&gt; with respect of reliable web-extension connection over D-Bus? A very silly
&gt; workaround would be to use one WebKitWebContext for each WebKitWebView
&gt; (because I can pass the initial arguments to the web extension, thus tell it
&gt; what service name it should use), but it won&apos;t fix it everywhere, right?

Just include the page ID in any IPC messages and discard the message if it doesn&apos;t correspond to a currently-valid page ID? This is what Epiphany does and it doesn&apos;t cause any problems. It should be very rare for a page ID to become invalid during an IPC call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1564771</commentid>
    <comment_count>26</comment_count>
      <attachid>377109</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-23 22:27:13 -0700</bug_when>
    <thetext>Comment on attachment 377109
Patch

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

&gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:467
&gt; +        g_param_spec_boolean(

I think I would expose WebKitProcessModel here instead (you&apos;ll need to make sure whatever header that&apos;s declared in is added to the mkenums generation), then we can deprecate webkit_web_context_set_process_model() but don&apos;t have to deprecate WebKitProcessModel. Or maybe that&apos;s a bad idea. I&apos;d wait for Carlos Garcia before spending time on this, in case he wants something different.

I&apos;d certainly recommend solving bug #193749 at the same time, to ensure a coherent solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1565321</commentid>
    <comment_count>27</comment_count>
      <attachid>377109</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-27 04:33:02 -0700</bug_when>
    <thetext>Comment on attachment 377109
Patch

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

&gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:357
&gt; +    configuration.setUsesSingleWebProcess(priv-&gt;usesSingleWebProcess);

I think this is a temporary setting, to be used only internally, that will be removed eventually, so we shouldn&apos;t expose it. Chris, could you confirm it? I think I asked you about this, but I&apos;m not sure it was this setting...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1565322</commentid>
    <comment_count>28</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-27 04:35:04 -0700</bug_when>
    <thetext>I wonder if we could make an exception for custom protocols to not swap process on navigation between them, since the contents are provided by the application in the end.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1565689</commentid>
    <comment_count>29</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-28 05:24:57 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #27)
&gt; Comment on attachment 377109 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=377109&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:357
&gt; &gt; +    configuration.setUsesSingleWebProcess(priv-&gt;usesSingleWebProcess);
&gt; 
&gt; I think this is a temporary setting, to be used only internally, that will
&gt; be removed eventually, so we shouldn&apos;t expose it. Chris, could you confirm
&gt; it? I think I asked you about this, but I&apos;m not sure it was this setting...

Chris? ^</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1565710</commentid>
    <comment_count>30</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-28 08:21:38 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #29)
&gt; (In reply to Carlos Garcia Campos from comment #27)
&gt; &gt; Comment on attachment 377109 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; View in context:
&gt; &gt; https://bugs.webkit.org/attachment.cgi?id=377109&amp;action=review
&gt; &gt; 
&gt; &gt; &gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:357
&gt; &gt; &gt; +    configuration.setUsesSingleWebProcess(priv-&gt;usesSingleWebProcess);
&gt; &gt; 
&gt; &gt; I think this is a temporary setting, to be used only internally, that will
&gt; &gt; be removed eventually, so we shouldn&apos;t expose it. Chris, could you confirm
&gt; &gt; it? I think I asked you about this, but I&apos;m not sure it was this setting...
&gt; 
&gt; Chris? ^

Unless you have a specific need for it, I would discourage you from exposing it in the API. This setting is indeed private and defeats the work we&apos;re doing to put different origins in separate processes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566124</commentid>
    <comment_count>31</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-28 23:57:55 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #30)
&gt; (In reply to Carlos Garcia Campos from comment #29)
&gt; &gt; (In reply to Carlos Garcia Campos from comment #27)
&gt; &gt; &gt; Comment on attachment 377109 [details]
&gt; &gt; &gt; Patch
&gt; &gt; &gt; 
&gt; &gt; &gt; View in context:
&gt; &gt; &gt; https://bugs.webkit.org/attachment.cgi?id=377109&amp;action=review
&gt; &gt; &gt; 
&gt; &gt; &gt; &gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:357
&gt; &gt; &gt; &gt; +    configuration.setUsesSingleWebProcess(priv-&gt;usesSingleWebProcess);
&gt; &gt; &gt; 
&gt; &gt; &gt; I think this is a temporary setting, to be used only internally, that will
&gt; &gt; &gt; be removed eventually, so we shouldn&apos;t expose it. Chris, could you confirm
&gt; &gt; &gt; it? I think I asked you about this, but I&apos;m not sure it was this setting...
&gt; &gt; 
&gt; &gt; Chris? ^
&gt; 
&gt; Unless you have a specific need for it, I would discourage you from exposing
&gt; it in the API. This setting is indeed private and defeats the work we&apos;re
&gt; doing to put different origins in separate processes.

And what do you think about making custom protocols an exception and not swap processes when navigating between them?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566149</commentid>
    <comment_count>32</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-29 01:20:08 -0700</bug_when>
    <thetext>I&apos;m still afraid of backward compatibility. This changes a lot for applications which have their own web extensions. You should bump the soname version or something like that, because such change deserves it ( https://gitlab.gnome.org/GNOME/evolution/issues/587#note_587156 ).

You have custom protocols and trusted origins. In case of Evolution every origin is trusted. All the extra work the changes bring in is unnecessary in case of Evolution and similar applications.

I do not understand one thing, quite important thing from my point of view. When the WebKitWebView has loaded a page with iframe-s from different origins and you spawn a new WebKitWebProcess for each iframe, and when the application wants to modify DOM in any of these iframe-s, for which it uses D-Bus, where the web extension spawns a service on expected name, does this new behaviour mean that:
a) each new WebKitWebProcess will load all web-extensions
b) each iframe will have its own WebKitWebPage ID
c) the extension tight to the main WebKitWebView&apos;s page (which provides
   the only page ID the application can know of) will not be able to
   read/write DOM changes in the iframe-s
, right ? In other words, should one keep a list of web extensions for a single WebKitWebView and decide to which of them the request should be sent based on some fuzzy logic (&apos;fuzzy logic&apos; in a meaning &apos;who knows how to decide which one in the list is the right one&apos;)? Not talking that this list can change dynamically, as the WeBkiWebView reloads its content?

I&apos;m really confused by this, not talking about the complexity it adds to the WebKitGTK+ users.

By the way, evolution-data-server supports so called backend-per-process, which can spawn factory subprocesses for each backend (calendar/addressbook/...) if needed. That was the default. It was also for similar reasons as for which you do this (the initial idea behind the change was: &apos;if one backend causes crash, the rest will continue running), but it was requested to change the default behaviour and to not run the subprocesses, due to increased memory (and other resources) requirements. That to be able to run this on hardware with limited resources. Thus even the backend-per-process was a good idea, it was abandoned later. More can be seen here, if you are interested:
https://bugzilla.gnome.org/show_bug.cgi?id=793031</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566230</commentid>
    <comment_count>33</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-29 08:21:21 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #31)
&gt; (In reply to Chris Dumez from comment #30)
&gt; &gt; (In reply to Carlos Garcia Campos from comment #29)
&gt; &gt; &gt; (In reply to Carlos Garcia Campos from comment #27)
&gt; &gt; &gt; &gt; Comment on attachment 377109 [details]
&gt; &gt; &gt; &gt; Patch
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; View in context:
&gt; &gt; &gt; &gt; https://bugs.webkit.org/attachment.cgi?id=377109&amp;action=review
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; &gt; Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:357
&gt; &gt; &gt; &gt; &gt; +    configuration.setUsesSingleWebProcess(priv-&gt;usesSingleWebProcess);
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; I think this is a temporary setting, to be used only internally, that will
&gt; &gt; &gt; &gt; be removed eventually, so we shouldn&apos;t expose it. Chris, could you confirm
&gt; &gt; &gt; &gt; it? I think I asked you about this, but I&apos;m not sure it was this setting...
&gt; &gt; &gt; 
&gt; &gt; &gt; Chris? ^
&gt; &gt; 
&gt; &gt; Unless you have a specific need for it, I would discourage you from exposing
&gt; &gt; it in the API. This setting is indeed private and defeats the work we&apos;re
&gt; &gt; doing to put different origins in separate processes.
&gt; 
&gt; And what do you think about making custom protocols an exception and not
&gt; swap processes when navigating between them?

Process Swapping has nothing to do with protocols at the moment, it is merely based on domain names. I would not expect process-swapping to occur between custom protocols, assuming they either use the same domain name (or do not have a domain name).
Adding Brady and Alex in cc in case they have input.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566232</commentid>
    <comment_count>34</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-29 08:23:33 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #32)
&gt; I&apos;m still afraid of backward compatibility. This changes a lot for
&gt; applications which have their own web extensions. You should bump the soname
&gt; version or something like that, because such change deserves it (
&gt; https://gitlab.gnome.org/GNOME/evolution/issues/587#note_587156 ).
&gt; 
&gt; You have custom protocols and trusted origins. In case of Evolution every
&gt; origin is trusted. All the extra work the changes bring in is unnecessary in
&gt; case of Evolution and similar applications.
&gt; 
&gt; I do not understand one thing, quite important thing from my point of view.
&gt; When the WebKitWebView has loaded a page with iframe-s from different
&gt; origins and you spawn a new WebKitWebProcess for each iframe, and when the
&gt; application wants to modify DOM in any of these iframe-s, for which it uses
&gt; D-Bus, where the web extension spawns a service on expected name, does this
&gt; new behaviour mean that:
&gt; a) each new WebKitWebProcess will load all web-extensions
&gt; b) each iframe will have its own WebKitWebPage ID
&gt; c) the extension tight to the main WebKitWebView&apos;s page (which provides
&gt;    the only page ID the application can know of) will not be able to
&gt;    read/write DOM changes in the iframe-s
&gt; , right ? In other words, should one keep a list of web extensions for a
&gt; single WebKitWebView and decide to which of them the request should be sent
&gt; based on some fuzzy logic (&apos;fuzzy logic&apos; in a meaning &apos;who knows how to
&gt; decide which one in the list is the right one&apos;)? Not talking that this list
&gt; can change dynamically, as the WeBkiWebView reloads its content?
&gt; 
&gt; I&apos;m really confused by this, not talking about the complexity it adds to the
&gt; WebKitGTK+ users.
&gt; 
&gt; By the way, evolution-data-server supports so called backend-per-process,
&gt; which can spawn factory subprocesses for each backend
&gt; (calendar/addressbook/...) if needed. That was the default. It was also for
&gt; similar reasons as for which you do this (the initial idea behind the change
&gt; was: &apos;if one backend causes crash, the rest will continue running), but it
&gt; was requested to change the default behaviour and to not run the
&gt; subprocesses, due to increased memory (and other resources) requirements.
&gt; That to be able to run this on hardware with limited resources. Thus even
&gt; the backend-per-process was a good idea, it was abandoned later. More can be
&gt; seen here, if you are interested:
&gt; https://bugzilla.gnome.org/show_bug.cgi?id=793031

No, process swapping on navigation is not for stability, it is for security and it has become increasingly important because of things like Spectre.
Note that we&apos;ve had process-per-tab for a long time and that this matches more closely the backend-per-process model you&apos;re talking about.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566258</commentid>
    <comment_count>35</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-29 09:02:10 -0700</bug_when>
    <thetext>Looking into the WebKitGTK+ debugger, the Resources tab, I see there are opened:

   mail:​/​/accountname/path/to/message/id?​mode=0&amp;​arguments
      mail:​/​/accountname/path/to/message/id?​part_id=.message.....
      mail:​/​/accountname/path/to/message/id?​part_id=.message.....

where the first is the main view&apos;s URL, the second and third are iframe src attributes, for two different parts of the viewed mail message. The other resources referenced in this message are:

   evo-file:///usr/share/evolution/theme/webview.css
   gtk-stock://pan-down-symbolic?size=4
   gtk-stock://go-next?size=4
   gtk-stock://x-evolution-arrow-down?size=4


The gtk-stock:// URL changes the &quot;host&quot; part according to the image it wants to receive. There can be also used evo-http:// and evo-https:// URLs, which consist of the external URLs provided by the message sender (like external images, CSS files and so on). Those download can be enabled/disabled in Preferences, or they can be loaded on demand by the user, but they are downloaded by Evolution itself, not by WebKitGTK+.

If I understand it properly, then the other resources are not a problem, they are not web pages, thus they do not cause WebKitWebProcess/Page change. That the all HTML pages are from mail:​/​/accountname/path/... means that that won&apos;t change the Page/ID too, at least until user moves to other account (the URL can be mail://imap1/Inbox/123 in one IMAP account and mail://imap2/test/321 in another account). Is that correct? I&apos;m asking that, because if I&apos;m going to add some workaround in Evolution for this (pity it had been discovered such late in the release cycle (I know you have it there for a long time)), then I&apos;d like to reproduce this and test that my code will work as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566269</commentid>
    <comment_count>36</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-29 09:30:29 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #35)
&gt; Looking into the WebKitGTK+ debugger, the Resources tab, I see there are
&gt; opened:
&gt; 
&gt;    mail:​/​/accountname/path/to/message/id?​mode=0&amp;​arguments
&gt;       mail:​/​/accountname/path/to/message/id?​part_id=.message.....
&gt;       mail:​/​/accountname/path/to/message/id?​part_id=.message.....
&gt; 
&gt; where the first is the main view&apos;s URL, the second and third are iframe src
&gt; attributes, for two different parts of the viewed mail message. The other
&gt; resources referenced in this message are:
&gt; 
&gt;    evo-file:///usr/share/evolution/theme/webview.css
&gt;    gtk-stock://pan-down-symbolic?size=4
&gt;    gtk-stock://go-next?size=4
&gt;    gtk-stock://x-evolution-arrow-down?size=4
&gt; 
&gt; 
&gt; The gtk-stock:// URL changes the &quot;host&quot; part according to the image it wants
&gt; to receive. There can be also used evo-http:// and evo-https:// URLs, which
&gt; consist of the external URLs provided by the message sender (like external
&gt; images, CSS files and so on). Those download can be enabled/disabled in
&gt; Preferences, or they can be loaded on demand by the user, but they are
&gt; downloaded by Evolution itself, not by WebKitGTK+.
&gt; 
&gt; If I understand it properly, then the other resources are not a problem,
&gt; they are not web pages, thus they do not cause WebKitWebProcess/Page change.
&gt; That the all HTML pages are from mail:​/​/accountname/path/... means that
&gt; that won&apos;t change the Page/ID too, at least until user moves to other
&gt; account (the URL can be mail://imap1/Inbox/123 in one IMAP account and
&gt; mail://imap2/test/321 in another account). Is that correct? I&apos;m asking that,
&gt; because if I&apos;m going to add some workaround in Evolution for this (pity it
&gt; had been discovered such late in the release cycle (I know you have it there
&gt; for a long time)), then I&apos;d like to reproduce this and test that my code
&gt; will work as expected.

For the workaround on your side, why don&apos;t you simply disable process-swap-on-navigation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566565</commentid>
    <comment_count>37</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-29 23:03:31 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #36)
&gt; For the workaround on your side, why don&apos;t you simply disable
&gt; process-swap-on-navigation?

I&apos;d like to give it a try, but how is that accessed in the WebKitGTK+ world, please? Simple `git grep process-swap-on-navigation` in the root checkout of WebKit sources on the master branch gives several hits in multiple ChangeLog file and only one hit in a code, and that in the comment:

&gt; Source/WebCore/loader/FrameLoader.cpp:    // If the request came from a previous process due to process-swap-on-navigation then we should not modify the request.

The developer documentation for WebKitWebContext [1] doesn&apos;t give me anything of that name either. I&apos;m sorry, but I do not develop WebKit, thus if it&apos;s any internal name for some feature, then I&apos;m not aware of its meaning in the outside world.

[1] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566571</commentid>
    <comment_count>38</comment_count>
      <attachid>377109</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-29 23:36:30 -0700</bug_when>
    <thetext>Comment on attachment 377109
Patch

r- because we don&apos;t really want to expose this setting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566573</commentid>
    <comment_count>39</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-29 23:40:39 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #36)
&gt; (In reply to Milan Crha from comment #35)
&gt; &gt; Looking into the WebKitGTK+ debugger, the Resources tab, I see there are
&gt; &gt; opened:
&gt; &gt; 
&gt; &gt;    mail:​/​/accountname/path/to/message/id?​mode=0&amp;​arguments
&gt; &gt;       mail:​/​/accountname/path/to/message/id?​part_id=.message.....
&gt; &gt;       mail:​/​/accountname/path/to/message/id?​part_id=.message.....
&gt; &gt; 
&gt; &gt; where the first is the main view&apos;s URL, the second and third are iframe src
&gt; &gt; attributes, for two different parts of the viewed mail message. The other
&gt; &gt; resources referenced in this message are:
&gt; &gt; 
&gt; &gt;    evo-file:///usr/share/evolution/theme/webview.css
&gt; &gt;    gtk-stock://pan-down-symbolic?size=4
&gt; &gt;    gtk-stock://go-next?size=4
&gt; &gt;    gtk-stock://x-evolution-arrow-down?size=4
&gt; &gt; 
&gt; &gt; 
&gt; &gt; The gtk-stock:// URL changes the &quot;host&quot; part according to the image it wants
&gt; &gt; to receive. There can be also used evo-http:// and evo-https:// URLs, which
&gt; &gt; consist of the external URLs provided by the message sender (like external
&gt; &gt; images, CSS files and so on). Those download can be enabled/disabled in
&gt; &gt; Preferences, or they can be loaded on demand by the user, but they are
&gt; &gt; downloaded by Evolution itself, not by WebKitGTK+.
&gt; &gt; 
&gt; &gt; If I understand it properly, then the other resources are not a problem,
&gt; &gt; they are not web pages, thus they do not cause WebKitWebProcess/Page change.
&gt; &gt; That the all HTML pages are from mail:​/​/accountname/path/... means that
&gt; &gt; that won&apos;t change the Page/ID too, at least until user moves to other
&gt; &gt; account (the URL can be mail://imap1/Inbox/123 in one IMAP account and
&gt; &gt; mail://imap2/test/321 in another account). Is that correct? I&apos;m asking that,
&gt; &gt; because if I&apos;m going to add some workaround in Evolution for this (pity it
&gt; &gt; had been discovered such late in the release cycle (I know you have it there
&gt; &gt; for a long time)), then I&apos;d like to reproduce this and test that my code
&gt; &gt; will work as expected.
&gt; 
&gt; For the workaround on your side, why don&apos;t you simply disable
&gt; process-swap-on-navigation?

We haven&apos;t exposed that option in the API because PSON was supposed to be mandatory for security reasons, and the internal setting was supposed to be private for testing. If that&apos;s not the case, and the setting won&apos;t be removed in the future I&apos;ll add an option to disable it in the API, there might be apps that don&apos;t really need it like evolution. Otherwise, what we can do for now, is adding an env var (yes, I also hate env vars) to disable it (only in 2.26 branch), so that apps can disable it while we figure out the issues during the next release cycle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566593</commentid>
    <comment_count>40</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-30 00:59:51 -0700</bug_when>
    <thetext>Okay, anything would be better than this situation, even env var. Still without backward compatibility, if I understand it correctly.

I gave this a try, I mean a try on the evolution side. My idea was: if I cannot influence the number of WebProcess-es being run, then I&apos;ll create a WebContext for each WebView on which I&apos;ll set user data for the WebExtension, thus my extension will open on expected name. That should work, as long as I won&apos;t reuse the same WebContext on multiple WebView-s.

The result is kind of funny (I&apos;m on git master at commit  dbcee3d87d966240becdba723dc38f12208dd256, aka git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249275 268f45cc-cd09-0410-ab3c-d52691b4dbfc according to git log). I do not cache webkit_web_view_get_page_id(), I use it directly when issuing D-Bus requests towards my extension. I see the created WebExtension has been notified about created WebPage with ID 6 and that&apos;s the only one about which the WebExtension had been notified so far. Then the client side issues D-Bus calls with WebPage ID 5 (not 6). Those are initial requests on the WebPage, you can get an idea what they do from their names: EWebViewEnsureBodyClass, AddCSSRuleIntoStyleSheet and so on. These are run asynchronously, after the WebExtension registers itself on the D-Bus. These are important calls, thus I need them to happen, not to ignore their failure (for nonexistent page ID). The WebKitWebView documentation doesn&apos;t have &quot;page-id&quot; property (in which case I could theoretically listen for &quot;notify::page-id&quot; GObject signal for changes), neither there&apos;s a (GObject) signal for page-id changes, thus I&apos;ve basically no idea when the page ID for the WebView changed. Being able to detect it, I can re-run my commands on the new page ID (even it would be awful from the coding and performance point of view). I do not know that the page ID changed on the WebExtension side, there was not created any WebPage with ID 5, only with ID 6 (otherwise I could add my own D-Bus signal on my WebExtension). This WebPage had been created before D-Bus name had been acquired, if it matters.

The biggest problem, the webkit_web_view_get_page_id() still returns number 5, even after such long time, after I wrote this comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566597</commentid>
    <comment_count>41</comment_count>
      <attachid>377687</attachid>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-30 01:39:34 -0700</bug_when>
    <thetext>Created attachment 377687
test-wk2.c - reproducer client side

The first line contains a comment with a command to build &amp; run it. Press Reload button at the top to begin the fun.

There&apos;s also printed on the console what page ID the WebView uses every 3 seconds. It doesn&apos;t change at all.

One thing I do not understand, but maybe it&apos;s intentional: when I press the Reload button 5 times, there are left running 4 WebKitWebProcess processes. They do not close as soon as they are useless. Is that intentional, like if they could be reused, or it&apos;s another overlook?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566598</commentid>
    <comment_count>42</comment_count>
      <attachid>377688</attachid>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-08-30 01:41:24 -0700</bug_when>
    <thetext>Created attachment 377688
test-wk2-extension.c - a WebExtension

The first line contains a command line to build it.

It&apos;s a complementary WebExtension for the test-wk2.c above, which shows what is happening on the WebKitWebProcess(-es) side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566627</commentid>
    <comment_count>43</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-08-30 04:04:52 -0700</bug_when>
    <thetext>Milan, could you try simply disabling PSON in you wk build? You need to edit Source/WebKit/Shared/WebPreferencesDefaultValues.h and remove PLATFORM(GTK) from:

#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(WPE)
#define DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED true
#else
#define DEFAULT_PROCESS_SWAP_ON_CROSS_SITE_NAVIGATION_ENABLED false
#endif</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566726</commentid>
    <comment_count>44</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-30 10:51:39 -0700</bug_when>
    <thetext>Milan, you really need to use a private D-Bus connection, like I suggested in your GitLab issue, regardless. There&apos;s no reason you need to be using the session bus to implement a private Evolution feature, right? If you use private connections to each web extension, then you no longer need to use page IDs to identify web processes and your entire problem goes away (I think). Really, it seems like a silly problem to have.

Nevertheless, I&apos;m very sympathetic to your concerns about this API break, and it&apos;s possible other applications might break too. A soname bump would be insufficient, because old Evolution compiled against new WebKit would not work. PSON really requires an API version bump, but an API version bump could imperil WebKit&apos;s fragile relationship with Debian security. We can be almost certain that a WebKit update that requires even a minor change in Evolution, like setting an environment variable or disabling a hypothetical public API PSON setting, would cause Debian to reject future WebKit updates. So I don&apos;t see any good solutions here.

Perhaps we should disable PSON at build time for 2.26 to buy time, but we don&apos;t want to keep doing that indefinitely.

(In reply to Milan Crha from comment #35)
&gt; Looking into the WebKitGTK+ debugger, the Resources tab, I see there are
&gt; opened:
&gt; 
&gt;    mail:​/​/accountname/path/to/message/id?​mode=0&amp;​arguments
&gt;       mail:​/​/accountname/path/to/message/id?​part_id=.message.....
&gt;       mail:​/​/accountname/path/to/message/id?​part_id=.message.....
&gt; 
&gt; where the first is the main view&apos;s URL, the second and third are iframe src
&gt; attributes, for two different parts of the viewed mail message. The other
&gt; resources referenced in this message are:
&gt; 
&gt;    evo-file:///usr/share/evolution/theme/webview.css
&gt;    gtk-stock://pan-down-symbolic?size=4
&gt;    gtk-stock://go-next?size=4
&gt;    gtk-stock://x-evolution-arrow-down?size=4
&gt; 
&gt; 
&gt; The gtk-stock:// URL changes the &quot;host&quot; part according to the image it wants
&gt; to receive.

Well Alex is the expert on URI parsing. I&apos;m not sure whether these URIs have different hosts, or no host at all. Certainly the mail:// and evo-file:// URIs look like URIs with paths and no hosts. I guess PSON should consider URIs without hosts to be the same origin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566786</commentid>
    <comment_count>45</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-08-30 13:31:42 -0700</bug_when>
    <thetext>&lt;script&gt;alert(new URL(&quot;gtk-stock://pan-down-symbolic?size=4&quot;).hostname)&lt;/script&gt;
The host is &quot;pan-down-symbolic&quot;.  Use three slashes if you want there to be an empty host.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566825</commentid>
    <comment_count>46</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-30 14:50:45 -0700</bug_when>
    <thetext>(In reply to Alex Christensen from comment #45)
&gt; Use three slashes if you want there to be an empty host.

Milan, can you try this? It should probably suffice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566826</commentid>
    <comment_count>47</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-30 14:55:03 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #44)
&gt; We can be
&gt; almost certain that a WebKit update that requires even a minor change in
&gt; Evolution, like setting an environment variable or disabling a hypothetical
&gt; public API PSON setting, would cause Debian to reject future WebKit updates.
&gt; So I don&apos;t see any good solutions here.

Maybe if we work with a friendly Debian maintainer to ensure Evolution gets patched before 2.26.0, then we can cross our fingers and hope no other apps are affected. Let&apos;s be extra careful and give the transition to 2.26 in Debian more time than usual, so we can smoke out any other affected apps in Fedora first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1566968</commentid>
    <comment_count>48</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-08-31 02:22:04 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #28)
&gt; I wonder if we could make an exception for custom protocols to not swap
&gt; process on navigation between them, since the contents are provided by the
&gt; application in the end.

I thought it was a great idea, but it&apos;s not because the content could ultimately come from the untrusted source even though it&apos;s directly provided by the application. E.g. loading ephy-reader://example.com and ephy-reader://malicious.com in the same view without a process swap would be vulnerable even though it&apos;s a custom protocol.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567135</commentid>
    <comment_count>49</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 00:03:13 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #43)
&gt; Milan, could you try simply disabling PSON in you wk build?

No, it did not help. I still get &quot;Invalid page ID: 5&quot;. I only changed webkit sources and reverted my test changes on the evolution side; I did not fetch latest changes, thus I&apos;m at the same state as comment #40 (I&apos;ll do it now). Though I think the test doesn&apos;t prove anything, because page IDs simply do not match, which I consider a regression, because it wasn&apos;t the case before (in time of comment #18).

(In reply to Michael Catanzaro from comment #44)
&gt; Milan, you really need to use a private D-Bus connection, like I suggested
&gt; in your GitLab issue, regardless.

I&apos;m not sure what that would change. There is still the same problem, one WebKitWebView on the client side, and multiple WebKitWebProcess-es on the other side, some of them stale, while the WebView needs to talk to its counterpart on the WebProcess side, at least one of them. Giving unique D-Bus name for each WebProcess is odd, because I need to know on the WebView side to which proxy I should talk (and expect responses). Having it on a private D-Bus bus would help to what? To be able to &quot;introspect&quot; all the existing connections on it and &quot;pick randomly&quot; one of them, eventually send the message (and listen for responses) on all of them? I&apos;m sorry, but that feels like a hit&amp;miss game, not a deterministic programming. And having opened as many private D-Bus connections as many WebKitWebView instances are opened also doesn&apos;t feel the best approach.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567136</commentid>
    <comment_count>50</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 00:16:37 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #48)
&gt; E.g. loading ephy-reader://example.com and ephy-reader://malicious.com in the
&gt; same view without a process swap would be vulnerable even though it&apos;s a custom
&gt; protocol.

Like if the web page author would like to address only epiphany browser with added URL of scheme he/she knows epiphany is using for trusted content? Hih, that would be interesting.

Thinking of it this way, the data being downloaded, even downloaded by Evolution itself, is trusted only in a way of a user setting, that can not download external content by default, even users can let Evolution do it and to pass it to WebKitWebView. It&apos;s for evo-http:// and evo-https:// schemes. The mail:// scheme is semi-trusted. It modifies text/html parts to not reference external data directly; in creates HTML content from text/plain and other parts as needed. All the other custom schemes Evolution uses can be considered trusted. I mean, even I said Evolution uses trusted content only, it was not accurate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567145</commentid>
    <comment_count>51</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-02 01:28:37 -0700</bug_when>
    <thetext>It&apos;s so late in the release cycle that I think the best approach is to disable PSON in 2.26 and work in all these issues (see also bug #200967) in trunk for 2.28. What do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567147</commentid>
    <comment_count>52</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 01:34:10 -0700</bug_when>
    <thetext>Works for me, but I&apos;m not sure whether it&apos;s a question for me :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567153</commentid>
    <comment_count>53</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 01:57:42 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #49)
&gt; ... I still get &quot;Invalid page ID: 5&quot;. I only changed webkit
&gt; sources and reverted my test changes on the evolution side; I did not fetch
&gt; latest changes, thus I&apos;m at the same state as comment #40 (I&apos;ll do it now).

Still the same problem with git checkout at commit aec39837fb5478153424253f0a1871c5f2b2d7aa, aka git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249376 268f45cc-cd09-0410-ab3c-d52691b4dbfc. The extension page ID is 6, while the WebView&apos;s page ID is 5.

It&apos;s with the change from comment #43. This off-by-one should be fixed as well. I believe both sides should use the same page ID, no? It was the case till recently, at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567155</commentid>
    <comment_count>54</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-02 02:05:40 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #53)
&gt; (In reply to Milan Crha from comment #49)
&gt; &gt; ... I still get &quot;Invalid page ID: 5&quot;. I only changed webkit
&gt; &gt; sources and reverted my test changes on the evolution side; I did not fetch
&gt; &gt; latest changes, thus I&apos;m at the same state as comment #40 (I&apos;ll do it now).
&gt; 
&gt; Still the same problem with git checkout at commit
&gt; aec39837fb5478153424253f0a1871c5f2b2d7aa, aka git-svn-id:
&gt; http://svn.webkit.org/repository/webkit/trunk@249376
&gt; 268f45cc-cd09-0410-ab3c-d52691b4dbfc. The extension page ID is 6, while the
&gt; WebView&apos;s page ID is 5.
&gt; 
&gt; It&apos;s with the change from comment #43. This off-by-one should be fixed as
&gt; well. I believe both sides should use the same page ID, no? It was the case
&gt; till recently, at least.

I thought this was caused by process swapping...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567156</commentid>
    <comment_count>55</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-02 02:07:35 -0700</bug_when>
    <thetext>So, your problem doesn&apos;t come from PSON directly, but from the fact that we removed the single process model because of PSON?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567158</commentid>
    <comment_count>56</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 02:15:46 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #55)
&gt; So, your problem doesn&apos;t come from PSON directly, but from the fact that we
&gt; removed the single process model because of PSON?

I&apos;d say both. As I wrote in comment #49, in time of comment #18 the page IDs matched on both sides until I had more than one WebKitWebView instance opened for one WebKitWebContext (which ran multiple WebProcess-es and my D-Bus connection to the loaded extension didn&apos;t know about the other WebProcess). Right now page IDs do not match on both sides at all - that&apos;s why I call it a regression. If you&apos;ve a pointer where to look in the sources, I can give it a try.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567160</commentid>
    <comment_count>57</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-02 02:21:48 -0700</bug_when>
    <thetext>That&apos;s more complicated to revert then, because process limit is gone, and single process model would be now a construct only property of the context (we want a temporary solution, so new API is not an option). So, an env var to enable single process model would work for now, at least for evo. Then we need to review how evo is using the web extensions to understand what the problem is, what needs to be fixed/added in wk, and what to fix in evo too. I also think you shouldn&apos;t use the session bus for private communications between the same application. A private p2p connection like ephy does seems more appropriate for evo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567177</commentid>
    <comment_count>58</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 03:23:10 -0700</bug_when>
    <thetext>Evolution currently distinguishes between previews and editors. Editors use their own WebKitWebContext, one for all of them, while previews use the default WebKitWebContext. My test changes I tried to do above stopped using the default WebContext. The way this works for editors (I&apos;m willing to change it for previews as well due to this bug), is that the GUI process creates the WebContext on demand and reuses it, while it sets also user data for the WebExtension, containing expected D-Bus service name, where the GUI process listens and sends its requests. These requests contain page ID-s, thus the WebExtension side knows to which WebKitWebPage the request belongs. Once the WebKitWebProcess runs, the WebExtension reads the D-Bus name and registers itself on the session bus. (Problem number 1: when there are multiple WebProcess-es, each tries to register the same D-Bus service name, which results in failure for second and other WebProcess-es.) All of this worked fine until now, because the WebKit behaviour was that only one WebProcess was created for one WebContext (regardless the process-limit value, which evolution code doesn&apos;t touch and lefts it to default &apos;0&apos;; it&apos;s unrelated, only if it worked, then the issue with multiple WebProcess-es would be found earlier). When the WebExtension wants to send a D-Bus signal to the GUI part, it also includes the web page ID, as returned by WebKitWebPage, thus the GUI editor can distinguish whether the signal was meant for its WebKitWebView or for another WebKitWebView. (Problem number 2: web page IDs do not match now, which breaks all the logic in the code.)

That describes roughly how it works in Evolution. There are expectations, which can break the code when they are not satisfied. It worked, because the behaviour of Webkit was as expected by the code.

I&apos;m fine to change things on the Evolution side, I hope it&apos;s obvious, it&apos;s only not ideal for backward compatibility, as we agreed above. I do not see how private D-Bus connection could help with the current situation, but I&apos;ll check what Epiphany does, then maybe I&apos;ll understand.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567180</commentid>
    <comment_count>59</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-02 03:58:55 -0700</bug_when>
    <thetext>single process model was implemented as multiple process model with limit of 1. Removing the process limit, made the single process model no-op. There&apos;s still an internal option to use a single process model, but it&apos;s different, that&apos;s why it requires to be a construct-only property.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567185</commentid>
    <comment_count>60</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 05:01:36 -0700</bug_when>
    <thetext>Just for the record, WebKitWebPage::id != WebKitWebView::page-id (aka page ID mismatch introduced semi-recently) is causing problems to Epiphany too.

I could not test 3.33.92, because it needs too new glib, thus I tried 3.33.1, but the body of embed/ephy-web-view.c:page_created_cb() looks the same, also depending on the proper page ID provided, the callbacks and view-&gt;web_process_extension are never assigned, due to this mismatch. I added at the very top this debug print:

   printf (&quot;%s: view:%p: expects:%&quot; G_GUINT64_FORMAT &quot; received:%&quot; G_GUINT64_FORMAT &quot;\n&quot;, __FUNCTION__, view, webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (view)), page_id);

and I see on the console:

   page_created_cb: view:0x15a6b50: expects:7 received:8
   page_created_cb: view:0x15a6b50: expects:7 received:114
   page_created_cb: view:0x1644940: expects:113 received:114

The 113/114 is for the second tab I opend there. As the signal callbacks are not connected I cannot open an https:// page, whose server uses self-signed or otherwise &quot;invalid&quot; certificate. I can click &quot;Technical info-&gt;Accept Risk and Proceed&quot; red button, but it only makes a spinner at the tab spinning and nothing changes. Clicking &quot;Go Back&quot; blue button on this &quot;Security violation&quot; page works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567186</commentid>
    <comment_count>61</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 05:14:45 -0700</bug_when>
    <thetext>Well it seems you&apos;re right. A private connection wouldn&apos;t fix this because it&apos;s inherently racy. So now we know what&apos;s causing https://gitlab.gnome.org/GNOME/epiphany/issues/871.

This seems really hard to solve, and there&apos;s no time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567187</commentid>
    <comment_count>62</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 05:23:58 -0700</bug_when>
    <thetext>Actually this might be good, because it looks like a more straightforward bug. WebKitWebProcess::page-created should be emitted for every process swap. The latest ID visible to the web process (via webkit_web_page_get_id()) should match the ID visible to the UI process (via webkit_web_view_get_page_id()) unless a process swap has just occurred. It&apos;s OK for that page_created_cb() function to fail and return early if a process swap has just occurred, but if so, it should be called again imminently and succeed because another page created message should be incoming from the web process. For them to get completely desynced, as you show, there must be some bug, not an inherent problem with the new process model.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567188</commentid>
    <comment_count>63</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 05:32:29 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #62)
&gt; Actually this might be good, because it looks like a more straightforward
&gt; bug.

Well probably it&apos;s not good, just a race. The page ID coming from the web process is probably the new ID, and the UI process just hasn&apos;t noticed yet. If I guess right, the UI process&apos;s page ID will be updated momentarily, but when that happens it&apos;s already too late. The web process message has already been discarded due to the mismatch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567189</commentid>
    <comment_count>64</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 05:48:26 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #61)
&gt; Well it seems you&apos;re right. A private connection wouldn&apos;t fix this because
&gt; it&apos;s inherently racy. So now we know what&apos;s causing
&gt; https://gitlab.gnome.org/GNOME/epiphany/issues/871.

Is it with 3 weeks old WebKit master/trunk? The issue had been filled 3 weeks ago, according to gitlab.

(In reply to Michael Catanzaro from comment #63)
&gt; If I guess right, the UI process&apos;s page ID will be updated momentarily, but
&gt; when that happens it&apos;s already too late.

No, it&apos;s not updated at all. Try comment #41 + comment #42.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567190</commentid>
    <comment_count>65</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 05:55:05 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #64)
&gt; Is it with 3 weeks old WebKit master/trunk? The issue had been filled 3
&gt; weeks ago, according to gitlab.

Nevermind. Gitlab says August 5, but if I try WebKitGTK+ with git checkout at commit ca8dc42af2fbce678b44fa83e61c4cb3ebbe23a0, aka from Aug 23 07:25:00 2019, then there is no page ID mismatch, thus it&apos;s not it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567191</commentid>
    <comment_count>66</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 06:00:41 -0700</bug_when>
    <thetext>Well I added some debug. When the page changes due to a process swap, the new page has the same ID as the old page. So that&apos;s really nice. It means this should work, in theory.

(In reply to Milan Crha from comment #60)
&gt;    page_created_cb: view:0x15a6b50: expects:7 received:8
&gt;    page_created_cb: view:0x15a6b50: expects:7 received:114
&gt;    page_created_cb: view:0x1644940: expects:113 received:114

Expected result would actually be something like:

&gt;    page_created_cb: view:0x15a6b50: expects:7 received:7
&gt;    page_created_cb: view:0x15a6b50: expects:7 received:113
&gt;    page_created_cb: view:0x1644940: expects:113 received:113

because each view receives the page created message for every page, and just discards messages that aren&apos;t intended for it.

So I see there is a race here, because 8 and 114 are being received and the associated functionality is all broken. I just can&apos;t reproduce. It might be a timing issue. But in theory, because the page ID stays the same even when the page is swapped out for another, it should be fixable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567193</commentid>
    <comment_count>67</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 06:02:25 -0700</bug_when>
    <thetext>Could you use SVN revision numbers when talking about specific WebKit commits, please? That makes it easier to see what commit you are talking about.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567196</commentid>
    <comment_count>68</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 06:26:58 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #67)
&gt; Could you use SVN revision numbers when talking about specific WebKit
&gt; commits, please?

Yes, of course. That&apos;s the:

   git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

from the end of the `git log`, right? It&apos;s for:

(In reply to Milan Crha from comment #65)
&gt; ... at commit ca8dc42af2fbce678b44fa83e61c4cb3ebbe23a0 ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567197</commentid>
    <comment_count>69</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 06:28:14 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #53)
&gt; Still the same problem with git checkout at commit
&gt; aec39837fb5478153424253f0a1871c5f2b2d7aa, aka git-svn-id:
&gt; http://svn.webkit.org/repository/webkit/trunk@249376
&gt; 268f45cc-cd09-0410-ab3c-d52691b4dbfc. The extension page ID is 6, while the
&gt; WebView&apos;s page ID is 5.
&gt; 
&gt; It&apos;s with the change from comment #43. This off-by-one should be fixed as
&gt; well. I believe both sides should use the same page ID, no? It was the case
&gt; till recently, at least.

I&apos;m trying your test case with 2.25.4 (r248153) but I see 5 on both sides. It&apos;s possible this is a timing issue that just happens on your computer but not mine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567201</commentid>
    <comment_count>70</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 07:04:42 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #69)
&gt; It&apos;s possible this is a timing issue that just happens on your computer but
&gt; not mine?

I do not think so. I see correct page IDs on both sides with r249042 too, even with r249174. The page ID thing regressed only (semi-)recently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567206</commentid>
    <comment_count>71</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-09-02 08:34:25 -0700</bug_when>
    <thetext>As of very recently (last week), the WebPageProxy ids and the WebPage ids are now completely unrelated. The WebPage id now also changes on every process swap. Note that Cocoa has code to support communication between the UIProcess and the injected bundle. The way I made it work is that the UIProcess side listens for IPC using the WebPageProxy id as IPC id. Because this id is constant throughout the lifetime of the view, this allows the UIProcess side object to receive IPC from all injected bundles (previous and new process when process swapping). On the WebProcess side, the object listens for IPC using the WebPage id as identifier, so we know which exact object to route it to. On the UIProcess side, we always send messages to the process currently associated with the WebPageProxy and use the WebPage id that is currently associated to the WebPageProxy. This allows multiple to 1 communication. The WebPage proxy always only talks to the committed process’ bundle, but can receive IPC from all injected bundles associated with the WebView.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567207</commentid>
    <comment_count>72</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-02 08:48:55 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #71)
&gt; As of very recently (last week), the WebPageProxy ids and the WebPage ids
&gt; are now completely unrelated.

I haven&apos;t merged those commits in our stable branch, FWIW.

&gt; The WebPage id now also changes on every
&gt; process swap. Note that Cocoa has code to support communication between the
&gt; UIProcess and the injected bundle. The way I made it work is that the
&gt; UIProcess side listens for IPC using the WebPageProxy id as IPC id. Because
&gt; this id is constant throughout the lifetime of the view, this allows the
&gt; UIProcess side object to receive IPC from all injected bundles (previous and
&gt; new process when process swapping). On the WebProcess side, the object
&gt; listens for IPC using the WebPage id as identifier, so we know which exact
&gt; object to route it to. On the UIProcess side, we always send messages to the
&gt; process currently associated with the WebPageProxy and use the WebPage id
&gt; that is currently associated to the WebPageProxy. This allows multiple to 1
&gt; communication. The WebPage proxy always only talks to the committed process’
&gt; bundle, but can receive IPC from all injected bundles associated with the
&gt; WebView.

Thanks for your help Chris.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567208</commentid>
    <comment_count>73</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 08:53:30 -0700</bug_when>
    <thetext>I see, that might be r249275, aka bug #201233. I&apos;m going to switch to webkit-2.16 branch to see whether it&apos;s unaffected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567209</commentid>
    <comment_count>74</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 08:55:07 -0700</bug_when>
    <thetext>Err, I meant webkit-2.26 branch, of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567218</commentid>
    <comment_count>75</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 11:19:23 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #71)
&gt; As of very recently (last week), the WebPageProxy ids and the WebPage ids
&gt; are now completely unrelated.

OK, that will break the world. :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567219</commentid>
    <comment_count>76</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 11:22:36 -0700</bug_when>
    <thetext>So webkit_web_page_get_id() will need to be reimplemented in some way that gets its ID from the WebPageProxy in the UI process, rather than its WebPage.

Ideally this would happen without sync IPC, but that might be hard. :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567238</commentid>
    <comment_count>77</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-09-02 15:15:16 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #76)
&gt; So webkit_web_page_get_id() will need to be reimplemented in some way that
&gt; gets its ID from the WebPageProxy in the UI process, rather than its WebPage.
&gt; 
&gt; Ideally this would happen without sync IPC, but that might be hard. :/

That’s easy, the WebPage already has a getter to gets the id of its WebPageProxy identifier. No IPC needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567239</commentid>
    <comment_count>78</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-09-02 15:17:39 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #75)
&gt; (In reply to Chris Dumez from comment #71)
&gt; &gt; As of very recently (last week), the WebPageProxy ids and the WebPage ids
&gt; &gt; are now completely unrelated.
&gt; 
&gt; OK, that will break the world. :(

I think I will need details to understand why. So far I have not heard of any breakage on the Cocoa side (admittedly it is still early) but we have very intrusive clients using injected bundles.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567248</commentid>
    <comment_count>79</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 17:08:09 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #77)
&gt; That’s easy, the WebPage already has a getter to gets the id of its
&gt; WebPageProxy identifier. No IPC needed.

OK, then it should be no problem to fix.

(In reply to Chris Dumez from comment #78)
&gt; I think I will need details to understand why. So far I have not heard of
&gt; any breakage on the Cocoa side (admittedly it is still early) but we have
&gt; very intrusive clients using injected bundles.

API users expect the WebKitWebPage&apos;s page ID to correspond to the WebKitWebView&apos;s page ID. It&apos;s the only way to associate a WebKitWebPage with its corresponding WebKitWebView, since they exist in separate processes.

This entire bug report is about problems caused when the page ID doesn&apos;t match like it&apos;s expected to. Evolution uses the ID to direct messages to the right web process. If it doesn&apos;t match, the message gets sent to nowhere. Or, the Epiphany example above shows that Epiphany uses it to filter out web process messages intended for other web views, so the web view only processes the messages intended for it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567249</commentid>
    <comment_count>80</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-09-02 17:16:27 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #79)
&gt; (In reply to Chris Dumez from comment #77)
&gt; &gt; That’s easy, the WebPage already has a getter to gets the id of its
&gt; &gt; WebPageProxy identifier. No IPC needed.
&gt; 
&gt; OK, then it should be no problem to fix.
&gt; 
&gt; (In reply to Chris Dumez from comment #78)
&gt; &gt; I think I will need details to understand why. So far I have not heard of
&gt; &gt; any breakage on the Cocoa side (admittedly it is still early) but we have
&gt; &gt; very intrusive clients using injected bundles.
&gt; 
&gt; API users expect the WebKitWebPage&apos;s page ID to correspond to the
&gt; WebKitWebView&apos;s page ID. It&apos;s the only way to associate a WebKitWebPage with
&gt; its corresponding WebKitWebView, since they exist in separate processes.
&gt; 
&gt; This entire bug report is about problems caused when the page ID doesn&apos;t
&gt; match like it&apos;s expected to. Evolution uses the ID to direct messages to the
&gt; right web process. If it doesn&apos;t match, the message gets sent to nowhere.
&gt; Or, the Epiphany example above shows that Epiphany uses it to filter out web
&gt; process messages intended for other web views, so the web view only
&gt; processes the messages intended for it.

The bug title says PSON but looking at the very initial report, it looks like the issue is that there was code that expected a single WebProcess for all WebViews. This does not really seem PSON related. I guess it is because we dropped the process limit api. That said, we still support single process mode, so I am not sure why evolution cannot use that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567251</commentid>
    <comment_count>81</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 17:18:05 -0700</bug_when>
    <thetext>Right, this isn&apos;t about PSON after all. I&apos;ll edit the title.

(In reply to Chris Dumez from comment #77)
&gt; That’s easy, the WebPage already has a getter to gets the id of its
&gt; WebPageProxy identifier. No IPC needed.

Hm, problem is the WebPageProxyIdentifer returned by WebPage::webPageProxyIdentifier is not going to match the Identifier returned by WebPageProxy::identifier, is it? That&apos;s what we need to match.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567253</commentid>
    <comment_count>82</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-09-02 17:24:00 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #81)
&gt; Right, this isn&apos;t about PSON after all. I&apos;ll edit the title.
&gt; 
&gt; (In reply to Chris Dumez from comment #77)
&gt; &gt; That’s easy, the WebPage already has a getter to gets the id of its
&gt; &gt; WebPageProxy identifier. No IPC needed.
&gt; 
&gt; Hm, problem is the WebPageProxyIdentifer returned by
&gt; WebPage::webPageProxyIdentifier is not going to match the Identifier
&gt; returned by WebPageProxy::identifier, is it? That&apos;s what we need to match.

Sure they will match. Why wouldn’t they?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567254</commentid>
    <comment_count>83</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-09-02 17:25:13 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #82)
&gt; (In reply to Michael Catanzaro from comment #81)
&gt; &gt; Right, this isn&apos;t about PSON after all. I&apos;ll edit the title.
&gt; &gt; 
&gt; &gt; (In reply to Chris Dumez from comment #77)
&gt; &gt; &gt; That’s easy, the WebPage already has a getter to gets the id of its
&gt; &gt; &gt; WebPageProxy identifier. No IPC needed.
&gt; &gt; 
&gt; &gt; Hm, problem is the WebPageProxyIdentifer returned by
&gt; &gt; WebPage::webPageProxyIdentifier is not going to match the Identifier
&gt; &gt; returned by WebPageProxy::identifier, is it? That&apos;s what we need to match.
&gt; 
&gt; Sure they will match. Why wouldn’t they?

A WebPageProxy can be associated with several WebPages throughout its lifetime but a given WebPage is always associated with a single WebPageProxy / view.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567255</commentid>
    <comment_count>84</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 17:34:44 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #82)
&gt; Sure they will match. Why wouldn’t they?

In that case, I think we can change webkit_web_page_get_id() to return the WebPageProxyIdentifier instead of the PageIdentifier, and then we should be good.

I see webkit_web_view_get_page_id() is already returning the WebPageProxyIdentifier, not the PageIdentifier, so that explains why the view doesn&apos;t return different page IDs after a process swap, like I was expecting it would. Nice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567261</commentid>
    <comment_count>85</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 18:15:55 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #84)
&gt; In that case, I think we can change webkit_web_page_get_id() to return the
&gt; WebPageProxyIdentifier instead of the PageIdentifier, and then we should be
&gt; good.

Yeah this works. Milan, please test:

diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
index c9204b23981..385dada2fc9 100644
--- a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
+++ b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp
@@ -764,7 +764,7 @@ guint64 webkit_web_page_get_id(WebKitWebPage* webPage)
 {
     g_return_val_if_fail(WEBKIT_IS_WEB_PAGE(webPage), 0);
 
-    return webPage-&gt;priv-&gt;webPage-&gt;pageID().toUInt64();
+    return webPage-&gt;priv-&gt;webPage-&gt;webPageProxyIdentifier().toUInt64();
 }
 
 /**

That&apos;s not going to fully fix your problem, because you filed this bug before this page ID trouble was introduced. But it&apos;s step one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567262</commentid>
    <comment_count>86</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-02 18:17:48 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #80)
&gt; The bug title says PSON but looking at the very initial report, it looks
&gt; like the issue is that there was code that expected a single WebProcess for
&gt; all WebViews. This does not really seem PSON related. I guess it is because
&gt; we dropped the process limit api. That said, we still support single process
&gt; mode, so I am not sure why evolution cannot use that.

P.S. The existing single process API is broken (see comment #12) and you told us not to add a non-broken version (in comment #30).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567287</commentid>
    <comment_count>87</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-02 23:02:29 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #85)
&gt; Yeah this works. Milan, please test:

I cannot test it at the moment, I switched to the webkit-2.26 branch, where Chris&apos; changes are not included. Compiling webkitgtk+ is kind of nightmare here, thus I will test it some time later. You can give it a try with Epiphany, when it comes to it, or with the provided test programs above.

&gt; That&apos;s not going to fully fix your problem, because you filed this bug
&gt; before this page ID trouble was introduced. But it&apos;s step one.

Right, it&apos;s not. Carlos gave me another patch to force single process behaviour with an environment variable, which fixes the initial problem for me.

diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
index 22a864591df..bf301edfe0b 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
@@ -348,6 +348,9 @@ ALLOW_DEPRECATED_DECLARATIONS_END
     } else if (!priv-&gt;localStorageDirectory.isNull())
         configuration.setLocalStorageDirectory(FileSystem::stringFromFileSystemRepresentation(priv-&gt;localStorageDirectory.data()));
 
+    const char* useSingleWebProcess = getenv(&quot;WEBKIT_USE_SINGLE_WEB_PROCESS&quot;);
+    if (useSingleWebProcess &amp;&amp; strcmp(useSingleWebProcess, &quot;0&quot;))
+        configuration.setUsesSingleWebProcess(true);
     priv-&gt;processPool = WebProcessPool::create(configuration);
 
     if (!priv-&gt;websiteDataManager)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567318</commentid>
    <comment_count>88</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-03 03:13:12 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #87)
&gt; (In reply to Michael Catanzaro from comment #85)
&gt; &gt; Yeah this works. Milan, please test:
&gt; 
&gt; I cannot test it at the moment, I switched to the webkit-2.26 branch, where
&gt; Chris&apos; changes are not included. Compiling webkitgtk+ is kind of nightmare
&gt; here, thus I will test it some time later.

Unless I made any error, it looks like with your patch from comment #85 the webkit_web_page_get_id() returns the same ID as webkit_web_view_get_page_id(), but webkit_web_extension_get_page() returns NULL for this ID.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567326</commentid>
    <comment_count>89</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-03 03:34:34 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #87)
&gt; I cannot test it at the moment, I switched to the webkit-2.26 branch, where
&gt; Chris&apos; changes are not included. Compiling webkitgtk+ is kind of nightmare
&gt; here, thus I will test it some time later. You can give it a try with
&gt; Epiphany, when it comes to it, or with the provided test programs above.

I checked Epiphany before posting the patch. It works. (Epiphany does not use webkit_web_extension_get_page().) But Evolution has additional problems, right?

(In reply to Milan Crha from comment #88)
&gt; Unless I made any error, it looks like with your patch from comment #85 the
&gt; webkit_web_page_get_id() returns the same ID as
&gt; webkit_web_view_get_page_id(), but webkit_web_extension_get_page() returns
&gt; NULL for this ID.

Oops, but fortunately that&apos;s also easy to fix:

diff --git a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
index e306e3fef26..a614d654f64 100644
--- a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
+++ b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
@@ -224,7 +224,7 @@ WebKitWebPage* webkit_web_extension_get_page(WebKitWebExtension* extension, guin
     WebKitWebExtensionPrivate* priv = extension-&gt;priv;
     WebPageMap::const_iterator end = priv-&gt;pages.end();
     for (WebPageMap::const_iterator it = priv-&gt;pages.begin(); it != end; ++it)
-        if (it-&gt;key-&gt;pageID().toUInt64() == pageID)
+        if (it-&gt;key-&gt;webPageProxyIdentifier().toUInt64() == pageID)
             return it-&gt;value.get();
 
     return 0;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567362</commentid>
    <comment_count>90</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-03 05:54:42 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #89)
&gt; But Evolution has additional problems, right?

Evolution has two problems:
1) it expects to have one WebKitWebProcess per one WebKitWebContext;
2) it relies on WebKitWebView::page-id match WebKitWebPage::id.

The first is this bug, the second is a regression after bug #201233. As it&apos;s too late in the release cycle an r249421 adds a workaround for 2.26 for the 1), giving more time to solve this in a better way - if on WebKitGTK+ side, Evolution side or both sides is to be figured out.

&gt; Oops, but fortunately that&apos;s also easy to fix:

Okay, that fixes evolution for the master branch as well (the 2) is not part of the webkit-2.26 branch).

Looking into the changes:

&gt; -        if (it-&gt;key-&gt;pageID().toUInt64() == pageID)
&gt; +        if (it-&gt;key-&gt;webPageProxyIdentifier().toUInt64() == pageID)

basically replacing pageID() with webPageProxyIdentifier() when checking against &apos;pageID&apos;, would it not make more sense to flip the two in the original change, thus keep consistency in the arguments and underlying code? I&apos;m pretty sure that somebody will consider this a bug when webPageProxyIdentifier() is compared with pageID, when there exists pageID() member, some time in the future. Maybe we should move the discussion to the original bug #201233 about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567369</commentid>
    <comment_count>91</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-03 06:57:09 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #90)
&gt; Evolution has two problems:
&gt; 1) it expects to have one WebKitWebProcess per one WebKitWebContext;
&gt; 2) it relies on WebKitWebView::page-id match WebKitWebPage::id.
&gt; 
&gt; The first is this bug

Right but (1) is not actually a bug, it&apos;s just the new intended behavior since 2.25.1 and Evolution will need to change somehow.

&gt; 2) it relies on WebKitWebView::page-id match WebKitWebPage::id.

Hopefully my two patches fix this.

(In reply to Milan Crha from comment #90)
&gt; Looking into the changes:
&gt; 
&gt; &gt; -        if (it-&gt;key-&gt;pageID().toUInt64() == pageID)
&gt; &gt; +        if (it-&gt;key-&gt;webPageProxyIdentifier().toUInt64() == pageID)
&gt; 
&gt; basically replacing pageID() with webPageProxyIdentifier() when checking
&gt; against &apos;pageID&apos;, would it not make more sense to flip the two in the
&gt; original change, thus keep consistency in the arguments and underlying code?
&gt; I&apos;m pretty sure that somebody will consider this a bug when
&gt; webPageProxyIdentifier() is compared with pageID, when there exists pageID()
&gt; member, some time in the future. Maybe we should move the discussion to the
&gt; original bug #201233 about this.

Good point. I don&apos;t know.

If we use the pageID members instead of WebPageProxyIdentifier, then the same WebKitWebView will change page IDs, which could occur at unexpected times and break applications.

If we use WebPageProxyIdentifier instead of pageID, the WebKitWebView will only ever expose a single ID, which is nice, but multiple WebKitWebPages will have the same ID, which might also break applications.

I don&apos;t know which is least-risky or less-likely to cause problems in practice.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567379</commentid>
    <comment_count>92</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-03 07:58:34 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #91)
&gt; If we use the pageID members instead of WebPageProxyIdentifier, then the
&gt; same WebKitWebView will change page IDs, which could occur at unexpected
&gt; times and break applications.
&gt; 
&gt; If we use WebPageProxyIdentifier instead of pageID, the WebKitWebView will
&gt; only ever expose a single ID, which is nice, but multiple WebKitWebPages
&gt; will have the same ID, which might also break applications.

From what I saw (see comment #41) there are up to four WebKitWebProcess-es running with the same page ID at the same time (with the svn trunk, not with webkit-2.26 branch).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567382</commentid>
    <comment_count>93</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-09-03 07:59:52 -0700</bug_when>
    <thetext>Yeah....

I guess multiple WebKitWebPages with the same ID is almost certain to cause problems (e.g. imagine storing them in a map keyed by page ID), so I suppose we should do the opposite of what my patches propose, and change WebKitWebView to return pageID instead of its Identifier, rather than changing WebKitWebPage and WebKitWebExtension.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567681</commentid>
    <comment_count>94</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-04 01:16:28 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #87)
&gt; +    const char* useSingleWebProcess =
&gt; getenv(&quot;WEBKIT_USE_SINGLE_WEB_PROCESS&quot;);
&gt; +    if (useSingleWebProcess &amp;&amp; strcmp(useSingleWebProcess, &quot;0&quot;))
&gt; +        configuration.setUsesSingleWebProcess(true);

With Michaels concerns about backward compatibility, and the above change already landed (r249421), what about flipping the above test, thus the default will be to use the SingleWebProcess, thus no old application will need any change, but new applications will be able to enable the multi-web processes using the same variable? Something like this:

 -    if (useSingleWebProcess &amp;&amp; strcmp(useSingleWebProcess, &quot;0&quot;))
 -        configuration.setUsesSingleWebProcess(true);
 +    configuration.setUsesSingleWebProcess(!useSingleWebProcess || strcmp(useSingleWebProcess, &quot;0&quot;))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567683</commentid>
    <comment_count>95</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-04 01:20:52 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #94)
&gt; (In reply to Milan Crha from comment #87)
&gt; &gt; +    const char* useSingleWebProcess =
&gt; &gt; getenv(&quot;WEBKIT_USE_SINGLE_WEB_PROCESS&quot;);
&gt; &gt; +    if (useSingleWebProcess &amp;&amp; strcmp(useSingleWebProcess, &quot;0&quot;))
&gt; &gt; +        configuration.setUsesSingleWebProcess(true);
&gt; 
&gt; With Michaels concerns about backward compatibility, and the above change
&gt; already landed (r249421), what about flipping the above test, thus the
&gt; default will be to use the SingleWebProcess, thus no old application will
&gt; need any change, but new applications will be able to enable the multi-web
&gt; processes using the same variable? Something like this:
&gt; 
&gt;  -    if (useSingleWebProcess &amp;&amp; strcmp(useSingleWebProcess, &quot;0&quot;))
&gt;  -        configuration.setUsesSingleWebProcess(true);
&gt;  +    configuration.setUsesSingleWebProcess(!useSingleWebProcess ||
&gt; strcmp(useSingleWebProcess, &quot;0&quot;))

That would break applications setting multi-process model, we want to encourage apps using single process model to adapt to multiprocess.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567700</commentid>
    <comment_count>96</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-04 03:12:58 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #84)
&gt; (In reply to Chris Dumez from comment #82)
&gt; &gt; Sure they will match. Why wouldn’t they?
&gt; 
&gt; In that case, I think we can change webkit_web_page_get_id() to return the
&gt; WebPageProxyIdentifier instead of the PageIdentifier, and then we should be
&gt; good.
&gt; 
&gt; I see webkit_web_view_get_page_id() is already returning the
&gt; WebPageProxyIdentifier, not the PageIdentifier, so that explains why the
&gt; view doesn&apos;t return different page IDs after a process swap, like I was
&gt; expecting it would. Nice.

That&apos;s a bug introduced in r249275. webkit_web_view_get_page_id() is expected to return the webPageID() not the identifier(), that would be webkit_web_view_get_id() that we don&apos;t really want to expose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567709</commentid>
    <comment_count>97</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-04 04:55:13 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #89)
&gt; (In reply to Milan Crha from comment #87)
&gt; &gt; I cannot test it at the moment, I switched to the webkit-2.26 branch, where
&gt; &gt; Chris&apos; changes are not included. Compiling webkitgtk+ is kind of nightmare
&gt; &gt; here, thus I will test it some time later. You can give it a try with
&gt; &gt; Epiphany, when it comes to it, or with the provided test programs above.
&gt; 
&gt; I checked Epiphany before posting the patch. It works. (Epiphany does not
&gt; use webkit_web_extension_get_page().) But Evolution has additional problems,
&gt; right?
&gt; 
&gt; (In reply to Milan Crha from comment #88)
&gt; &gt; Unless I made any error, it looks like with your patch from comment #85 the
&gt; &gt; webkit_web_page_get_id() returns the same ID as
&gt; &gt; webkit_web_view_get_page_id(), but webkit_web_extension_get_page() returns
&gt; &gt; NULL for this ID.
&gt; 
&gt; Oops, but fortunately that&apos;s also easy to fix:
&gt; 
&gt; diff --git
&gt; a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
&gt; b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
&gt; index e306e3fef26..a614d654f64 100644
&gt; --- a/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
&gt; +++ b/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
&gt; @@ -224,7 +224,7 @@ WebKitWebPage*
&gt; webkit_web_extension_get_page(WebKitWebExtension* extension, guin
&gt;      WebKitWebExtensionPrivate* priv = extension-&gt;priv;
&gt;      WebPageMap::const_iterator end = priv-&gt;pages.end();
&gt;      for (WebPageMap::const_iterator it = priv-&gt;pages.begin(); it != end;
&gt; ++it)
&gt; -        if (it-&gt;key-&gt;pageID().toUInt64() == pageID)
&gt; +        if (it-&gt;key-&gt;webPageProxyIdentifier().toUInt64() == pageID)
&gt;              return it-&gt;value.get();
&gt;  
&gt;      return 0;

I don&apos;t think this is correct, here we want the page identifier, which is what webkit_web_view_get_page_id() should return.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567712</commentid>
    <comment_count>98</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-04 05:18:41 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #95)
&gt; That would break applications setting multi-process model, we want to
&gt; encourage apps using single process model to adapt to multiprocess.

I understood there is no such setting, that&apos;s why the env variable had been added (otherwise I&apos;d use it and turn it off using WebKitGTK+ API). While I can understand your concern for new applications, Michaels concern about backward compatibility is also strong. Yes, it&apos;ll postpone the problem only one major release forward, but it&apos;s better than breaking the world now, when things are too new. Not talking that multiprocess never worked out-of-the-box anyway (comment #14). Eventually, make the deprecation less cruel (r249419), though old applications would still need to use the deprecated API to get the old behaviour (mine concern, an ideal state, is to not need to change anything in legacy applications, no matter what WebKitGTK+ they&apos;ll run (not compile) against).

I do not know how this works in Debian, but for Fedora the major release (2.26) would usually go only to Fedora 31, but webkit2gtk3 maintainers update it also for Fedora 30 and Fedora 29. It&apos;s fine as long as the update doesn&apos;t change soname versions and doesn&apos;t break existing applications. You cannot expect all the applications in Fedora 30 and 29 to be updated due to changes in WebKitGTK+, neither with soname version, nor with core functionality. That&apos;s even not allowed, when it comes to it. Michael wants to be able to do the updates in all three Fedoras and in Debian - without custom patches, I believe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567716</commentid>
    <comment_count>99</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-04 05:32:21 -0700</bug_when>
    <thetext>(In reply to Milan Crha from comment #98)
&gt; (In reply to Carlos Garcia Campos from comment #95)
&gt; &gt; That would break applications setting multi-process model, we want to
&gt; &gt; encourage apps using single process model to adapt to multiprocess.
&gt; 
&gt; I understood there is no such setting, that&apos;s why the env variable had been
&gt; added (otherwise I&apos;d use it and turn it off using WebKitGTK+ API). While I
&gt; can understand your concern for new applications, Michaels concern about
&gt; backward compatibility is also strong. Yes, it&apos;ll postpone the problem only
&gt; one major release forward, but it&apos;s better than breaking the world now, when
&gt; things are too new. Not talking that multiprocess never worked
&gt; out-of-the-box anyway (comment #14). Eventually, make the deprecation less
&gt; cruel (r249419), though old applications would still need to use the
&gt; deprecated API to get the old behaviour (mine concern, an ideal state, is to
&gt; not need to change anything in legacy applications, no matter what
&gt; WebKitGTK+ they&apos;ll run (not compile) against).

There&apos;s webkit_web_context_set_process_model() that receives a WebKitProcessModel. WEBKIT_PROCESS_MODEL_SHARED_SECONDARY_PROCESS was the default, that&apos;s why you didn&apos;t have to set it explicitly, but it&apos;s now deprecated. Normally, in case of deprecation, the old behavior is preserved, but in this case the feature has been removed for security reasons. I know this can be considered an API break, though. So, let&apos;s figure out if there are more apps that depend on the single process model to see what to do. If it&apos;s only evo, it&apos;s already fixed and we only need to ensure that for the next release cycle evo can work in multiprocess model.

&gt; I do not know how this works in Debian, but for Fedora the major release
&gt; (2.26) would usually go only to Fedora 31, but webkit2gtk3 maintainers
&gt; update it also for Fedora 30 and Fedora 29. It&apos;s fine as long as the update
&gt; doesn&apos;t change soname versions and doesn&apos;t break existing applications. You
&gt; cannot expect all the applications in Fedora 30 and 29 to be updated due to
&gt; changes in WebKitGTK+, neither with soname version, nor with core
&gt; functionality. That&apos;s even not allowed, when it comes to it. Michael wants
&gt; to be able to do the updates in all three Fedoras and in Debian - without
&gt; custom patches, I believe.

Right, that&apos;s why we first need to figure out what other apps are broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567717</commentid>
    <comment_count>100</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-09-04 05:34:41 -0700</bug_when>
    <thetext>btw, I think we should move the discussion about single process model deprecation somewhere else, and keep this bug for the page id mismatch in current trunk. Bug #200967 already covers the page-created issue when loading history items from the page cache.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1568009</commentid>
    <comment_count>101</comment_count>
    <who name="Milan Crha">mcrha</who>
    <bug_when>2019-09-04 22:50:08 -0700</bug_when>
    <thetext>For the record, I just reopened the Evolution bug (comment #0), which I&apos;ll use for changes on the Evolution side to work properly with multiple WebKitWebProcess-es being spawn for a single WebKitWebView.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1575480</commentid>
    <comment_count>102</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2019-10-01 03:22:55 -0700</bug_when>
    <thetext>I think we can close this. Bug #201642 handles the new API to monitor page id changes and bug #200967 will make PSON optional and disabled by default to keep backwards compatibility. Feel free to reopen if there are still problems with the ids.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>377009</attachid>
            <date>2019-08-22 08:44:13 -0700</date>
            <delta_ts>2019-08-23 01:00:38 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-201033-20190822184412.patch</filename>
            <type>text/plain</type>
            <size>7971</size>
            <attacher name="Claudio Saavedra">csaavedra</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQ5MDAwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IGI1OGZhNDMxNjQyZTdmNjMx
ZDkyZWJhOTAyODA2ZjFkODZhMzZmOTkuLjA3YWI1MzU5YTJlYTc3MjJlODQyMzRmMGZlZWE5ZjUw
NTlkMGZlNWEgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjUgQEAKKzIwMTktMDgtMjIgIENsYXVkaW8g
U2FhdmVkcmEgIDxjc2FhdmVkcmFAaWdhbGlhLmNvbT4KKworICAgICAgICBbV1BFXVtHVEtdIERl
cHJlY2F0ZSB3ZWIgcHJvY2VzcyBjb3VudCBsaW1pdCBhbmQgZXhwb3NlIHVzZXNTaW5nbGVXZWJQ
cm9jZXNzKCkKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTIwMTAzMworCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IFRoZSB3ZWIgcHJvY2VzcyBjb3VudCBsaW1pdCBnb3QgZGVwcmVjYXRlZCBhbmQgbWFkZSBpbnRv
IGEgbm8tb3AKKyAgICAgICAgaW4gcjI0MDM2Mywgc28gd2Ugc2hvdWxkIGRlcHJlY2F0ZSBpdCB0
b28uIEV4cG9zZSBpbnN0ZWFkIHRoZQorICAgICAgICBuZXdseSBhZGRlZCB1c2VzU2luZ2xlV2Vi
UHJvY2VzcyBTUEkuCisKKyAgICAgICAgKiBVSVByb2Nlc3MvQVBJ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pdF93ZWJfY29udGV4dF9kb3dubG9hZF91cmkK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>377109</attachid>
            <date>2019-08-23 01:00:42 -0700</date>
            <delta_ts>2019-08-29 23:36:30 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-201033-20190823110041.patch</filename>
            <type>text/plain</type>
            <size>9337</size>
            <attacher name="Claudio Saavedra">csaavedra</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQ5MDAwCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IGI1OGZhNDMxNjQyZTdmNjMx
ZDkyZWJhOTAyODA2ZjFkODZhMzZmOTkuLjRkYzk3ZWZlZmQ0YzM3OWViY2FjYWI1MDY4ZjNmMDgy
MzQ2NTkzYWIgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMzMgQEAKKzIwMTktMDgtMjIgIENsYXVkaW8g
U2FhdmVkcmEgIDxjc2FhdmVkcmFAaWdhbGlhLmNvbT4KKworICAgICAgICBbV1BFXVtHVEtdIERl
cHJlY2F0ZSB3ZWIgcHJvY2VzcyBjb3VudCBsaW1pdCBhbmQgZXhwb3NlIHVzZXNTaW5nbGVXZWJQ
cm9jZXNzKCkKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lk
PTIwMTAzMworCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IFRoZSB3ZWIgcHJvY2VzcyBjb3VudCBsaW1pdCBnb3QgZGVwcmVjYXRlZCBhbmQgbWFkZSBpbnRv
IGEgbm8tb3AKKyAgICAgIC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RfY2xlYXJfY2FjaGUgICAgICAgICAgICAgICAgICAgICAgKFdlYktpdFdl
YkNvbnRleHQgICAgICAgICAgICAgICpjb250ZXh0KTsKIApkaWZmIC0tZ2l0IGEvU291cmNlL1dl
YktpdC9VSVByb2Nlc3MvQVBJL3dwZS9kb2NzL3dwZS0xLjAtc2VjdGlvbnMudHh0IGIvU291cmNl
L1dlYktpdC9VSVByb2Nlc3MvQVBJL3dwZS9kb2NzL3dwZS0xLjAtc2VjdGlvbnMudHh0CmluZGV4
IDY0ZWEzMGU5M2NkNGU5ZGQyNGMzNjNmNzk3M2MwZWYwY2RjMGNhZWEuLjZkYjY0OWY3OWY0NWMw
OWUwN2FkZDk3MTg2MGFjOTNjZTU0OWI1NmUgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvVUlQ
cm9jZXNzL0FQSS93cGUvZG9jcy93cGUtMS4wLXNlY3Rpb25zLnR4dAorKysgYi9Tb3VyY2UvV2Vi
S2l0L1VJUHJvY2Vzcy9BUEkvd3BlL2RvY3Mvd3BlLTEuMC1zZWN0aW9ucy50eHQKQEAgLTE4LDYg
KzE4LDcgQEAgd2Via2l0X3dlYl9jb250ZXh0X2dldF9jYWNoZV9tb2RlbAogd2Via2l0X3dlYl9j
b250ZXh0X3NldF9jYWNoZV9tb2RlbAogd2Via2l0X3dlYl9jb250ZXh0X2dldF93ZWJfcHJvY2Vz
c19jb3VudF9saW1pdAogd2Via2l0X3dlYl9jb250ZXh0X3NldF93ZWJfcHJvY2Vzc19jb3VudF9s
aW1pdAord2Via2l0X3dlYl9jb250ZXh0X2dldF9zaW5nbGVfd2ViX3Byb2Nlc3MKIHdlYmtpdF93
ZWJfY29udGV4dF9jbGVhcl9jYWNoZQogd2Via2l0X3dlYl9jb250ZXh0X3NldF9uZXR3b3JrX3By
b3h5X3NldHRpbmdzCiB3ZWJraXRfd2ViX2NvbnRleHRfZG93bmxvYWRfdXJpCg==
</data>
<flag name="review"
          id="392879"
          type_id="1"
          status="-"
          setter="cgarcia"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>377687</attachid>
            <date>2019-08-30 01:39:34 -0700</date>
            <delta_ts>2019-08-30 01:39:34 -0700</delta_ts>
            <desc>test-wk2.c - reproducer client side</desc>
            <filename>test-wk2.c</filename>
            <type>text/plain</type>
            <size>6830</size>
            <attacher name="Milan Crha">mcrha</attacher>
            
              <data encoding="base64">LyogZ2NjIGBwa2ctY29uZmlnIC0tY2ZsYWdzIC0tbGlicyBndGsrLTMuMCB3ZWJraXQyZ3RrLTQu
MGAgdGVzdC13azIuYyAtZyAtTzAgLW8gdGVzdC13azIgJiYgLi90ZXN0LXdrMiAqLwoKI2luY2x1
ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgojaW5j
bHVkZSA8Z3RrL2d0ay5oPgojaW5jbHVkZSA8d2Via2l0Mi93ZWJraXQyLmg+CgpzdGF0aWMgR1Rp
bWVyICp0aW1lciA9IE5VTEw7CgpzdGF0aWMgdm9pZApyZWFkeV90b19zaG93X2NiIChXZWJLaXRX
ZWJWaWV3ICp3ZWJfdmlldywKCQkgIGdwb2ludGVyIHVzZXJfZGF0YSkKewoJcHJpbnRmICgiICAg
ICAlczogYWZ0ZXIgJWdzXG4iLCBfX0ZVTkNUSU9OX18sIGdfdGltZXJfZWxhcHNlZCAodGltZXIs
IE5VTEwpKTsKfQoKc3RhdGljIHZvaWQKbG9hZF9jaGFuZ2VkX2NiIChXZWJLaXRXZWJWaWV3ICp3
ZWJfdmlldywKCQkgV2ViS2l0TG9hZEV2ZW50IGxvYWRfZXZlbnQsCgkJIGdwb2ludGVyIHVzZXJf
ZGF0YSkKewoJcHJpbnRmICgiICAgICAlczogJXMgYWZ0ZXIgJWdzIG9uIHZpZXc6JXAgV2ViUGFn
ZSAlIiBHX0dVSU5UNjRfRk9STUFUICJcbiIsIF9fRlVOQ1RJT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CwKCQkid2lkdGgt
cmVxdWVzdCIsIDkwLAoJCU5VTEwpOwoKCXRpbWVyID0gZ190aW1lcl9uZXcgKCk7CglnX3NpZ25h
bF9jb25uZWN0ICh3aywgInJlYWR5LXRvLXNob3ciLCBHX0NBTExCQUNLIChyZWFkeV90b19zaG93
X2NiKSwgTlVMTCk7CglnX3NpZ25hbF9jb25uZWN0ICh3aywgImxvYWQtY2hhbmdlZCIsIEdfQ0FM
TEJBQ0sgKGxvYWRfY2hhbmdlZF9jYiksIE5VTEwpOwoJcHJpbnRmICgiJXM6ICVwOiBwYWdlLWlk
OiUiIEdfR1VJTlQ2NF9GT1JNQVQgIlxuIiwgX19GVU5DVElPTl9fLCB3aywgd2Via2l0X3dlYl92
aWV3X2dldF9wYWdlX2lkIChXRUJLSVRfV0VCX1ZJRVcgKHdrKSkpOwoJd2Via2l0X3dlYl92aWV3
X2xvYWRfaHRtbCAoV0VCS0lUX1dFQl9WSUVXICh3ayksIGh0bWxfY29udGVudCwgImZpbGU6Ly8i
KTsKCglnX3RpbWVvdXRfYWRkX3NlY29uZHMgKDMsIGNsYWltX3dlYl92aWV3X3BhZ2VfaWRfY2Is
IHdrKTsKCglndGtfd2lkZ2V0X3Nob3dfYWxsIChndGtfZGlhbG9nX2dldF9jb250ZW50X2FyZWEg
KEdUS19ESUFMT0cgKGRpYWxvZykpKTsKCS8vZ3RrX3dpZGdldF9oaWRlIChidG4pOwoKCWd0a19k
aWFsb2dfcnVuIChHVEtfRElBTE9HIChkaWFsb2cpKTsKCglndGtfd2lkZ2V0X2Rlc3Ryb3kgKGRp
YWxvZyk7CglnX3RpbWVyX2Rlc3Ryb3kgKHRpbWVyKTsKCglyZXR1cm4gMDsKfQo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>377688</attachid>
            <date>2019-08-30 01:41:24 -0700</date>
            <delta_ts>2019-08-30 01:41:24 -0700</delta_ts>
            <desc>test-wk2-extension.c - a WebExtension</desc>
            <filename>test-wk2-extension.c</filename>
            <type>text/plain</type>
            <size>1235</size>
            <attacher name="Milan Crha">mcrha</attacher>
            
              <data encoding="base64">LyogbWtkaXIgL3RtcC90ZXN0LXdrMi1leHRlbnNpb24gMj4vZGV2L251bGw7IGdjYyBgcGtnLWNv
bmZpZyAtLWNmbGFncyAtLWxpYnMgZ3RrKy0zLjAgd2Via2l0Mmd0ay00LjBgIHRlc3Qtd2syLWV4
dGVuc2lvbi5jIC1zaGFyZWQgLWZQSUMgLW8gL3RtcC90ZXN0LXdrMi1leHRlbnNpb24vdGVzdC13
azItZXh0ZW5zaW9uLnNvICovCgojaW5jbHVkZSA8c3lzL3R5cGVzLmg+CiNpbmNsdWRlIDx1bmlz
dGQuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDx3ZWJraXQyL3dlYmtpdC13ZWItZXh0
ZW5zaW9uLmg+CgpzdGF0aWMgdm9pZAp3ZWJfcGFnZV9nb25lIChncG9pbnRlciB1c2VyX2RhdGEs
CgkgICAgICAgR09iamVjdCAqb2JqKQp7CglwcmludGYgKCIlZCAgICVzOiBleHQ6JXAgcGFnZTol
cFxuIiwgZ2V0cGlkICgpLCBfX0ZVTkNUSU9OX18sIHVzZXJfZGF0YSwgb2JqKTsKfQoKc3RhdGlj
IHZvaWQKZXh0ZW5zaW9uX3BhZ2VfY3JlYXRlZF9jYiAoV2ViS2l0V2ViRXh0ZW5zaW9uICpleHRl
bnNpb24sCgkJCSAgIFdlYktpdFdlYlBhZ2UgKndlYl9wYWdlLAoJCQkgICBncG9pbnRlciB1c2Vy
X2RhdGEpCnsKCXByaW50ZiAoIiVkICAgJXM6IGV4dDolcCBwYWdlOiVwIGlkOiUiIEdfR1VJTlQ2
NF9GT1JNQVQgIlxuIiwgZ2V0cGlkICgpLCBfX0ZVTkNUSU9OX18sIGV4dGVuc2lvbiwgd2ViX3Bh
Z2UsIHdlYmtpdF93ZWJfcGFnZV9nZXRfaWQgKHdlYl9wY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