Title: [194589] trunk/Source/WebCore
Revision
194589
Author
[email protected]
Date
2016-01-05 09:58:45 -0800 (Tue, 05 Jan 2016)

Log Message

Avoid NULL deference in Page::updateIsPlayingMedia
https://bugs.webkit.org/show_bug.cgi?id=152732

No new tests, this fixes a rare crash that I am unable to reproduce.

Reviewed by David Kilzer.

* page/Page.cpp:
(WebCore::Page::updateIsPlayingMedia): frame->document() can return NULL.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (194588 => 194589)


--- trunk/Source/WebCore/ChangeLog	2016-01-05 17:55:15 UTC (rev 194588)
+++ trunk/Source/WebCore/ChangeLog	2016-01-05 17:58:45 UTC (rev 194589)
@@ -1,3 +1,15 @@
+2016-01-05  Eric Carlson  <[email protected]>
+
+        Avoid NULL deference in Page::updateIsPlayingMedia
+        https://bugs.webkit.org/show_bug.cgi?id=152732
+
+        No new tests, this fixes a rare crash that I am unable to reproduce.
+
+        Reviewed by David Kilzer.
+
+        * page/Page.cpp:
+        (WebCore::Page::updateIsPlayingMedia): frame->document() can return NULL.
+
 2016-01-05  Brady Eidson  <[email protected]>
 
         Modern IDB: Transactions from a previous page can leak forward to the next.

Modified: trunk/Source/WebCore/page/Page.cpp (194588 => 194589)


--- trunk/Source/WebCore/page/Page.cpp	2016-01-05 17:55:15 UTC (rev 194588)
+++ trunk/Source/WebCore/page/Page.cpp	2016-01-05 17:58:45 UTC (rev 194589)
@@ -1212,7 +1212,8 @@
 {
     MediaProducer::MediaStateFlags state = MediaProducer::IsNotPlaying;
     for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
-        state |= frame->document()->mediaState();
+        if (Document* document = frame->document())
+            state |= document->mediaState();
     }
 
     if (state == m_mediaState)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to