<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Update cookie manager API to properly work with ephemeral sessions"
   href="https://bugs.webkit.org/show_bug.cgi?id=168230#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GTK] Update cookie manager API to properly work with ephemeral sessions"
   href="https://bugs.webkit.org/show_bug.cgi?id=168230">bug 168230</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=168230#c3">comment #3</a>)
<span class="quote">&gt; Comment on <span class=""><a href="attachment.cgi?id=301345&amp;action=diff" name="attach_301345" title="Patch">attachment 301345</a> <a href="attachment.cgi?id=301345&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=301345&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=301345&amp;action=review</a>
&gt; 
&gt; &gt;&gt; Source/WebCore/platform/network/soup/CookieJarSoup.cpp:217
&gt; &gt;&gt; +        deleteAllCookies(session);
&gt; &gt; 
&gt; &gt; Are you planning to fix this soon? I don't think we should proceed with these API changes if the API does not work properly. At least add a runtime warning using g_warning().
&gt; 
&gt; (Sad OK if you add the g_warning().)
&gt; 
&gt; &gt; Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp:115
&gt; &gt; +    if (manager-&gt;priv-&gt;dataManager) {
&gt; &gt; +        g_object_remove_weak_pointer(G_OBJECT(manager-&gt;priv-&gt;dataManager), reinterpret_cast&lt;void**&gt;(&amp;manager-&gt;priv-&gt;dataManager));
&gt; &gt; +
&gt; &gt; +        auto sessionID = webkitWebsiteDataManagerGetDataStore(manager-&gt;priv-&gt;dataManager).websiteDataStore().sessionID();
&gt; &gt; +        for (auto* processPool : webkitWebsiteDataManagerGetProcessPools(manager-&gt;priv-&gt;dataManager))
&gt; &gt; +            processPool-&gt;supplement&lt;WebCookieManagerProxy&gt;()-&gt;stopObservingCookieChanges(sessionID);
&gt; &gt; +
&gt; &gt; +        manager-&gt;priv-&gt;dataManager = nullptr;
&gt; &gt; +    }
&gt; 
&gt; Actually, I wonder if we should do this in ~_WebKitCookieManagerPrivate()
&gt; instead of dispose. Because the object should technically be left in valid
&gt; state after dispose, but all of the functions are going to hit criticals if
&gt; priv-&gt;dataManager is null. Since we're not keeping a strong reference to it,
&gt; it can't be involved in a reference cycle, so it should be safer to do in
&gt; the destructor instead of dispose.</span >

I want to stop observing cookie changes asap, and I need to nullify the pointer to ensure it doesn't happen twice.</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>