<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Icon Database should be in private browsing mode for ephemeral web views"
   href="https://bugs.webkit.org/show_bug.cgi?id=167414#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Icon Database should be in private browsing mode for ephemeral web views"
   href="https://bugs.webkit.org/show_bug.cgi?id=167414">bug 167414</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=167414#c3">comment #3</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=299687&amp;action=diff" name="attach_299687" title="Patch">attachment 299687</a> <a href="attachment.cgi?id=299687&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=299687&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=299687&amp;action=review</a>
&gt; 
&gt; Exactly the sort of thing I was worried about with allowing a per-view
&gt; ephemeral setting... will there be more?</span >

This is not because we allow per-webview ephemeral setting, but because the icon database works only with the legacy private browsing setting.

<span class="quote">&gt; &gt; Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:785
&gt; &gt; +        // We notify the context here to ensure it's called only once. Ideally we should
&gt; &gt; +        // call this in finalize, not dispose, but finalize is used internally and we don't
&gt; &gt; +        // have access to the instance pointer from the private struct destructor.
&gt; &gt; +        webkitWebContextWebViewDestroyed(webView-&gt;priv-&gt;context.get(), webView);
&gt; 
&gt; I don't understand this. Of course you can move the call to
&gt; webkitWebContextWebViewDestroyed finalize? Why not? What do you mean it's
&gt; used internally?</span >

Finalize is defined by WEBKIT_DEFINE_TYPE. So when we want to do something on finalize we use the private instance constructor, but that approach doesn't work when you also need access to the pointer of the object instance.

<span class="quote">&gt; &gt; Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:163
&gt; &gt; +static void testPrivateBrowsing(FaviconDatabaseTest* test)
&gt; 
&gt; Shouldn't you add a test for an ephemeral web context as well?</span >

It's the same thing, as I said this is not happening because of per-webview setting. An ephemeral context simply creates ephemeral web views.

<span class="quote">&gt; &gt; Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitFaviconDatabase.cpp:173
&gt; &gt; +    // An ephemeral web view should nto write to the database.
&gt; 
&gt; nto -&gt; not</span >

Oops.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>