Changeset 241401 in webkit


Ignore:
Timestamp:
Feb 13, 2019 1:07:23 AM (5 years ago)
Author:
rniwa@webkit.org
Message:

Crash in Page::setActivityState because m_page is null
https://bugs.webkit.org/show_bug.cgi?id=194584

Reviewed by Antti Koivisto.

Add a null check to avoid the crash. Also add a debug assertion to help diagnose this in the future.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setActivityState):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r241352 r241401  
     12019-02-13  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash in Page::setActivityState because m_page is null
     4        https://bugs.webkit.org/show_bug.cgi?id=194584
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Add a null check to avoid the crash. Also add a debug assertion to help diagnose this in the future.
     9
     10        * WebProcess/WebPage/WebPage.cpp:
     11        (WebKit::WebPage::setActivityState):
     12
    1132019-02-13  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r241321 r241401  
    30463046        updateThrottleState();
    30473047
    3048     {
     3048    ASSERT_WITH_MESSAGE(m_page, "setActivityState called on %lld but WebCore page was null", pageID());
     3049    if (m_page) {
    30493050        SetForScope<bool> currentlyChangingActivityState { m_changingActivityState, true };
    30503051        m_page->setActivityState(activityState);
Note: See TracChangeset for help on using the changeset viewer.