Bug 175922 - [iOS] ViewServices started by StoreKitUIService may get suspended unexpectedly
Summary: [iOS] ViewServices started by StoreKitUIService may get suspended unexpectedly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P1 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-23 20:11 PDT by Chris Dumez
Modified: 2017-08-24 08:59 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.14 KB, patch)
2017-08-23 20:16 PDT, 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-08-23 20:11:35 PDT
ViewServices started by StoreKitUIService may get suspended unexpectedly.
Comment 1 Chris Dumez 2017-08-23 20:11:57 PDT
<rdar://problem/34028921>
Comment 2 Chris Dumez 2017-08-23 20:16:12 PDT
Created attachment 318962 [details]
Patch
Comment 3 Tim Horton 2017-08-24 00:14:43 PDT
Comment on attachment 318962 [details]
Patch

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

> Source/WebKit/UIProcess/ApplicationStateTracker.mm:153
> +            m_isInBackground = false;

Can’t they just use the WKWebViewConfiguration SPI to be treated like they’re always in the foreground, like every other instance of this?
Comment 4 Tim Horton 2017-08-24 00:18:22 PDT
Comment on attachment 318962 [details]
Patch

If not, please kick back for review, but it seems wrong to special case this when we already have a mechanism to handle it. If this were a generic mechanism to handle doubly-service-hosted web views, that would be a different story.
Comment 5 Tim Horton 2017-08-24 00:20:54 PDT
Specifically, I am referring to _setAlwaysRunsAtForegroundPriority:
Comment 6 Yongjun Zhang 2017-08-24 06:29:59 PDT
(In reply to Tim Horton from comment #5)
> Specifically, I am referring to _setAlwaysRunsAtForegroundPriority:

The host app doesn’t have access to WKWebview since it is using Safari view controller.
Comment 7 WebKit Commit Bot 2017-08-24 08:59:27 PDT
Comment on attachment 318962 [details]
Patch

Clearing flags on attachment: 318962

Committed r221138: <http://trac.webkit.org/changeset/221138>
Comment 8 WebKit Commit Bot 2017-08-24 08:59:29 PDT
All reviewed patches have been landed.  Closing bug.