Bug 198553 - Cookies set via [WKHTTPCookieStore setCookie:] on store right after constructing WKWebView get lost
Summary: Cookies set via [WKHTTPCookieStore setCookie:] on store right after construct...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-04 20:01 PDT by Chris Dumez
Modified: 2020-01-27 08:29 PST (History)
7 users (show)

See Also:


Attachments
Patch (6.13 KB, patch)
2019-06-04 20:10 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
crash log (62.22 KB, text/plain)
2019-06-05 09:28 PDT, Shawn Roberts
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2019-06-04 20:01:29 PDT
Cookies set via [WKHTTPCookieStore setCookie:] on store right after constructing WKWebView get lost when the store is the ephemeral one.
Comment 1 Chris Dumez 2019-06-04 20:02:18 PDT
<rdar://problem/51317144>
Comment 2 Chris Dumez 2019-06-04 20:10:53 PDT
Created attachment 371368 [details]
Patch
Comment 3 Geoffrey Garen 2019-06-04 20:21:59 PDT
Comment on attachment 371368 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2019-06-04 22:00:29 PDT
Comment on attachment 371368 [details]
Patch

Clearing flags on attachment: 371368

Committed r246097: <https://trac.webkit.org/changeset/246097>
Comment 5 WebKit Commit Bot 2019-06-04 22:00:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Shawn Roberts 2019-06-05 09:28:01 PDT
Created attachment 371409 [details]
crash log
Comment 7 Shawn Roberts 2019-06-05 09:28:39 PDT
New API test added in r246097 is getting an assertion failure on Mac Debug builds

TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession

run-api-tests TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession --debug

ASSERTION FAILED: m_websiteDataStore
        /Volumes/Data/worker/liberty-debug-archive/build/OpenSource/Source/WebKit/UIProcess/WebProcessProxy.h(128) : WebKit::WebsiteDataStore &WebKit::WebProcessProxy::websiteDataStore() const
        1   0x107254da9 WTFCrash
        2   0x10cdd6d1b WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x10d6df5a9 WebKit::WebProcessProxy::websiteDataStore() const
        4   0x10dcd8bec WebKit::WebsiteDataStore::processPoolForCookieStorageOperations()
        5   0x10da1e62b API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
        6   0x10da1e7bd API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
        7   0x10dce7596 API::HTTPCookieStore::create(WebKit::WebsiteDataStore&)
        8   0x10dce74ff WebKit::WebsiteDataStore::cookieStore()
        9   0x10da3d931 API::WebsiteDataStore::httpCookieStore()
Comment 8 Chris Dumez 2019-06-05 09:29:35 PDT
(In reply to Shawn Roberts from comment #7)
> New API test added in r246097 is getting an assertion failure on Mac Debug
> builds
> 
> TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession
> 
> run-api-tests
> TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession
> --debug
> 
> ASSERTION FAILED: m_websiteDataStore
>        
> /Volumes/Data/worker/liberty-debug-archive/build/OpenSource/Source/WebKit/
> UIProcess/WebProcessProxy.h(128) : WebKit::WebsiteDataStore
> &WebKit::WebProcessProxy::websiteDataStore() const
>         1   0x107254da9 WTFCrash
>         2   0x10cdd6d1b WTFCrashWithInfo(int, char const*, char const*, int)
>         3   0x10d6df5a9 WebKit::WebProcessProxy::websiteDataStore() const
>         4   0x10dcd8bec
> WebKit::WebsiteDataStore::processPoolForCookieStorageOperations()
>         5   0x10da1e62b
> API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
>         6   0x10da1e7bd
> API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
>         7   0x10dce7596
> API::HTTPCookieStore::create(WebKit::WebsiteDataStore&)
>         8   0x10dce74ff WebKit::WebsiteDataStore::cookieStore()
>         9   0x10da3d931 API::WebsiteDataStore::httpCookieStore()

Looking into this now.
Comment 9 Chris Dumez 2019-06-05 09:58:10 PDT
(In reply to Chris Dumez from comment #8)
> (In reply to Shawn Roberts from comment #7)
> > New API test added in r246097 is getting an assertion failure on Mac Debug
> > builds
> > 
> > TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession
> > 
> > run-api-tests
> > TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession
> > --debug
> > 
> > ASSERTION FAILED: m_websiteDataStore
> >        
> > /Volumes/Data/worker/liberty-debug-archive/build/OpenSource/Source/WebKit/
> > UIProcess/WebProcessProxy.h(128) : WebKit::WebsiteDataStore
> > &WebKit::WebProcessProxy::websiteDataStore() const
> >         1   0x107254da9 WTFCrash
> >         2   0x10cdd6d1b WTFCrashWithInfo(int, char const*, char const*, int)
> >         3   0x10d6df5a9 WebKit::WebProcessProxy::websiteDataStore() const
> >         4   0x10dcd8bec
> > WebKit::WebsiteDataStore::processPoolForCookieStorageOperations()
> >         5   0x10da1e62b
> > API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
> >         6   0x10da1e7bd
> > API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
> >         7   0x10dce7596
> > API::HTTPCookieStore::create(WebKit::WebsiteDataStore&)
> >         8   0x10dce74ff WebKit::WebsiteDataStore::cookieStore()
> >         9   0x10da3d931 API::WebsiteDataStore::httpCookieStore()
> 
> Looking into this now.

Trivial fix, will land shortly.
Comment 10 Chris Dumez 2019-06-05 10:01:54 PDT
(In reply to Chris Dumez from comment #9)
> (In reply to Chris Dumez from comment #8)
> > (In reply to Shawn Roberts from comment #7)
> > > New API test added in r246097 is getting an assertion failure on Mac Debug
> > > builds
> > > 
> > > TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession
> > > 
> > > run-api-tests
> > > TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPoolEphemeralSession
> > > --debug
> > > 
> > > ASSERTION FAILED: m_websiteDataStore
> > >        
> > > /Volumes/Data/worker/liberty-debug-archive/build/OpenSource/Source/WebKit/
> > > UIProcess/WebProcessProxy.h(128) : WebKit::WebsiteDataStore
> > > &WebKit::WebProcessProxy::websiteDataStore() const
> > >         1   0x107254da9 WTFCrash
> > >         2   0x10cdd6d1b WTFCrashWithInfo(int, char const*, char const*, int)
> > >         3   0x10d6df5a9 WebKit::WebProcessProxy::websiteDataStore() const
> > >         4   0x10dcd8bec
> > > WebKit::WebsiteDataStore::processPoolForCookieStorageOperations()
> > >         5   0x10da1e62b
> > > API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
> > >         6   0x10da1e7bd
> > > API::HTTPCookieStore::HTTPCookieStore(WebKit::WebsiteDataStore&)
> > >         7   0x10dce7596
> > > API::HTTPCookieStore::create(WebKit::WebsiteDataStore&)
> > >         8   0x10dce74ff WebKit::WebsiteDataStore::cookieStore()
> > >         9   0x10da3d931 API::WebsiteDataStore::httpCookieStore()
> > 
> > Looking into this now.
> 
> Trivial fix, will land shortly.

<https://trac.webkit.org/changeset/246110>