Bug 184318 - Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations
Summary: Process Swap on Navigation causes many webpages to hang due to attempted proc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-04 15:06 PDT by Michael Saboff
Modified: 2018-04-05 16:18 PDT (History)
7 users (show)

See Also:


Attachments
Work in Progress Patch (3.50 KB, patch)
2018-04-04 15:11 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff
Patch (7.08 KB, patch)
2018-04-05 15:03 PDT, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2018-04-04 15:06:15 PDT
When Process Swap on Navigation is enabled, web pages that seem to have subresources from multiple origins hang.  Some pages hang after updating the page title and address bar.  Sometimes there appears to be a quick flash of web content.  These sites hang:
  - amazon.com
  - facebook.com
  - ebay.com
  - wikipedia.org after searching for something
  - cnn.com
  - netflix.com
Comment 1 Michael Saboff 2018-04-04 15:06:33 PDT
rdar://problem/39162236
Comment 2 Michael Saboff 2018-04-04 15:11:08 PDT
Created attachment 337231 [details]
Work in Progress Patch
Comment 3 Brady Eidson 2018-04-05 14:16:52 PDT
Comment on attachment 337231 [details]
Work in Progress Patch

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

I had fixed this locally, not knowing someone else was working on it.

My patch was simpler:

> Source/WebKit/UIProcess/WebPageProxy.cpp:2354
>          if (action == PolicyAction::Use && navigation) {
> -            auto proposedProcess = process().processPool().processForNavigation(*this, *navigation, action);
> +            auto proposedProcess = process().processPool().processForNavigation(*this, *navigation, action, frame.isMainFrame());

Instead of adding the new parameter, I just changed 2353 to:
-        if (action == PolicyAction::Use && navigation) {
+        if (action == PolicyAction::Use && navigation && frame.isMainFrame()) {
Comment 4 Brady Eidson 2018-04-05 14:17:56 PDT
That said, while the main frame patch definitely fixes things in MiniBrowser, for example... Safari still has problems with defersLoading. Sometimes.

That may or may not be related, so we should fix it separately.
Comment 5 Brady Eidson 2018-04-05 15:03:38 PDT
Created attachment 337304 [details]
Patch
Comment 6 EWS Watchlist 2018-04-05 15:05:05 PDT
Attachment 337304 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:700:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:702:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:710:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:712:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:714:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:717:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:721:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
Total errors found: 7 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Commit Bot 2018-04-05 16:18:05 PDT
Comment on attachment 337304 [details]
Patch

Clearing flags on attachment: 337304

Committed r230315: <https://trac.webkit.org/changeset/230315>
Comment 8 WebKit Commit Bot 2018-04-05 16:18:07 PDT
All reviewed patches have been landed.  Closing bug.