Bug 172540

Summary: [Win] Create unique network storage session for each DRT.
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: Tools / TestsAssignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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>