Title: [149447] trunk/Source/WebCore
Revision
149447
Author
[email protected]
Date
2013-05-01 12:55:31 -0700 (Wed, 01 May 2013)

Log Message

TextTrackMenu crashes in ports where MediaElement players are lazily created
https://bugs.webkit.org/show_bug.cgi?id=115485

Null check the player for ports, like iOS, that lazily create the player.

Patch by Joseph Pecoraro <[email protected]> on 2013-05-01
Reviewed by Eric Carlson.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::platformTextTrackMenu):
(WebCore::HTMLMediaElement::closeCaptionTracksChanged):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149446 => 149447)


--- trunk/Source/WebCore/ChangeLog	2013-05-01 19:10:35 UTC (rev 149446)
+++ trunk/Source/WebCore/ChangeLog	2013-05-01 19:55:31 UTC (rev 149447)
@@ -1,3 +1,16 @@
+2013-05-01  Joseph Pecoraro  <[email protected]>
+
+        TextTrackMenu crashes in ports where MediaElement players are lazily created
+        https://bugs.webkit.org/show_bug.cgi?id=115485
+
+        Null check the player for ports, like iOS, that lazily create the player.
+
+        Reviewed by Eric Carlson.
+
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::platformTextTrackMenu):
+        (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
+
 2013-05-01  Anders Carlsson  <[email protected]>
 
         Add FunctionDispatcher class and make RunLoop derive from it

Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (149446 => 149447)


--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2013-05-01 19:10:35 UTC (rev 149446)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2013-05-01 19:55:31 UTC (rev 149447)
@@ -2938,7 +2938,7 @@
     if (m_platformMenu)
         return m_platformMenu.get();
 
-    if (!m_player->implementsTextTrackControls())
+    if (!m_player || !m_player->implementsTextTrackControls())
         return 0;
 
     m_platformMenu = m_player->textTrackMenu();
@@ -2957,7 +2957,7 @@
         mediaControls()->closedCaptionTracksChanged();
 
 #if USE(PLATFORM_TEXT_TRACK_MENU)
-    if (m_player->implementsTextTrackControls())
+    if (m_player && m_player->implementsTextTrackControls())
         scheduleDelayedAction(TextTrackChangesNotification);
 #endif
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to