<?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>55986</bug_id>
          
          <creation_ts>2011-03-08 17:20:29 -0800</creation_ts>
          <short_desc>Use the Cookie Storage from the Private Browsing Storage Session directly</short_desc>
          <delta_ts>2011-03-09 08:43:06 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jessie Berlin">jberlin</reporter>
          <assigned_to name="Jessie Berlin">jberlin</assigned_to>
          <cc>aroben</cc>
    
    <cc>jberlin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>364246</commentid>
    <comment_count>0</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-03-08 17:20:29 -0800</bug_when>
    <thetext>There is no need to create an in-memory copy because the Private Browsing Storage Session is already in-memory only.

&lt;rdar://problem/9102381&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364268</commentid>
    <comment_count>1</comment_count>
      <attachid>85119</attachid>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-03-08 18:02:49 -0800</bug_when>
    <thetext>Created attachment 85119
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364444</commentid>
    <comment_count>2</comment_count>
      <attachid>85119</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-09 05:15:52 -0800</bug_when>
    <thetext>Comment on attachment 85119
Patch

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

Why doesn&apos;t Mac need the CreateInMemory fallback path?

&gt; Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp:81
&gt; +        privateBrowsingCookieStorage() = wkCreateInMemoryHTTPCookieStorage();

You&apos;re leaking this CFHTTPCookieStorageRef.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364455</commentid>
    <comment_count>3</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-03-09 05:58:47 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 85119 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=85119&amp;action=review
&gt; 
&gt; Why doesn&apos;t Mac need the CreateInMemory fallback path?

Because if it isn&apos;t using the CFURLSTORAGESESSIONS, it calls wkSetCookieStoragePrivateBrowsingEnabled(enabled), which makes all cookies be stored in memory.

&gt; 
&gt; &gt; Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp:81
&gt; &gt; +        privateBrowsingCookieStorage() = wkCreateInMemoryHTTPCookieStorage();
&gt; 
&gt; You&apos;re leaking this CFHTTPCookieStorageRef.

Hrm, for some reason I thought the result of a Create wasn&apos;t already retained. Fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364473</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-03-09 06:44:28 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 85119 [details] [details])
&gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=85119&amp;action=review
&gt; &gt; 
&gt; &gt; Why doesn&apos;t Mac need the CreateInMemory fallback path?
&gt; 
&gt; Because if it isn&apos;t using the CFURLSTORAGESESSIONS, it calls wkSetCookieStoragePrivateBrowsingEnabled(enabled), which makes all cookies be stored in memory.

I guess I don&apos;t understand what the difference between Mac and Windows is here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364484</commentid>
    <comment_count>5</comment_count>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-03-09 07:12:06 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; (From update of attachment 85119 [details] [details] [details])
&gt; &gt; &gt; View in context: https://bugs.webkit.org/attachment.cgi?id=85119&amp;action=review
&gt; &gt; &gt; 
&gt; &gt; &gt; Why doesn&apos;t Mac need the CreateInMemory fallback path?
&gt; &gt; 
&gt; &gt; Because if it isn&apos;t using the CFURLSTORAGESESSIONS, it calls wkSetCookieStoragePrivateBrowsingEnabled(enabled), which makes all cookies be stored in memory.
&gt; 
&gt; I guess I don&apos;t understand what the difference between Mac and Windows is here.

wkSetCookieStoragePrivateBrowsingEnabled (and the functionality behind it) doesn&apos;t exist on Windows. wkSetCookieStoragePrivateBrowsingEnabled was the way it was done on Mac before my changes to add the CFURLSTORAGESESSIONS stuff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>364517</commentid>
    <comment_count>6</comment_count>
      <attachid>85119</attachid>
    <who name="Jessie Berlin">jberlin</who>
    <bug_when>2011-03-09 08:42:58 -0800</bug_when>
    <thetext>Comment on attachment 85119
Patch

Committed in r80643
http://trac.webkit.org/changeset/80643</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>85119</attachid>
            <date>2011-03-08 18:02:49 -0800</date>
            <delta_ts>2011-03-09 08:42:58 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>doNotCreatInMemoryStroageForPrivateBrowsingOpensource9102381Take3.patch</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="Jessie Berlin">jberlin</attacher>
            
              <data encoding="base64"></data>

          </attachment>
      

    </bug>

</bugzilla>