Changeset 246188 in webkit


Ignore:
Timestamp:
Jun 6, 2019 10:46:03 PM (5 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
https://bugs.webkit.org/show_bug.cgi?id=198561

Reviewed by Chris Dumez.

This is another regression of delaying the web process launch until the first load. If the session is restored
before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
those cases, the history item is not marked as restored from session. We need to ensure the session is restored
in the web process from the IPC message handler, by launching the initial process before the session is
restored.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::restoreFromSessionState):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r246185 r246188  
     12019-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r243094): [GTK][WPE] Stale content after restoring the web view session
     4        https://bugs.webkit.org/show_bug.cgi?id=198561
     5
     6        Reviewed by Chris Dumez.
     7
     8        This is another regression of delaying the web process launch until the first load. If the session is restored
     9        before anything has been loaded, which is the normal way, the RestoreSession message is just ignored and the
     10        state is sent to the WebPage on creation via creation parameters. The WebPage considers that restoring a session
     11        from creation parameters only happens when re-launching a process after a crash or in case of process swap. In
     12        those cases, the history item is not marked as restored from session. We need to ensure the session is restored
     13        in the web process from the IPC message handler, by launching the initial process before the session is
     14        restored.
     15
     16        * UIProcess/WebPageProxy.cpp:
     17        (WebKit::WebPageProxy::restoreFromSessionState):
     18
    1192019-06-06  Youenn Fablet  <youenn@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r246136 r246188  
    30843084
    30853085    if (hasBackForwardList) {
     3086        // If there isn't a running process yet the RestoreSession message below is just ignored, and
     3087        // session is restored when the web process is created via creation parameters which is not
     3088        // considered an API request. So, we launch the initial process here before restoring the
     3089        // session to ensure the session is restored in the web process via RestoreSession IPC message
     3090        // which is considered an API request. See https://bugs.webkit.org/show_bug.cgi?id=198561.
     3091        launchInitialProcessIfNecessary();
     3092
    30863093        m_backForwardList->restoreFromState(WTFMove(sessionState.backForwardListState));
    30873094        process().send(Messages::WebPage::RestoreSession(m_backForwardList->itemStates()), m_pageID);
Note: See TracChangeset for help on using the changeset viewer.