Bug 186097 - Take a background process assertion in WebPageProxy::callAfterNextPresentationUpdate()
Summary: Take a background process assertion in WebPageProxy::callAfterNextPresentatio...
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: 2018-05-30 08:47 PDT by Chris Dumez
Modified: 2018-06-01 06:40 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.69 KB, patch)
2018-05-30 08:48 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.78 KB, patch)
2018-05-30 12:28 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 2018-05-30 08:47:14 PDT
Take a background process assertion in WebPageProxy::callAfterNextPresentationUpdate() otherwise, apps may get stuck on _doAfterNextPresentationUpdate because the WebProcess got suspended.
Comment 1 Radar WebKit Bug Importer 2018-05-30 08:47:42 PDT
<rdar://problem/40651225>
Comment 2 Chris Dumez 2018-05-30 08:48:42 PDT
Created attachment 341575 [details]
Patch
Comment 3 WebKit Commit Bot 2018-05-30 10:42:56 PDT
Comment on attachment 341575 [details]
Patch

Clearing flags on attachment: 341575

Committed r232298: <https://trac.webkit.org/changeset/232298>
Comment 4 WebKit Commit Bot 2018-05-30 10:42:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Tim Horton 2018-05-30 11:15:24 PDT
Dan points out that callbackMap.put takes a BackgroundActivityToken parameter, which RemoteLayerTreeDrawingAreaProxy currently passes nullptr to:
    m_webPageProxy.process().send(Messages::DrawingArea::AddTransactionCallbackID(m_callbacks.put(WTFMove(callbackFunction), nullptr)), m_webPageProxy.pageID());

So this fix probably should have just made that non-null instead of capturing a BackgroundActivityToken elsewhere.
Comment 6 Chris Dumez 2018-05-30 11:53:26 PDT
Reopening to apply comments.
Comment 7 Chris Dumez 2018-05-30 12:28:45 PDT
Created attachment 341594 [details]
Patch
Comment 8 mitz 2018-05-30 13:04:11 PDT
Comment on attachment 341594 [details]
Patch

Even better!
Comment 9 WebKit Commit Bot 2018-05-30 13:37:56 PDT
Comment on attachment 341594 [details]
Patch

Clearing flags on attachment: 341594

Committed r232307: <https://trac.webkit.org/changeset/232307>
Comment 10 WebKit Commit Bot 2018-05-30 13:37:58 PDT
All reviewed patches have been landed.  Closing bug.