Bug 211632

Summary: Make WKWebViewConfiguration._alwaysRunsAtForegroundPriority an alias for _clientNavigationsRunAtForegroundPriority
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, ggaren, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2020-05-08 10:27:36 PDT
Make WKWebViewConfiguration._alwaysRunsAtForegroundPriority an alias for _clientNavigationsRunAtForegroundPriority. _alwaysRunsAtForegroundPriority is a frequent source of process assertion leaks that get blamed on WebKit. Clients are using this in order to be able to do loads in background views so _clientNavigationsRunAtForegroundPriority should suffice and is not leak prone since the process assertion is released after the navigation has completed.
Comment 1 Chris Dumez 2020-05-08 10:28:42 PDT
Created attachment 398873 [details]
Patch
Comment 2 Alex Christensen 2020-05-08 10:35:00 PDT
Comment on attachment 398873 [details]
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:94
> +@property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_API_AVAILABLE(ios(9_0)); // This is now an alias for _clientNavigationsRunAtForegroundPriority.

WK_API_DEPRECATED_WITH_REPLACEMENT
Comment 3 Chris Dumez 2020-05-08 10:48:15 PDT
(In reply to Alex Christensen from comment #2)
> Comment on attachment 398873 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=398873&action=review
> 
> > Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:94
> > +@property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_API_AVAILABLE(ios(9_0)); // This is now an alias for _clientNavigationsRunAtForegroundPriority.
> 
> WK_API_DEPRECATED_WITH_REPLACEMENT

Isn't it going to cause build failures?
Comment 4 Tim Horton 2020-05-08 11:03:13 PDT
(In reply to Chris Dumez from comment #3)
> (In reply to Alex Christensen from comment #2)
> > Comment on attachment 398873 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=398873&action=review
> > 
> > > Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:94
> > > +@property (nonatomic, setter=_setAlwaysRunsAtForegroundPriority:) BOOL _alwaysRunsAtForegroundPriority WK_API_AVAILABLE(ios(9_0)); // This is now an alias for _clientNavigationsRunAtForegroundPriority.
> > 
> > WK_API_DEPRECATED_WITH_REPLACEMENT
> 
> Isn't it going to cause build failures?

Not in places that matter (only at people's desks, which will then inspire them to fix things).
Comment 5 Chris Dumez 2020-05-08 11:30:59 PDT
Created attachment 398877 [details]
Patch
Comment 6 Chris Dumez 2020-05-08 13:10:30 PDT
Comment on attachment 398877 [details]
Patch

Clearing flags on attachment: 398877

Committed r261407: <https://trac.webkit.org/changeset/261407>
Comment 7 Chris Dumez 2020-05-08 13:10:31 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2020-05-08 13:11:18 PDT
<rdar://problem/63033129>