Bug 198380 - [iOS] UIProcess' background task expiration handler may get called after the app is foreground again
Summary: [iOS] UIProcess' background task expiration handler may get called after the ...
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: 2019-05-30 10:26 PDT by Chris Dumez
Modified: 2019-06-04 08:46 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.34 KB, patch)
2019-05-30 10:29 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (4.44 KB, patch)
2019-06-02 14:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (3.41 KB, patch)
2019-06-04 08:30 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 2019-05-30 10:26:48 PDT
UIProcess' background task expiration handler may get called after the app is foreground again. When this happens, we already have a foreground assertion on behalf of the WebContent process, and the view is visible. We would send the WillSuspendImminently IPC to the WebContent process, which would freeze its layers, even though it is visible on screen.
Comment 1 Chris Dumez 2019-05-30 10:27:07 PDT
<rdar://problem/49762471>
Comment 2 Chris Dumez 2019-05-30 10:29:48 PDT
Created attachment 370951 [details]
Patch
Comment 3 Geoffrey Garen 2019-05-30 11:04:14 PDT
Comment on attachment 370951 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2019-05-30 12:34:25 PDT
Comment on attachment 370951 [details]
Patch

Clearing flags on attachment: 370951

Committed r245899: <https://trac.webkit.org/changeset/245899>
Comment 5 WebKit Commit Bot 2019-05-30 12:34:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Chris Dumez 2019-05-31 16:11:08 PDT
Reverted r245899 for reason:

Seems to be causing crashes on iosmac

Committed r245992: <https://trac.webkit.org/changeset/245992>
Comment 7 Chris Dumez 2019-06-02 14:55:42 PDT
Created attachment 371163 [details]
Patch
Comment 8 Chris Dumez 2019-06-02 14:58:45 PDT
Comment on attachment 371163 [details]
Patch

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

> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:165
> +#if !PLATFORM(IOSMAC)

Temporarily disabling on IOSMAC due to <rdar://problem/51313780>.
Comment 9 Chris Dumez 2019-06-04 08:30:48 PDT
Created attachment 371284 [details]
Patch
Comment 10 WebKit Commit Bot 2019-06-04 08:46:51 PDT
Comment on attachment 371284 [details]
Patch

Clearing flags on attachment: 371284

Committed r246064: <https://trac.webkit.org/changeset/246064>
Comment 11 WebKit Commit Bot 2019-06-04 08:46:52 PDT
All reviewed patches have been landed.  Closing bug.