Title: [242115] trunk/Source/WebCore
Revision
242115
Author
[email protected]
Date
2019-02-26 16:36:36 -0800 (Tue, 26 Feb 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (242114 => 242115)


--- trunk/Source/WebCore/ChangeLog	2019-02-27 00:25:34 UTC (rev 242114)
+++ trunk/Source/WebCore/ChangeLog	2019-02-27 00:36:36 UTC (rev 242115)
@@ -1,3 +1,15 @@
+2019-02-26  Zalan Bujtas  <[email protected]>
+
+        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):
+
 2019-02-20  Jer Noble  <[email protected]>
 
         [Cocoa] Media elements will restart network buffering just before suspending

Modified: trunk/Source/WebCore/page/DOMTimer.cpp (242114 => 242115)


--- trunk/Source/WebCore/page/DOMTimer.cpp	2019-02-27 00:25:34 UTC (rev 242114)
+++ trunk/Source/WebCore/page/DOMTimer.cpp	2019-02-27 00:36:36 UTC (rev 242115)
@@ -222,7 +222,7 @@
     if (NestedTimersMap* nestedTimers = NestedTimersMap::instanceForContext(context))
         nestedTimers->add(timer->m_timeoutId, *timer);
 #if PLATFORM(IOS_FAMILY)
-    if (is<Document>(context))
+    if (is<Document>(context) && downcast<Document>(context).page())
         downcast<Document>(context).page()->contentChangeObserver().didInstallDOMTimer(*timer, timeout, singleShot);
 #endif
     return timer->m_timeoutId;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to