Title: [241961] branches/safari-608.1.5.1-branch

Diff

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog (241960 => 241961)


--- branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog	2019-02-22 20:31:20 UTC (rev 241960)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog	2019-02-22 20:31:23 UTC (rev 241961)
@@ -1,5 +1,9 @@
 2019-02-22  Babak Shafiei  <[email protected]>
 
+        Revert r241606. rdar://problem/47884404
+
+2019-02-22  Babak Shafiei  <[email protected]>
+
         Revert r241631. rdar://problem/48126255
 
 2019-02-22  Babak Shafiei  <[email protected]>

Modified: branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (241960 => 241961)


--- branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-02-22 20:31:20 UTC (rev 241960)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-02-22 20:31:23 UTC (rev 241961)
@@ -241,7 +241,6 @@
 #define MESSAGE_CHECK_URL(process, url) MESSAGE_CHECK_BASE(checkURLReceivedFromCurrentOrPreviousWebProcess(process, url), process->connection())
 
 #define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), channel, "%p - WebPageProxy::" fmt, this, ##__VA_ARGS__)
-#define RELEASE_LOG_ERROR_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), channel, "%p - WebPageProxy::" fmt, this, ##__VA_ARGS__)
 
 // Represents the number of wheel events we can hold in the queue before we start pushing them preemptively.
 static const unsigned wheelEventQueueSizeThreshold = 10;
@@ -757,36 +756,23 @@
         return false;
 
     // If the client forced a swap then it may not be Web-compatible to suspend the previous page because other windows may have an opener link to the page.
-    if (processSwapRequestedByClient == ProcessSwapRequestedByClient::Yes) {
-        RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because the swap was requested by the client", m_process->processIdentifier());
+    if (processSwapRequestedByClient == ProcessSwapRequestedByClient::Yes)
         return false;
-    }
 
-    if (isPageOpenedByDOMShowingInitialEmptyDocument()) {
-        RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because it is showing the initial empty document", m_process->processIdentifier());
+    if (isPageOpenedByDOMShowingInitialEmptyDocument())
         return false;
-    }
 
     auto* fromItem = navigation.fromItem();
     if (!fromItem) {
-        RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because the navigation does not have a fromItem", m_process->processIdentifier());
+        LOG(ProcessSwapping, "WebPageProxy %" PRIu64 " unable to create suspended page for process pid %i - No current back/forward item", pageID(), m_process->processIdentifier());
         return false;
     }
 
     // If the source and the destination back / forward list items are the same, then this is a client-side redirect. In this case,
     // there is no need to suspend the previous page as there will be no way to get back to it.
-    if (fromItem == m_backForwardList->currentItem()) {
-        RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because this is a client-side redirect", m_process->processIdentifier());
+    if (fromItem == m_backForwardList->currentItem())
         return false;
-    }
 
-    if (fromItem->url() != pageLoadState().url()) {
-        RELEASE_LOG_ERROR_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Not suspending current page for process pid %i because fromItem's URL does not match the page URL.", m_process->processIdentifier());
-        ASSERT_NOT_REACHED();
-        return false;
-    }
-
-    RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "suspendCurrentPageIfPossible: Suspending current page for process pid %i", m_process->processIdentifier());
     auto suspendedPage = std::make_unique<SuspendedPageProxy>(*this, m_process.copyRef(), *fromItem, *mainFrameID);
 
     LOG(ProcessSwapping, "WebPageProxy %" PRIu64 " created suspended page %s for process pid %i, back/forward item %s" PRIu64, pageID(), suspendedPage->loggingString(), m_process->processIdentifier(), fromItem->itemID().logString());
@@ -2829,7 +2815,6 @@
     LOG(Loading, "Continuing navigation %" PRIu64 " '%s' in a new web process", navigation.navigationID(), navigation.loggingString());
 
     if (m_provisionalPage) {
-        RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "continueNavigationInNewProcess: There is already a pending provisional load, cancelling it (provisonalNavigationID: %llu, navigationID: %llu)", m_provisionalPage->navigationID(), navigation.navigationID());
         if (m_provisionalPage->navigationID() != navigation.navigationID())
             m_provisionalPage->cancel();
         m_provisionalPage = nullptr;
@@ -5461,12 +5446,6 @@
 
 void WebPageProxy::backForwardGoToItem(const BackForwardItemIdentifier& itemID, SandboxExtension::Handle& sandboxExtensionHandle)
 {
-    // On process swap, we tell the previous process to ignore the load, which causes it so restore its current back forward item to its previous
-    // value. Since the load is really going on in a new provisional process, we want to ignore such requests from the committed process.
-    // Any real new load in the committed process would have cleared m_provisionalPage.
-    if (m_provisionalPage)
-        return;
-
     backForwardGoToItemShared(m_process.copyRef(), itemID, sandboxExtensionHandle);
 }
 

