Title: [151845] trunk/Source/WebCore
Revision
151845
Author
[email protected]
Date
2013-06-21 11:08:06 -0700 (Fri, 21 Jun 2013)

Log Message

Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
https://bugs.webkit.org/show_bug.cgi?id=117815
<rdar://problem/14211041>

Patch by Ruth Fong <[email protected]> on 2013-06-21
Reviewed by Ryosuke Niwa.

This patch adds assert statements to try to catch when
track()->cues() returns a null pointer.

* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::cueIndex):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151844 => 151845)


--- trunk/Source/WebCore/ChangeLog	2013-06-21 17:52:16 UTC (rev 151844)
+++ trunk/Source/WebCore/ChangeLog	2013-06-21 18:08:06 UTC (rev 151845)
@@ -1,3 +1,17 @@
+2013-06-21  Ruth Fong  <[email protected]>
+
+        Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
+        https://bugs.webkit.org/show_bug.cgi?id=117815
+        <rdar://problem/14211041> 
+
+        Reviewed by Ryosuke Niwa.
+
+        This patch adds assert statements to try to catch when 
+        track()->cues() returns a null pointer.
+
+        * html/track/TextTrackCue.cpp:
+        (WebCore::TextTrackCue::cueIndex):
+
 2013-06-21  Jer Noble  <[email protected]>
 
         [iOS] Hang drawing captions after pressing the home button while playing a video

Modified: trunk/Source/WebCore/html/track/TextTrackCue.cpp (151844 => 151845)


--- trunk/Source/WebCore/html/track/TextTrackCue.cpp	2013-06-21 17:52:16 UTC (rev 151844)
+++ trunk/Source/WebCore/html/track/TextTrackCue.cpp	2013-06-21 18:08:06 UTC (rev 151845)
@@ -483,8 +483,11 @@
 
 int TextTrackCue::cueIndex()
 {
-    if (m_cueIndex == invalidCueIndex)
+    if (m_cueIndex == invalidCueIndex) {
+        ASSERT(track());
+        ASSERT(track()->cues());
         m_cueIndex = track()->cues()->getCueIndex(this);
+    }
 
     return m_cueIndex;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to