Bug 168832 - [iOS][WK2] Disable network cache speculative revalidation / loading in low power mode
Summary: [iOS][WK2] Disable network cache speculative revalidation / loading in low po...
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: 2017-02-24 09:52 PST by Chris Dumez
Modified: 2017-02-24 11:53 PST (History)
4 users (show)

See Also:


Attachments
Patch (18.64 KB, patch)
2017-02-24 11:16 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-02-24 09:52:04 PST
Disable network cache speculative revalidation / loading in low power mode on iOS to save battery.
Comment 1 Radar WebKit Bug Importer 2017-02-24 09:52:39 PST
<rdar://problem/30697911>
Comment 2 Chris Dumez 2017-02-24 11:16:04 PST
Created attachment 302676 [details]
Patch
Comment 3 Antti Koivisto 2017-02-24 11:28:17 PST
Comment on attachment 302676 [details]
Patch

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

> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:85
> +                m_speculativeLoadManager = nullptr;

Have you verified that SpeculativeLoadManager can deal with being deleted while having ongoing requests? I think it is a new scenario. It could be tested with simulated repeated switches to low power and back while browsing.
Comment 4 Chris Dumez 2017-02-24 11:39:54 PST
(In reply to comment #3)
> Comment on attachment 302676 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=302676&action=review
> 
> > Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:85
> > +                m_speculativeLoadManager = nullptr;
> 
> Have you verified that SpeculativeLoadManager can deal with being deleted
> while having ongoing requests? I think it is a new scenario. It could be
> tested with simulated repeated switches to low power and back while browsing.

I'll try with simulated switches. I tried with manual ones but triggering them during a load is not super easy.
Comment 5 Chris Dumez 2017-02-24 11:53:07 PST
Comment on attachment 302676 [details]
Patch

Clearing flags on attachment: 302676

Committed r212965: <http://trac.webkit.org/changeset/212965>
Comment 6 Chris Dumez 2017-02-24 11:53:13 PST
All reviewed patches have been landed.  Closing bug.