Changeset 222163 in webkit


Ignore:
Timestamp:
Sep 18, 2017 11:01:48 AM (7 years ago)
Author:
pvollan@apple.com
Message:

[WK1] Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing.
https://bugs.webkit.org/show_bug.cgi?id=177071

Reviewed by Brent Fulgham.

The Page pointer in the history controller's frame is null. Add a null pointer check before
accessing the page.

No new tests, covered by exiting tests.

  • loader/HistoryController.cpp:

(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r222154 r222163  
     12017-09-18  Per Arne Vollan  <pvollan@apple.com>
     2
     3        [WK1] Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing.
     4        https://bugs.webkit.org/show_bug.cgi?id=177071
     5
     6        Reviewed by Brent Fulgham.
     7
     8        The Page pointer in the history controller's frame is null. Add a null pointer check before
     9        accessing the page.
     10
     11        No new tests, covered by exiting tests.
     12
     13        * loader/HistoryController.cpp:
     14        (WebCore::HistoryController::updateForStandardLoad):
     15        (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
     16        (WebCore::HistoryController::updateForClientRedirect):
     17
    1182017-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Source/WebCore/loader/HistoryController.cpp

    r215580 r222163  
    382382    FrameLoader& frameLoader = m_frame.loader();
    383383
    384     bool needPrivacy = m_frame.page()->usesEphemeralSession();
     384    bool needPrivacy = m_frame.page() ? m_frame.page()->usesEphemeralSession() : true;
    385385    const URL& historyURL = frameLoader.documentLoader()->urlForHistory();
    386386
     
    416416    LOG(History, "HistoryController %p updateForRedirectWithLockedBackForwardList: Updating History for redirect load in frame %p (main frame %d) %s", this, &m_frame, m_frame.isMainFrame(), m_frame.loader().documentLoader() ? m_frame.loader().documentLoader()->url().string().utf8().data() : "");
    417417   
    418     bool needPrivacy = m_frame.page()->usesEphemeralSession();
     418    bool needPrivacy = m_frame.page() ? m_frame.page()->usesEphemeralSession() : true;
    419419    const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
    420420
     
    461461    }
    462462
    463     bool needPrivacy = m_frame.page()->usesEphemeralSession();
     463    bool needPrivacy = m_frame.page() ? m_frame.page()->usesEphemeralSession() : true;
    464464    const URL& historyURL = m_frame.loader().documentLoader()->urlForHistory();
    465465
     
    550550        return;
    551551
    552     if (m_frame.page()->usesEphemeralSession())
    553         return;
    554 
    555552    Page* page = m_frame.page();
    556553    if (!page)
     554        return;
     555
     556    if (page->usesEphemeralSession())
    557557        return;
    558558
     
    894894    m_currentItem->setFormContentType(String());
    895895
     896    ASSERT(m_frame.page());
    896897    if (m_frame.page()->usesEphemeralSession())
    897898        return;
    898899
    899     ASSERT(m_frame.page());
    900900    addVisitedLink(*m_frame.page(), URL(ParsedURLString, urlString));
    901901    m_frame.loader().client().updateGlobalHistory();
Note: See TracChangeset for help on using the changeset viewer.