Title: [170512] trunk/Source/WebCore
- Revision
- 170512
- Author
- jer.no...@apple.com
- Date
- 2014-06-26 17:28:14 -0700 (Thu, 26 Jun 2014)
Log Message
[MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
https://bugs.webkit.org/show_bug.cgi?id=134367
Reviewed by Darin Adler.
Add a couple of null-checks to protect against methods being called in the brief time
between when the object is created and when it's asked to load.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (170511 => 170512)
--- trunk/Source/WebCore/ChangeLog 2014-06-27 00:27:05 UTC (rev 170511)
+++ trunk/Source/WebCore/ChangeLog 2014-06-27 00:28:14 UTC (rev 170512)
@@ -1,3 +1,17 @@
+2014-06-26 Jer Noble <jer.no...@apple.com>
+
+ [MSE][Mac] Crash in WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered const + 13
+ https://bugs.webkit.org/show_bug.cgi?id=134367
+
+ Reviewed by Darin Adler.
+
+ Add a couple of null-checks to protect against methods being called in the brief time
+ between when the object is created and when it's asked to load.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble):
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
+
2014-06-26 Gyuyoung Kim <gyuyoung....@samsung.com>
Rearrange conditions to find invalid protocol in NavigatorContentUtils::verifyProtocolHandlerScheme()
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (170511 => 170512)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2014-06-27 00:27:05 UTC (rev 170511)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2014-06-27 00:28:14 UTC (rev 170512)
@@ -406,7 +406,7 @@
double MediaPlayerPrivateMediaSourceAVFObjC::durationDouble() const
{
- return m_mediaSource->duration();
+ return m_mediaSource ? m_mediaSource->duration() : 0;
}
MediaTime MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime() const
@@ -503,7 +503,7 @@
std::unique_ptr<PlatformTimeRanges> MediaPlayerPrivateMediaSourceAVFObjC::buffered() const
{
- return m_mediaSource->buffered();
+ return m_mediaSource ? m_mediaSource->buffered() : PlatformTimeRanges::create();
}
bool MediaPlayerPrivateMediaSourceAVFObjC::didLoadingProgress() const
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes