Bug 168832

Summary: [iOS][WK2] Disable network cache speculative revalidation / loading in low power mode
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, kling, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.