Changeset 242115 in webkit


Ignore:
Timestamp:
Feb 26, 2019 4:36:36 PM (5 years ago)
Author:
Alan Bujtas
Message:

Do not try to observe the timer when Page is nullptr
https://bugs.webkit.org/show_bug.cgi?id=195076

Reviewed by Tim Horton.

Covered by fast/dom/Window/timer-null-script-execution-context.html.

  • page/DOMTimer.cpp:

(WebCore::DOMTimer::install):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r242113 r242115  
     12019-02-26  Zalan Bujtas  <zalan@apple.com>
     2
     3        Do not try to observe the timer when Page is nullptr
     4        https://bugs.webkit.org/show_bug.cgi?id=195076
     5
     6        Reviewed by Tim Horton.
     7
     8        Covered by fast/dom/Window/timer-null-script-execution-context.html.
     9
     10        * page/DOMTimer.cpp:
     11        (WebCore::DOMTimer::install):
     12
    1132019-02-20  Jer Noble  <jer.noble@apple.com>
    214
  • trunk/Source/WebCore/page/DOMTimer.cpp

    r242102 r242115  
    223223        nestedTimers->add(timer->m_timeoutId, *timer);
    224224#if PLATFORM(IOS_FAMILY)
    225     if (is<Document>(context))
     225    if (is<Document>(context) && downcast<Document>(context).page())
    226226        downcast<Document>(context).page()->contentChangeObserver().didInstallDOMTimer(*timer, timeout, singleShot);
    227227#endif
Note: See TracChangeset for help on using the changeset viewer.