Title: [201615] trunk/Source/WebCore
- Revision
- 201615
- Author
- [email protected]
- Date
- 2016-06-02 13:37:22 -0700 (Thu, 02 Jun 2016)
Log Message
Crash under CachedResource::addClientToSet()
https://bugs.webkit.org/show_bug.cgi?id=158310
<rdar://problem/23643359>
Reviewed by Eric Carlson.
Only call CachedResource::addClient() on the resource returned
by CachedResourceLoader::requestMedia() if the resource is
non-null. CachedResourceLoader::requestMedia() can return null
in some cases so we need to handle this properly.
No new tests, no known reproduction case.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (201614 => 201615)
--- trunk/Source/WebCore/ChangeLog 2016-06-02 20:35:14 UTC (rev 201614)
+++ trunk/Source/WebCore/ChangeLog 2016-06-02 20:37:22 UTC (rev 201615)
@@ -1,5 +1,23 @@
2016-06-02 Chris Dumez <[email protected]>
+ Crash under CachedResource::addClientToSet()
+ https://bugs.webkit.org/show_bug.cgi?id=158310
+ <rdar://problem/23643359>
+
+ Reviewed by Eric Carlson.
+
+ Only call CachedResource::addClient() on the resource returned
+ by CachedResourceLoader::requestMedia() if the resource is
+ non-null. CachedResourceLoader::requestMedia() can return null
+ in some cases so we need to handle this properly.
+
+ No new tests, no known reproduction case.
+
+ * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
+ (WebCore::WebCoreAVFResourceLoader::startLoading):
+
+2016-06-02 Chris Dumez <[email protected]>
+
ScriptExecutionContext::Task constructor should take a NoncopyableFunction<void ()> as parameter
https://bugs.webkit.org/show_bug.cgi?id=158309
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm (201614 => 201615)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm 2016-06-02 20:35:14 UTC (rev 201614)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm 2016-06-02 20:37:22 UTC (rev 201615)
@@ -70,13 +70,13 @@
// FIXME: Skip Content Security Policy check if the element that inititated this request
// is in a user-agent shadow tree. See <https://bugs.webkit.org/show_bug.cgi?id=155505>.
CachedResourceRequest request(nsRequest, ResourceLoaderOptions(SendCallbacks, DoNotSniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, ClientDidNotRequestCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType, DoNotIncludeCertificateInfo, ContentSecurityPolicyImposition::DoPolicyCheck, DefersLoadingPolicy::AllowDefersLoading, CachingPolicy::DisallowCaching));
-
request.mutableResourceRequest().setPriority(ResourceLoadPriority::Low);
- if (CachedResourceLoader* loader = m_parent->player()->cachedResourceLoader()) {
+ if (auto* loader = m_parent->player()->cachedResourceLoader())
m_resource = loader->requestMedia(request);
+
+ if (m_resource)
m_resource->addClient(this);
- } else {
- m_resource = nullptr;
+ else {
LOG_ERROR("Failed to start load for media at url %s", [[[nsRequest URL] absoluteString] UTF8String]);
[m_avRequest.get() finishLoadingWithError:0];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes