<?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>147139</bug_id>
          
          <creation_ts>2015-07-20 19:54:03 -0700</creation_ts>
          <short_desc>API::Session should clean up its storage in the network process when destroyed.</short_desc>
          <delta_ts>2015-07-21 12:55:47 -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>Page Loading</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Andreas Kling">kling</reporter>
          <assigned_to name="Andreas Kling">kling</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>commit-queue</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1110875</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2015-07-20 19:54:03 -0700</bug_when>
    <thetext>&lt;rdar://problem/21838764&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110876</commentid>
    <comment_count>1</comment_count>
      <attachid>257157</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2015-07-20 20:02:18 -0700</bug_when>
    <thetext>Created attachment 257157
Proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110878</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2015-07-20 20:03:54 -0700</bug_when>
    <thetext>*** Bug 147138 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110880</commentid>
    <comment_count>3</comment_count>
      <attachid>257157</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-07-20 20:17:12 -0700</bug_when>
    <thetext>Comment on attachment 257157
Proposed patch

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

&gt; Source/WebKit2/ChangeLog:3
&gt; +        API::Session should clean up its storage in the network process when destroyed.

Shouldn&apos;t it do the same for WebContent processes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110882</commentid>
    <comment_count>4</comment_count>
      <attachid>257157</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2015-07-20 20:27:52 -0700</bug_when>
    <thetext>Comment on attachment 257157
Proposed patch

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

&gt;&gt; Source/WebKit2/ChangeLog:3
&gt;&gt; +        API::Session should clean up its storage in the network process when destroyed.
&gt; 
&gt; Shouldn&apos;t it do the same for WebContent processes?

Hm, for the WebContent processes I only see calls that send:

    Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID())

So they always use the same SessionID, never anything created by WKSessionCreate()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110883</commentid>
    <comment_count>5</comment_count>
      <attachid>257157</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-07-20 20:39:08 -0700</bug_when>
    <thetext>Comment on attachment 257157
Proposed patch

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

&gt;&gt;&gt; Source/WebKit2/ChangeLog:3
&gt;&gt;&gt; +        API::Session should clean up its storage in the network process when destroyed.
&gt;&gt; 
&gt;&gt; Shouldn&apos;t it do the same for WebContent processes?
&gt; 
&gt; Hm, for the WebContent processes I only see calls that send:
&gt; 
&gt;     Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID())
&gt; 
&gt; So they always use the same SessionID, never anything created by WKSessionCreate()

It looks like WebContent processes get the session ID using WebPage::SetSessionID messages. I don&apos;t know why it&apos;s done differently for these processes now, would consult with Anders.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110960</commentid>
    <comment_count>6</comment_count>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2015-07-21 10:36:46 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Comment on attachment 257157 [details]

&gt; It looks like WebContent processes get the session ID using
&gt; WebPage::SetSessionID messages. I don&apos;t know why it&apos;s done differently for
&gt; these processes now, would consult with Anders.

I think it&apos;s less important for the web processes since they have a much shorter lifespan (usually).

Going forward, WKSessionRef should go away in favor of WebsiteDataStore, and it should be impossible to change sessions after the fact (since we haven&apos;t supported that feature since Mountain Lion).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110992</commentid>
    <comment_count>7</comment_count>
      <attachid>257157</attachid>
    <who name="Andreas Kling">kling</who>
    <bug_when>2015-07-21 12:01:58 -0700</bug_when>
    <thetext>Comment on attachment 257157
Proposed patch

Thanks for the comment, Anders. cq+&apos;ing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1111013</commentid>
    <comment_count>8</comment_count>
      <attachid>257157</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-07-21 12:55:42 -0700</bug_when>
    <thetext>Comment on attachment 257157
Proposed patch

Clearing flags on attachment: 257157

Committed r187115: &lt;http://trac.webkit.org/changeset/187115&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1111014</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2015-07-21 12:55:47 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>257157</attachid>
            <date>2015-07-20 20:02:18 -0700</date>
            <delta_ts>2015-07-21 12:55:42 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>bug-147139.diff</filename>
            <type>text/plain</type>
            <size>1685</size>
            <attacher name="Andreas Kling">kling</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCAyN2U1ODEzLi5lZjUxNDRkIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTgg
QEAKKzIwMTUtMDctMjAgIEFuZHJlYXMgS2xpbmcgIDxha2xpbmdAYXBwbGUuY29tPgorCisgICAg
ICAgIEFQSTo6U2Vzc2lvbiBzaG91bGQgY2xlYW4gdXAgaXRzIHN0b3JhZ2UgaW4gdGhlIG5ldHdv
cmsgcHJvY2VzcyB3aGVuIGRlc3Ryb3llZC4KKyAgICAgICAgPGh0dHBzOi8vd2Via2l0Lm9yZy9i
LzE0NzEzOT4KKyAgICAgICAgPHJkYXI6Ly9wcm9ibGVtLzIxODM4NzY0PgorCisgICAgICAgIFJl
dmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEhhdmUgflNlc3Npb24oKSBzZW5k
IGEgRGVzdHJveVByaXZhdGVCcm93c2luZ1Nlc3Npb24gbWVzc2FnZSB0byBhbGwgbmV0d29ya2lu
ZyBwcm9jZXNzZXMKKyAgICAgICAgZm9yIGVwaGVtZXJhbCBzZXNzaW9ucy4gVGhpcyBwbHVncyBh
IE5ldHdvcmtTdG9yYWdlU2Vzc2lvbiBsZWFrIHRoYXQgY291bGQgcmV0YWluIGEgbGFyZ2UKKyAg
ICAgICAgQ0ZOZXR3b3JrIG9iamVjdCBnc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