Modified: branches/safari-608.1.5.1-branch/Tools/ChangeLog (241960 => 241961)


--- branches/safari-608.1.5.1-branch/Tools/ChangeLog	2019-02-22 20:31:20 UTC (rev 241960)
+++ branches/safari-608.1.5.1-branch/Tools/ChangeLog	2019-02-22 20:31:23 UTC (rev 241961)
@@ -1,5 +1,9 @@
 2019-02-22  Babak Shafiei  <[email protected]>
 
+        Revert r241606. rdar://problem/47884404
+
+2019-02-22  Babak Shafiei  <[email protected]>
+
         Revert r241752. rdar://problem/48055151
 
 2019-02-19  Alan Coon  <[email protected]>

Modified: branches/safari-608.1.5.1-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (241960 => 241961)


--- branches/safari-608.1.5.1-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2019-02-22 20:31:20 UTC (rev 241960)
+++ branches/safari-608.1.5.1-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm	2019-02-22 20:31:23 UTC (rev 241961)
@@ -2020,81 +2020,6 @@
     runNavigationWithLockedHistoryTest(ShouldEnablePSON::Yes);
 }
 
-static void runQuickBackForwardNavigationTest(ShouldEnablePSON shouldEnablePSON)
-{
-    auto processPoolConfiguration = psonProcessPoolConfiguration();
-    processPoolConfiguration.get().processSwapsOnNavigation = shouldEnablePSON == ShouldEnablePSON::Yes ? YES : NO;
-    auto processPool = adoptNS([[WKProcessPool alloc] _initWithConfiguration:processPoolConfiguration.get()]);
-
-    auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    [webViewConfiguration setProcessPool:processPool.get()];
-    auto handler = adoptNS([[PSONScheme alloc] init]);
-    [webViewConfiguration setURLSchemeHandler:handler.get() forURLScheme:@"pson"];
-
-    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]);
-    auto delegate = adoptNS([[PSONNavigationDelegate alloc] init]);
-    [webView setNavigationDelegate:delegate.get()];
-
-    [webView configuration].preferences.safeBrowsingEnabled = NO;
-
-    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]];
-    [webView loadRequest:request];
-
-    TestWebKitAPI::Util::run(&done);
-    done = false;
-
-    auto webkitPID = [webView _webProcessIdentifier];
-
-    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main2.html"]];
-    [webView loadRequest:request];
-
-    TestWebKitAPI::Util::run(&done);
-    done = false;
-
-    EXPECT_EQ(webkitPID, [webView _webProcessIdentifier]);
-
-    request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.apple.com/main.html"]];
-    [webView loadRequest:request];
-
-    TestWebKitAPI::Util::run(&done);
-    done = false;
-
-    auto applePID = [webView _webProcessIdentifier];
-    if (shouldEnablePSON == ShouldEnablePSON::Yes)
-        EXPECT_NE(webkitPID, applePID);
-    else
-        EXPECT_EQ(webkitPID, applePID);
-
-    for (unsigned i = 0; i < 10; ++i) {
-        [webView goBack];
-        TestWebKitAPI::Util::sleep(0.1);
-        [webView goForward];
-        TestWebKitAPI::Util::spinRunLoop(0.1);
-    }
-
-    Vector<String> backForwardListURLs;
-    auto* backForwardList = [webView backForwardList];
-    for (unsigned i = 0; i < backForwardList.backList.count; ++i)
-        backForwardListURLs.append([backForwardList.backList[i].URL absoluteString]);
-    backForwardListURLs.append([backForwardList.currentItem.URL absoluteString]);
-    for (unsigned i = 0; i < backForwardList.forwardList.count; ++i)
-        backForwardListURLs.append([backForwardList.forwardList[i].URL absoluteString]);
-    EXPECT_EQ(3u, backForwardListURLs.size());
-    EXPECT_WK_STREQ("pson://www.webkit.org/main1.html", backForwardListURLs[0]);
-    EXPECT_WK_STREQ("pson://www.webkit.org/main2.html", backForwardListURLs[1]);
-    EXPECT_WK_STREQ("pson://www.apple.com/main.html", backForwardListURLs[2]);
-}
-
-TEST(ProcessSwap, QuickBackForwardNavigationWithoutPSON)
-{
-    runQuickBackForwardNavigationTest(ShouldEnablePSON::No);
-}
-
-TEST(ProcessSwap, QuickBackForwardNavigationWithPSON)
-{
-    runQuickBackForwardNavigationTest(ShouldEnablePSON::Yes);
-}
-
 TEST(ProcessSwap, NavigationWithLockedHistoryWithoutPSON)
 {
     runNavigationWithLockedHistoryTest(ShouldEnablePSON::No);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to