Bug 192318 - Update process assertions after swapping processes
Summary: Update process assertions after swapping processes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on: 192348
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-03 12:58 PST by Alex Christensen
Modified: 2018-12-03 20:16 PST (History)
8 users (show)

See Also:


Attachments
Patch (4.96 KB, patch)
2018-12-03 13:02 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (5.49 KB, patch)
2018-12-03 13:07 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2018-12-03 12:58:57 PST
Update process assertions after swapping processes
Comment 1 Alex Christensen 2018-12-03 13:02:25 PST
Created attachment 356395 [details]
Patch
Comment 2 Alex Christensen 2018-12-03 13:02:27 PST
<rdar://problem/46377552>
Comment 3 Chris Dumez 2018-12-03 13:06:22 PST
Comment on attachment 356395 [details]
Patch

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

> Source/WebKit/ChangeLog:10
> +        after navigation and process swapping we need the new WebProcess to update its process assertions.

typo: and process swapping -> and *after* ?

> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:1232
> +    // Take the process assertion from the old web process.

I would say:
// Transfer our background assertion from the old process to the new one.
Comment 4 Alex Christensen 2018-12-03 13:07:33 PST
Created attachment 356397 [details]
Patch
Comment 5 EWS Watchlist 2018-12-03 13:10:18 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 6 Alex Christensen 2018-12-03 13:20:17 PST
http://trac.webkit.org/r238817
Comment 8 Chris Dumez 2018-12-03 16:45:18 PST
(In reply to Truitt Savell from comment #7)
> It looks like the changes in https://trac.webkit.org/changeset/238817/webkit
> 
> may have caused sever process swap api failures on iOS. 
> 
> build:
> https://build.webkit.org/builders/
> Apple%20iOS%2012%20Simulator%20Release%20WK2%20%28Tests%29/builds/1316
> 
> output:
> https://build.webkit.org/builders/
> Apple%20iOS%2012%20Simulator%20Release%20WK2%20%28Tests%29/builds/1316/steps/
> run-api-tests/logs/stdio

Seems to indicate Page Cache is not working. My bet is that the suspension relies on the process assertion on the old process, which gets dropped in this patch when we take the assertion for the new process.

If so, we may need to SuspendedPageProxy to hold a background token for its WebProcess until SuspendedPageProxy::didFinishLoad() is called.
Comment 9 Chris Dumez 2018-12-03 20:16:26 PST
(In reply to Chris Dumez from comment #8)
> (In reply to Truitt Savell from comment #7)
> > It looks like the changes in https://trac.webkit.org/changeset/238817/webkit
> > 
> > may have caused sever process swap api failures on iOS. 
> > 
> > build:
> > https://build.webkit.org/builders/
> > Apple%20iOS%2012%20Simulator%20Release%20WK2%20%28Tests%29/builds/1316
> > 
> > output:
> > https://build.webkit.org/builders/
> > Apple%20iOS%2012%20Simulator%20Release%20WK2%20%28Tests%29/builds/1316/steps/
> > run-api-tests/logs/stdio
> 
> Seems to indicate Page Cache is not working. My bet is that the suspension
> relies on the process assertion on the old process, which gets dropped in
> this patch when we take the assertion for the new process.
> 
> If so, we may need to SuspendedPageProxy to hold a background token for its
> WebProcess until SuspendedPageProxy::didFinishLoad() is called.

Dealing with those API test failures via Bug 192348.