⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 238456 in webkit


Ignore:
Timestamp:
Nov 22, 2018, 8:36:38 PM (8 years ago)
Author:
Chris Dumez
Message:

Regression(r238353) Load sometimes hangs when navigating back after a cross-site navigation
https://bugs.webkit.org/show_bug.cgi?id=191914

Reviewed by Ryosuke Niwa.

Source/WebKit:

When process-swapping on a cross-site server-side redirect, we end up doing a decidePolicyForNavigationResponse
policy check for the about:blank suspension load. This policy decision is ignored by the UIProcess because
SuspendedPageProxy does not handle this particular IPC message. To handle the issue, make sure the WebProcess
never sends a DecidePolicyForNavigationResponse IPC to the UIProcess for about:blank suspension loads and let
the load proceed.

The issue was already there before r238353 but it was made obvious by r238353 which caused a hang when trying
to reuse a Suspended page which is hanging while trying to suspend.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r238455 r238456  
     12018-11-22  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r238353) Load sometimes hangs when navigating back after a cross-site navigation
     4        https://bugs.webkit.org/show_bug.cgi?id=191914
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        When process-swapping on a cross-site server-side redirect, we end up doing a decidePolicyForNavigationResponse
     9        policy check for the about:blank suspension load. This policy decision is ignored by the UIProcess because
     10        SuspendedPageProxy does not handle this particular IPC message. To handle the issue, make sure the WebProcess
     11        never sends a DecidePolicyForNavigationResponse IPC to the UIProcess for about:blank suspension loads and let
     12        the load proceed.
     13
     14        The issue was already there before r238353 but it was made obvious by r238353 which caused a hang when trying
     15        to reuse a Suspended page which is hanging while trying to suspend.
     16
     17        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     18        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
     19
    1202018-11-22  Wenson Hsieh  <wenson_hsieh@apple.com>
    221
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r238212 r238456  
    739739    }
    740740
     741    // For suspension loads to about:blank, no need to ask the SuspendedPageProxy.
     742    if (request.url() == blankURL() && webPage->isSuspended()) {
     743        function(PolicyAction::Use);
     744        return;
     745    }
     746
    741747    RefPtr<API::Object> userData;
    742748
  • trunk/Tools/ChangeLog

    r238448 r238456  
     12018-11-22  Chris Dumez  <cdumez@apple.com>
     2
     3        Regression(r238353) Load sometimes hangs when navigating back after a cross-site navigation
     4        https://bugs.webkit.org/show_bug.cgi?id=191914
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Add API test coverage.
     9
     10        * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
     11
    1122018-11-22  Zalan Bujtas  <zalan@apple.com>
    213
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm

    r238368 r238456  
    13201320    EXPECT_EQ(3, numberOfDecidePolicyCalls);
    13211321    EXPECT_EQ(2u, seenPIDs.size());
     1322
     1323    EXPECT_WK_STREQ(@"pson://www.apple.com/main.html", [[webView URL] absoluteString]);
     1324
     1325    [webView goBack];
     1326
     1327    TestWebKitAPI::Util::run(&done);
     1328    done = false;
     1329
     1330    EXPECT_WK_STREQ(@"pson://www.webkit.org/main1.html", [[webView URL] absoluteString]);
    13221331}
    13231332
Note: See TracChangeset for help on using the changeset viewer.