Title: [138288] trunk/Source/WebCore
- Revision
- 138288
- Author
- a...@apple.com
- Date
- 2012-12-20 13:04:36 -0800 (Thu, 20 Dec 2012)
Log Message
REGRESSION (r138191): Tests fail in ResourceRequest::setStorageSession
https://bugs.webkit.org/show_bug.cgi?id=105563
Reviewed by Sam Weinig.
* platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::willSendRequest):
* platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::willSendRequest):
Don't try to appky a session if client canceled the request by setting it ot a null one.
* platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::setStorageSession):
* platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::setStorageSession):
Update platform request, so that the session does not get lost once it's updated later.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (138287 => 138288)
--- trunk/Source/WebCore/ChangeLog 2012-12-20 20:36:25 UTC (rev 138287)
+++ trunk/Source/WebCore/ChangeLog 2012-12-20 21:04:36 UTC (rev 138288)
@@ -1,3 +1,18 @@
+2012-12-20 Alexey Proskuryakov <a...@apple.com>
+
+ REGRESSION (r138191): Tests fail in ResourceRequest::setStorageSession
+ https://bugs.webkit.org/show_bug.cgi?id=105563
+
+ Reviewed by Sam Weinig.
+
+ * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::willSendRequest):
+ * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::willSendRequest):
+ Don't try to appky a session if client canceled the request by setting it ot a null one.
+
+ * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::setStorageSession):
+ * platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::setStorageSession):
+ Update platform request, so that the session does not get lost once it's updated later.
+
2012-12-20 Nate Chapin <jap...@chromium.org>
Rename shouldBufferData to dataBufferingPolicy
Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (138287 => 138288)
--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2012-12-20 20:36:25 UTC (rev 138287)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp 2012-12-20 21:04:36 UTC (rev 138288)
@@ -562,7 +562,8 @@
client()->willSendRequest(this, request, redirectResponse);
// Client call may not preserve the session, especially if the request is sent over IPC.
- request.setStorageSession(d->m_storageSession.get());
+ if (!request.isNull())
+ request.setStorageSession(d->m_storageSession.get());
}
bool ResourceHandle::shouldUseCredentialStorage()
Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp (138287 => 138288)
--- trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp 2012-12-20 20:36:25 UTC (rev 138287)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp 2012-12-20 21:04:36 UTC (rev 138288)
@@ -223,6 +223,8 @@
void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
{
+ updatePlatformRequest();
+
CFMutableURLRequestRef cfRequest = CFURLRequestCreateMutableCopy(0, m_cfRequest.get());
wkSetRequestStorageSession(storageSession, cfRequest);
m_cfRequest.adoptCF(cfRequest);
Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (138287 => 138288)
--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2012-12-20 20:36:25 UTC (rev 138287)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2012-12-20 21:04:36 UTC (rev 138288)
@@ -475,7 +475,8 @@
client()->willSendRequest(this, request, redirectResponse);
// Client call may not preserve the session, especially if the request is sent over IPC.
- request.setStorageSession(d->m_storageSession.get());
+ if (!request.isNull())
+ request.setStorageSession(d->m_storageSession.get());
}
bool ResourceHandle::shouldUseCredentialStorage()
Modified: trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm (138287 => 138288)
--- trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm 2012-12-20 20:36:25 UTC (rev 138287)
+++ trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm 2012-12-20 21:04:36 UTC (rev 138288)
@@ -187,6 +187,7 @@
void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
{
+ updatePlatformRequest();
m_nsRequest.adoptNS(wkCopyRequestWithStorageSession(storageSession, m_nsRequest.get()));
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes