Title: [177590] branches/safari-600.3-branch/Source/WebCore
- Revision
- 177590
- Author
- [email protected]
- Date
- 2014-12-19 12:53:01 -0800 (Fri, 19 Dec 2014)
Log Message
Merged r176725. rdar://problems/19300244
Modified Paths
Diff
Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (177589 => 177590)
--- branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-12-19 19:50:57 UTC (rev 177589)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-12-19 20:53:01 UTC (rev 177590)
@@ -1,3 +1,23 @@
+2014-12-19 Matthew Hanson <[email protected]>
+
+ Merge r176725. rdar://problem/19300244
+
+ 2014-12-03 Jer Noble <[email protected]>
+
+ [Mac] Hang when calling -[AVAsset resolvedURL].
+ https://bugs.webkit.org/show_bug.cgi?id=139223
+
+ Reviewed by Eric Carlson.
+
+ On a particularly slow-loading site, a call to -[AVAsset resolvedURL] can take an arbitrarily long
+ time. Treat this AVAsset property similar to other "metadata" properties, and check the load status
+ of the property before requesting it.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check the load state of -resolvedURL.
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL): Ditto.
+ (WebCore::assetMetadataKeyNames): Add @"resolvedURL".
+
2014-12-18 Matthew Hanson <[email protected]>
Build fix.
Modified: branches/safari-600.3-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (177589 => 177590)
--- branches/safari-600.3-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-12-19 19:50:57 UTC (rev 177589)
+++ branches/safari-600.3-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2014-12-19 20:53:01 UTC (rev 177590)
@@ -1851,10 +1851,10 @@
bool MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin() const
{
- if (!m_avAsset)
+ if (!m_avAsset || [m_avAsset statusOfValueForKey:@"resolvedURL" error:nullptr] != AVKeyValueStatusLoaded)
return false;
- RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(URL([m_avAsset resolvedURL]));
+ RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(resolvedURL());
RefPtr<SecurityOrigin> requestedOrigin = SecurityOrigin::createFromString(assetURL());
return resolvedOrigin->isSameSchemeHostPort(requestedOrigin.get());
}
@@ -2645,7 +2645,7 @@
URL MediaPlayerPrivateAVFoundationObjC::resolvedURL() const
{
- if (!m_avAsset)
+ if (!m_avAsset || [m_avAsset statusOfValueForKey:@"resolvedURL" error:nullptr] != AVKeyValueStatusLoaded)
return MediaPlayerPrivateAVFoundation::resolvedURL();
return URL([m_avAsset resolvedURL]);
@@ -2661,6 +2661,7 @@
@"preferredVolume",
@"preferredRate",
@"playable",
+ @"resolvedURL",
@"tracks",
@"availableMediaCharacteristicsWithMediaSelectionOptions",
nil];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes