Bug 188242 - httpCookieStore.getAllCookies() does not always call completion block
Summary: httpCookieStore.getAllCookies() does not always call completion block
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
: 174007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-08-01 15:59 PDT by Sihui Liu
Modified: 2018-08-02 15:23 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.50 KB, patch)
2018-08-01 16:03 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews205 for win-future (12.93 MB, application/zip)
2018-08-01 23:15 PDT, EWS Watchlist
no flags Details
Patch for landing (8.37 KB, patch)
2018-08-02 14:42 PDT, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2018-08-01 15:59:00 PDT
When the view is not visible, network process is put to suspension. We need to take a background assertion during cookie API call.
Comment 1 Sihui Liu 2018-08-01 16:03:49 PDT
Created attachment 346310 [details]
Patch
Comment 2 EWS Watchlist 2018-08-01 23:15:10 PDT
Comment on attachment 346310 [details]
Patch

Attachment 346310 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8734158

New failing tests:
imported/blink/transitions/unprefixed-transform.html
legacy-animation-engine/imported/blink/transitions/unprefixed-transform.html
Comment 3 EWS Watchlist 2018-08-01 23:15:22 PDT
Created attachment 346359 [details]
Archive of layout-test-results from ews205 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews205  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 4 Chris Dumez 2018-08-02 12:38:15 PDT
Comment on attachment 346310 [details]
Patch

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

r=me with nits.

> Source/WebKit/ChangeLog:4
> +        https://bugs.webkit.org/show_bug.cgi?id=188242

Is there a radar tracking this as well?

> Source/WebKit/UIProcess/GenericCallback.h:199
>      CallbackID put(Function<void(T...)>&& function)

Is anyone still relying on this overload? If not, we should probably drop it.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:113
> +    auto callbackID = m_callbacks.put(WTFMove(callbackFunction), processPool()->networkProcess()->throttler().backgroundActivityToken());

processPool()->ensureNetworkProcess().throttler().backgroundActivityToken()
Then omit the line above.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:140
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:147
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:154
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:161
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:168
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:175
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:262
> +    processPool()->ensureNetworkProcess();

ditto.

> Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:269
> +    processPool()->ensureNetworkProcess();

ditto.
Comment 5 Sihui Liu 2018-08-02 14:37:20 PDT
(In reply to Chris Dumez from comment #4)
> Comment on attachment 346310 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=346310&action=review
> 
> r=me with nits.
> 
> > Source/WebKit/ChangeLog:4
> > +        https://bugs.webkit.org/show_bug.cgi?id=188242
> 
> Is there a radar tracking this as well?
> 
I think it's <rdar://problem/33122061>.

> > Source/WebKit/UIProcess/GenericCallback.h:199
> >      CallbackID put(Function<void(T...)>&& function)
> 
> Is anyone still relying on this overload? If not, we should probably drop it.
> 
No, so dropping.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:113
> > +    auto callbackID = m_callbacks.put(WTFMove(callbackFunction), processPool()->networkProcess()->throttler().backgroundActivityToken());
> 
> processPool()->ensureNetworkProcess().throttler().backgroundActivityToken()
> Then omit the line above.
> 
> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:140
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:147
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:154
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:161
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:168
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:175
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:262
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
> 
Done.

> > Source/WebKit/UIProcess/WebCookieManagerProxy.cpp:269
> > +    processPool()->ensureNetworkProcess();
> 
> ditto.
Done.
Comment 6 Sihui Liu 2018-08-02 14:42:05 PDT
Created attachment 346419 [details]
Patch for landing
Comment 7 Sihui Liu 2018-08-02 14:44:26 PDT
*** Bug 174007 has been marked as a duplicate of this bug. ***
Comment 8 WebKit Commit Bot 2018-08-02 15:21:02 PDT
Comment on attachment 346419 [details]
Patch for landing

Clearing flags on attachment: 346419

Committed r234518: <https://trac.webkit.org/changeset/234518>
Comment 9 WebKit Commit Bot 2018-08-02 15:21:03 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2018-08-02 15:23:11 PDT
<rdar://problem/42875795>