Title: [238911] trunk/Source/WebKit
Revision
238911
Author
[email protected]
Date
2018-12-05 14:44:30 -0800 (Wed, 05 Dec 2018)

Log Message

Simplify logic inside WebPageProxy::continueNavigationInNewProcess()
https://bugs.webkit.org/show_bug.cgi?id=192404

Reviewed by Alex Christensen.

Simplify get the item state from the current back/forward list item, instead of
relying on WebBackForwardList::filteredItemStates().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (238910 => 238911)


--- trunk/Source/WebKit/ChangeLog	2018-12-05 22:34:51 UTC (rev 238910)
+++ trunk/Source/WebKit/ChangeLog	2018-12-05 22:44:30 UTC (rev 238911)
@@ -1,3 +1,16 @@
+2018-12-05  Chris Dumez  <[email protected]>
+
+        Simplify logic inside WebPageProxy::continueNavigationInNewProcess()
+        https://bugs.webkit.org/show_bug.cgi?id=192404
+
+        Reviewed by Alex Christensen.
+
+        Simplify get the item state from the current back/forward list item, instead of
+        relying on WebBackForwardList::filteredItemStates().
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::continueNavigationInNewProcess):
+
 2018-12-05  Youenn Fablet  <[email protected]>
 
         Enable the possibility to do video capture in UIProcess

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (238910 => 238911)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-12-05 22:34:51 UTC (rev 238910)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-12-05 22:44:30 UTC (rev 238911)
@@ -2700,14 +2700,10 @@
             return;
         }
 
-        if (navigation->lockBackForwardList() == LockBackForwardList::Yes || navigation->lockHistory() == LockHistory::Yes) {
+        if (m_backForwardList->currentItem() && (navigation->lockBackForwardList() == LockBackForwardList::Yes || navigation->lockHistory() == LockHistory::Yes)) {
             // If WebCore is supposed to lock the history for this load, then the new process needs to know about the current history item so it can update
             // it instead of creating a new one.
-            auto itemStates = m_backForwardList->filteredItemStates([currentItem = m_backForwardList->currentItem()](WebBackForwardListItem& item) {
-                return &item == currentItem;
-            });
-            RELEASE_ASSERT(itemStates.size() == 1);
-            m_process->send(Messages::WebPage::SetCurrentHistoryItemForReattach(itemStates[0]), m_pageID);
+            m_process->send(Messages::WebPage::SetCurrentHistoryItemForReattach(m_backForwardList->currentItem()->itemState()), m_pageID);
         }
 
         // FIXME: Work out timing of responding with the last policy delegate, etc
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to