Title: [212330] trunk/Source/WebCore
- Revision
- 212330
- Author
- [email protected]
- Date
- 2017-02-14 15:26:38 -0800 (Tue, 14 Feb 2017)
Log Message
Speculative fix for: Crash in DocumentThreadableLoader::redirectReceived.
<rdar://problem/29899473> and https://bugs.webkit.org/show_bug.cgi?id=168337
Reviewed by Geoffrey Garen.
No new tests (Unable to find a reproduction).
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (212329 => 212330)
--- trunk/Source/WebCore/ChangeLog 2017-02-14 23:17:08 UTC (rev 212329)
+++ trunk/Source/WebCore/ChangeLog 2017-02-14 23:26:38 UTC (rev 212330)
@@ -1,3 +1,15 @@
+2017-02-14 Brady Eidson <[email protected]>
+
+ Speculative fix for: Crash in DocumentThreadableLoader::redirectReceived.
+ <rdar://problem/29899473> and https://bugs.webkit.org/show_bug.cgi?id=168337
+
+ Reviewed by Geoffrey Garen.
+
+ No new tests (Unable to find a reproduction).
+
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::loadRequest):
+
2017-02-14 Youenn Fablet <[email protected]>
[WebRTC] Remove obsolete WebRTC stats API
Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (212329 => 212330)
--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp 2017-02-14 23:17:08 UTC (rev 212329)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp 2017-02-14 23:26:38 UTC (rev 212330)
@@ -366,6 +366,8 @@
void DocumentThreadableLoader::loadRequest(ResourceRequest&& request, SecurityCheckPolicy securityCheck)
{
+ Ref<DocumentThreadableLoader> protectedThis(*this);
+
// Any credential should have been removed from the cross-site requests.
const URL& requestURL = request.url();
m_options.securityCheck = securityCheck;
@@ -387,6 +389,11 @@
newRequest.setOrigin(securityOrigin());
ASSERT(!m_resource);
+ if (m_resource) {
+ CachedResourceHandle<CachedRawResource> resource = std::exchange(m_resource, nullptr);
+ resource->removeClient(*this);
+ }
+
// We create an URL here as the request will be moved in requestRawResource
URL requestUrl = newRequest.resourceRequest().url();
m_resource = m_document.cachedResourceLoader().requestRawResource(WTFMove(newRequest));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes