Changeset 239305 in webkit


Ignore:
Timestamp:
Dec 17, 2018 5:32:34 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Fix occasional null-dereference crash in WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame
https://bugs.webkit.org/show_bug.cgi?id=192744
<rdar://problem/45842668>

Patch by Alex Christensen <achristensen@webkit.org> on 2018-12-17
Reviewed by Chris Dumez.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
Things happen. Navigations can be null. If they are, we shouldn't dereference pointers to them.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r239294 r239305  
     12018-12-17  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix occasional null-dereference crash in WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame
     4        https://bugs.webkit.org/show_bug.cgi?id=192744
     5        <rdar://problem/45842668>
     6
     7        Reviewed by Chris Dumez.
     8
     9        * UIProcess/WebPageProxy.cpp:
     10        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
     11        Things happen.  Navigations can be null.  If they are, we shouldn't dereference pointers to them.
     12
    1132018-12-17  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r239266 r239305  
    37743774
    37753775    // FIXME: We should message check that navigationID is not zero here, but it's currently zero for some navigations through the page cache.
    3776     RefPtr<API::Navigation> navigation;
    3777     if (navigationID) {
    3778         navigation = navigationState().navigation(navigationID);
     3776    RefPtr<API::Navigation> navigation = navigationID ? navigationState().navigation(navigationID) : nullptr;
     3777    if (navigation)
    37793778        navigation->appendRedirectionURL(request.url());
    3780     }
    37813779
    37823780    auto transaction = m_pageLoadState.transaction();
Note: See TracChangeset for help on using the changeset viewer.