Changeset 225859 in webkit


Ignore:
Timestamp:
Dec 13, 2017 11:26:08 AM (6 years ago)
Author:
Simon Fraser
Message:

Fix crash under Document::visualUpdatesSuppressionTimerFired()
https://bugs.webkit.org/show_bug.cgi?id=180758
Document::visualUpdatesSuppressionTimerFired

Reviewed by Zalan Bujtas.

Speculative fix for crash under visualUpdatesSuppressionTimerFired() where view()
can be null. Add null checks for the view() in all code called from this function.

  • dom/Document.cpp:

(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::visualUpdatesSuppressionTimerFired):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r225855 r225859  
     12017-12-13  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix crash under Document::visualUpdatesSuppressionTimerFired()
     4        https://bugs.webkit.org/show_bug.cgi?id=180758
     5        Document::visualUpdatesSuppressionTimerFired
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Speculative fix for crash under visualUpdatesSuppressionTimerFired() where view()
     10        can be null. Add null checks for the view() in all code called from this function.
     11
     12        * dom/Document.cpp:
     13        (WebCore::Document::setVisualUpdatesAllowed):
     14        (WebCore::Document::visualUpdatesSuppressionTimerFired):
     15
    1162017-12-13  Zalan Bujtas  <zalan@apple.com>
    217
  • trunk/Source/WebCore/dom/Document.cpp

    r225827 r225859  
    12351235            ASSERT(!m_visualUpdatesAllowed);
    12361236
    1237             if (!view()->visualUpdatesAllowedByClient())
     1237            if (view() && !view()->visualUpdatesAllowedByClient())
    12381238                return;
    12391239
     
    12731273    }
    12741274
    1275     if (view())
    1276         view()->updateCompositingLayersAfterLayout();
     1275    if (frameView)
     1276        frameView->updateCompositingLayersAfterLayout();
    12771277
    12781278    if (RenderView* renderView = this->renderView())
     
    12891289    // If the client is extending the visual update suppression period explicitly, the
    12901290    // watchdog should not re-enable visual updates itself, but should wait for the client.
    1291     if (!view()->visualUpdatesAllowedByClient())
     1291    if (view() && !view()->visualUpdatesAllowedByClient())
    12921292        return;
    12931293
Note: See TracChangeset for help on using the changeset viewer.