Bug 172540 - [Win] Create unique network storage session for each DRT.
Summary: [Win] Create unique network storage session for each DRT.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-24 08:22 PDT by Per Arne Vollan
Modified: 2017-05-30 20:23 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.60 KB, patch)
2017-05-24 08:27 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2017-05-24 08:22:39 PDT
During layout testing, each DRT instance should have its own network storage session.
Comment 1 Per Arne Vollan 2017-05-24 08:27:31 PDT
Created attachment 311119 [details]
Patch
Comment 2 Brent Fulgham 2017-05-24 08:46:48 PDT
Comment on attachment 311119 [details]
Patch

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

Wow -- I wonder how many problems this has caused in Windows testing over the years!?!  Thanks for fixing this. r=me.

> Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp:95
> +    session = adoptCF(wkCreatePrivateStorageSession(sessionName.createCFString().get(), defaultStorageSession().platformSession()));

It's weird that we have NetworkStorageSession::defaultStorageSession() and NetworkStorageSession::defaultNetworkStorageSession(). How does anyone know which one to use?

It looks like 'defaultNetworkStorageSession' just returns the (potentially uninitialized) storage session, while 'defaultStorageSession' builds a new one if it doesn't exist.

Maybe this was some kind of optimization, where you only needed to call the more expensive version at launch or something?
Comment 3 Per Arne Vollan 2017-05-24 08:53:30 PDT
(In reply to Brent Fulgham from comment #2)
> Comment on attachment 311119 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=311119&action=review
> 
> Wow -- I wonder how many problems this has caused in Windows testing over
> the years!?!  Thanks for fixing this. r=me.
> 
> > Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp:95
> > +    session = adoptCF(wkCreatePrivateStorageSession(sessionName.createCFString().get(), defaultStorageSession().platformSession()));
> 
> It's weird that we have NetworkStorageSession::defaultStorageSession() and
> NetworkStorageSession::defaultNetworkStorageSession(). How does anyone know
> which one to use?
> 
> It looks like 'defaultNetworkStorageSession' just returns the (potentially
> uninitialized) storage session, while 'defaultStorageSession' builds a new
> one if it doesn't exist.
> 
> Maybe this was some kind of optimization, where you only needed to call the
> more expensive version at launch or something?

Yes, I had to use defaultStorageSession the first time, otherwise it would crash. Thanks for reviewing!
Comment 4 WebKit Commit Bot 2017-05-24 09:22:16 PDT
Comment on attachment 311119 [details]
Patch

Clearing flags on attachment: 311119

Committed r217370: <http://trac.webkit.org/changeset/217370>
Comment 5 WebKit Commit Bot 2017-05-24 09:22:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-05-30 20:23:49 PDT
<rdar://problem/32479766>