Changeset 176725 in webkit
- Timestamp:
- Dec 3, 2014 10:01:32 AM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r176722 r176725 1 2014-12-03 Jer Noble <jer.noble@apple.com> 2 3 [Mac] Hang when calling -[AVAsset resolvedURL]. 4 https://bugs.webkit.org/show_bug.cgi?id=139223 5 6 Reviewed by Eric Carlson. 7 8 On a particularly slow-loading site, a call to -[AVAsset resolvedURL] can take an arbitrarily long 9 time. Treat this AVAsset property similar to other "metadata" properties, and check the load status 10 of the property before requesting it. 11 12 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 13 (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin): Check the load state of -resolvedURL. 14 (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL): Ditto. 15 (WebCore::assetMetadataKeyNames): Add @"resolvedURL". 16 1 17 2014-12-03 Csaba Osztrogonác <ossy@webkit.org> 2 18 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r176685 r176725 2006 2006 bool MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin() const 2007 2007 { 2008 if (!m_avAsset )2008 if (!m_avAsset || [m_avAsset statusOfValueForKey:@"resolvedURL" error:nullptr] != AVKeyValueStatusLoaded) 2009 2009 return false; 2010 2010 2011 RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create( URL([m_avAsset resolvedURL]));2011 RefPtr<SecurityOrigin> resolvedOrigin = SecurityOrigin::create(resolvedURL()); 2012 2012 RefPtr<SecurityOrigin> requestedOrigin = SecurityOrigin::createFromString(assetURL()); 2013 2013 return resolvedOrigin->isSameSchemeHostPort(requestedOrigin.get()); … … 2852 2852 URL MediaPlayerPrivateAVFoundationObjC::resolvedURL() const 2853 2853 { 2854 if (!m_avAsset )2854 if (!m_avAsset || [m_avAsset statusOfValueForKey:@"resolvedURL" error:nullptr] != AVKeyValueStatusLoaded) 2855 2855 return MediaPlayerPrivateAVFoundation::resolvedURL(); 2856 2856 … … 2868 2868 @"preferredRate", 2869 2869 @"playable", 2870 @"resolvedURL", 2870 2871 @"tracks", 2871 2872 @"availableMediaCharacteristicsWithMediaSelectionOptions",
Note: See TracChangeset
for help on using the changeset viewer.