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

Changeset 286621 in webkit


Ignore:
Timestamp:
Dec 7, 2021, 2:06:29 PM (5 years ago)
Author:
Russell Epstein
Message:

Cherry-pick r286574. rdar://problem/86174696

Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=233874

Reviewed by Darin Adler.

r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
been created in the new provisional process, this would do a null-dereference of m_mainFrame.

To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
is that there is still a provisional load going on in the committed process/page.

No new tests, covered by existing test that is flakily crashing.

  • UIProcess/ProvisionalPageProxy.cpp: (WebKit::ProvisionalPageProxy::cancel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-613.1.11-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613.1.11-branch/Source/WebKit/ChangeLog

    r286606 r286621  
     12021-12-07  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r286574. rdar://problem/86174696
     4
     5    Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
     6    https://bugs.webkit.org/show_bug.cgi?id=233874
     7   
     8    Reviewed by Darin Adler.
     9   
     10    r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
     11    ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
     12    effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
     13    that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
     14    been created in the new provisional process, this would do a null-dereference of m_mainFrame.
     15   
     16    To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
     17    is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
     18    don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
     19    is that there is still a provisional load going on in the committed process/page.
     20   
     21    No new tests, covered by existing test that is flakily crashing.
     22   
     23    * UIProcess/ProvisionalPageProxy.cpp:
     24    (WebKit::ProvisionalPageProxy::cancel):
     25   
     26   
     27    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     28
     29    2021-12-06  Chris Dumez  <cdumez@apple.com>
     30
     31            Regression(r286505) imported/w3c/web-platform-tests/html/cross-origin-opener-policy/javascript-url.https.html is a flaky crash
     32            https://bugs.webkit.org/show_bug.cgi?id=233874
     33
     34            Reviewed by Darin Adler.
     35
     36            r286505 fixed ProvisionalPageProxy so that ProvisionalPageProxy::m_provisionalLoadURL gets properly initialized when the
     37            ProvisionalPageProxy gets constructed *after* the provisional load has already started (COOP proces-swap case). One side
     38            effect of this though is that ProvisionalPageProxy::cancel() no longer returns early and will try to notify the client
     39            that the provisional load failed, dereferencing m_mainFrame in doing so. In the event where the main frame has not yet
     40            been created in the new provisional process, this would do a null-dereference of m_mainFrame.
     41
     42            To address the issue, we now early return in ProvisionalPageProxy::cancel() if m_isProcessSwappingOnNavigationResponse
     43            is true (i.e. The ProvisionalPageProxy was created after the provisional load had started). In such situations, we
     44            don't want to ProvisionalPageProxy to be the one notifying the client of the provisional load failure anyway. The reason
     45            is that there is still a provisional load going on in the committed process/page.
     46
     47            No new tests, covered by existing test that is flakily crashing.
     48
     49            * UIProcess/ProvisionalPageProxy.cpp:
     50            (WebKit::ProvisionalPageProxy::cancel):
     51
    1522021-12-06  Alan Coon  <alancoon@apple.com>
    253
  • branches/safari-613.1.11-branch/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp

    r286505 r286621  
    144144{
    145145    // If the provisional load started, then indicate that it failed due to cancellation by calling didFailProvisionalLoadForFrame().
    146     if (m_provisionalLoadURL.isEmpty())
    147         return;
    148        
     146    if (m_provisionalLoadURL.isEmpty() || m_isProcessSwappingOnNavigationResponse)
     147        return;
     148
    149149    ASSERT(m_process->state() == WebProcessProxy::State::Running);
    150150
Note: See TracChangeset for help on using the changeset viewer.