Unreviewed, rolling out r86255.
http://trac.webkit.org/changeset/86255
https://bugs.webkit.org/show_bug.cgi?id=60660
REGRESSION (r86255): Lots of tests crashing in
CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
(WebKit2 Tests) (Requested by aroben on #webkit).
* platform/network/ResourceHandle.h:
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::currentCookieStorage):
(WebCore::defaultCookieStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
(WebCore::makeFinalRequest):
(WebCore::ResourceHandle::willSendRequest):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86255.
http://trac.webkit.org/changeset/86255
https://bugs.webkit.org/show_bug.cgi?id=60660
REGRESSION (r86255): Lots of tests crashing in
CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
(WebKit2 Tests) (Requested by aroben on #webkit).
* WebView.cpp:
(WebView::setCacheModel):
2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86255.
http://trac.webkit.org/changeset/86255
https://bugs.webkit.org/show_bug.cgi?id=60660
REGRESSION (r86255): Lots of tests crashing in
CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
(WebKit2 Tests) (Requested by aroben on #webkit).
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/win/WebCoreArgumentCodersWin.cpp:
(CoreIPC::decodeResourceRequest):
* UIProcess/win/WebContextWin.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::cachedResponseForURL):
* WebProcess/win/WebProcessWin.cpp:
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformClearResourceCaches):
(WebKit::WebProcess::platformInitializeWebProcess):
2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r86255.
http://trac.webkit.org/changeset/86255
https://bugs.webkit.org/show_bug.cgi?id=60660
REGRESSION (r86255): Lots of tests crashing in
CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
(WebKit2 Tests) (Requested by aroben on #webkit).
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib/WebKitSystemInterface.lib:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86271
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r86255.
+ http://trac.webkit.org/changeset/86255
+ https://bugs.webkit.org/show_bug.cgi?id=60660
+
+ REGRESSION (r86255): Lots of tests crashing in
+ CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
+ (WebKit2 Tests) (Requested by aroben on #webkit).
+
+ * platform/network/ResourceHandle.h:
+ * platform/network/cf/CookieStorageCFNet.cpp:
+ (WebCore::currentCookieStorage):
+ (WebCore::defaultCookieStorage):
+ * platform/network/cf/ResourceHandleCFNet.cpp:
+ (WebCore::willSendRequest):
+ (WebCore::makeFinalRequest):
+ (WebCore::ResourceHandle::willSendRequest):
+ * platform/network/cf/ResourceRequestCFNet.cpp:
+ (WebCore::ResourceRequest::doUpdatePlatformRequest):
+
2011-05-11 Sam Weinig <sam@webkit.org>
Reviewed by Eric Seidel.
static void setPrivateBrowsingEnabled(bool);
static CFURLStorageSessionRef privateBrowsingStorageSession();
static void setPrivateBrowsingStorageSessionIdentifierBase(const String&);
- static CFURLStorageSessionRef currentStorageSession();
-#if PLATFORM(WIN)
- static void setDefaultStorageSession(CFURLStorageSessionRef);
- static CFURLStorageSessionRef defaultStorageSession();
-#endif // PLATFORM(WIN)
-#endif // USE(CFURLSTORAGESESSIONS)
+#endif
using RefCounted<ResourceHandle>::ref;
using RefCounted<ResourceHandle>::deref;
#if USE(CFNETWORK)
-static RetainPtr<CFHTTPCookieStorageRef>& defaultSessionCookieStorage()
-{
- DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ());
-#if USE(CFURLSTORAGESESSIONS) && PLATFORM(WIN)
- if (!cookieStorage && ResourceHandle::defaultStorageSession())
- cookieStorage.adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::defaultStorageSession()));
-#endif
- return cookieStorage;
-}
-
CFHTTPCookieStorageRef currentCookieStorage()
{
ASSERT(isMainThread());
if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get())
return cookieStorage;
- return defaultCookieStorage();
+ return wkGetDefaultHTTPCookieStorage();
}
void setCurrentCookieStorage(CFHTTPCookieStorageRef cookieStorage)
CFHTTPCookieStorageRef defaultCookieStorage()
{
- if (CFHTTPCookieStorageRef defaultCookieStorage = defaultSessionCookieStorage().get())
- return defaultCookieStorage;
return wkGetDefaultHTTPCookieStorage();
}
RetainPtr<CFStringRef> newMethod(AdoptCF, CFURLRequestCopyHTTPRequestMethod(cfRequest));
if (CFStringCompareWithOptions(lastHTTPMethod.get(), newMethod.get(), CFRangeMake(0, CFStringGetLength(lastHTTPMethod.get())), kCFCompareCaseInsensitive)) {
RetainPtr<CFMutableURLRequestRef> mutableRequest(AdoptCF, CFURLRequestCreateMutableCopy(0, cfRequest));
-#if USE(CFURLSTORAGESESSIONS)
- wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), mutableRequest.get());
-#endif
CFURLRequestSetHTTPRequestMethod(mutableRequest.get(), lastHTTPMethod.get());
FormData* body = handle->firstRequest().httpBody();
static CFURLRequestRef makeFinalRequest(const ResourceRequest& request, bool shouldContentSniff)
{
CFMutableURLRequestRef newRequest = CFURLRequestCreateMutableCopy(kCFAllocatorDefault, request.cfURLRequest());
+
#if USE(CFURLSTORAGESESSIONS)
- wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), newRequest);
+ if (CFURLStorageSessionRef storageSession = ResourceHandle::privateBrowsingStorageSession())
+ wkSetRequestStorageSession(storageSession, newRequest);
#endif
if (!shouldContentSniff)
request.clearHTTPAuthorization();
#if USE(CFURLSTORAGESESSIONS)
- request.setStorageSession(ResourceHandle::currentStorageSession());
+ if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
+ request.setStorageSession(storageSession);
#endif
client()->willSendRequest(this, request, redirectResponse);
return String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey)));
}
-CFURLStorageSessionRef ResourceHandle::currentStorageSession()
-{
- if (CFURLStorageSessionRef privateStorageSession = privateBrowsingStorageSession())
- return privateStorageSession;
-#if PLATFORM(WIN)
- return defaultStorageSession();
-#else
- return 0;
#endif
-}
-
-#if PLATFORM(WIN)
-
-static RetainPtr<CFURLStorageSessionRef>& defaultCFURLStorageSession()
-{
- DEFINE_STATIC_LOCAL(RetainPtr<CFURLStorageSessionRef>, storageSession, ());
- return storageSession;
-}
-
-void ResourceHandle::setDefaultStorageSession(CFURLStorageSessionRef storageSession)
-{
- defaultCFURLStorageSession().adoptCF(storageSession);
-}
-
-CFURLStorageSessionRef ResourceHandle::defaultStorageSession()
-{
- return defaultCFURLStorageSession().get();
-}
-
-#endif // PLATFORM(WIN)
-
-#endif // USE(CFURLSTORAGESESSIONS)
void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/)
{
#include "config.h"
#include "ResourceRequestCFNet.h"
-#include "ResourceHandle.h"
#include "ResourceRequest.h"
#if PLATFORM(MAC)
CFURLRequestSetMainDocumentURL(cfRequest, firstPartyForCookies.get());
CFURLRequestSetCachePolicy(cfRequest, (CFURLRequestCachePolicy)cachePolicy());
CFURLRequestSetTimeoutInterval(cfRequest, timeoutInterval());
- } else
+ } else {
cfRequest = CFURLRequestCreateMutable(0, url.get(), (CFURLRequestCachePolicy)cachePolicy(), timeoutInterval(), firstPartyForCookies.get());
-#if USE(CFURLSTORAGESESSIONS)
- wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), cfRequest);
-#endif
+ }
RetainPtr<CFStringRef> requestMethod(AdoptCF, httpMethod().createCFString());
CFURLRequestSetHTTPRequestMethod(cfRequest, requestMethod.get());
+2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r86255.
+ http://trac.webkit.org/changeset/86255
+ https://bugs.webkit.org/show_bug.cgi?id=60660
+
+ REGRESSION (r86255): Lots of tests crashing in
+ CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
+ (WebKit2 Tests) (Requested by aroben on #webkit).
+
+ * WebView.cpp:
+ (WebView::setCacheModel):
+
2011-05-11 Jessie Berlin <jberlin@apple.com>
Reviewed by Steve Falkenburg.
return;
RetainPtr<CFURLCacheRef> cfurlCache(AdoptCF, CFURLCacheCopySharedURLCache());
- RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory(0));
+ RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory());
if (!cfurlCacheDirectory)
cfurlCacheDirectory.adoptCF(WebCore::localUserSpecificStorageDirectory().createCFString());
+2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r86255.
+ http://trac.webkit.org/changeset/86255
+ https://bugs.webkit.org/show_bug.cgi?id=60660
+
+ REGRESSION (r86255): Lots of tests crashing in
+ CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
+ (WebKit2 Tests) (Requested by aroben on #webkit).
+
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::encode):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * Shared/win/WebCoreArgumentCodersWin.cpp:
+ (CoreIPC::decodeResourceRequest):
+ * UIProcess/win/WebContextWin.cpp:
+ (WebKit::WebContext::platformInitializeWebProcess):
+ * WebProcess/WebPage/win/WebPageWin.cpp:
+ (WebKit::cachedResponseForURL):
+ * WebProcess/win/WebProcessWin.cpp:
+ (WebKit::WebProcess::platformSetCacheModel):
+ (WebKit::WebProcess::platformClearResourceCaches):
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
2011-05-11 Adam Roben <aroben@apple.com>
Don't notify the plugin when a targeted javascript: URL request completes
#include "WebProcessCreationParameters.h"
#include "ArgumentCoders.h"
-#if USE(CFURLSTORAGESESSIONS) && PLATFORM(WIN)
-#include "ArgumentCodersCF.h"
-#endif
namespace WebKit {
encoder->encode(cfURLCacheDiskCapacity);
encoder->encode(cfURLCacheMemoryCapacity);
encoder->encode(initialHTTPCookieAcceptPolicy);
-#if USE(CFURLSTORAGESESSIONS)
- CoreIPC::encode(encoder, serializedDefaultStorageSession.get());
-#endif // USE(CFURLSTORAGESESSIONS)
#endif
}
return false;
if (!decoder->decode(parameters.initialHTTPCookieAcceptPolicy))
return false;
-#if USE(CFURLSTORAGESESSIONS)
- if (!CoreIPC::decode(decoder, parameters.serializedDefaultStorageSession))
- return false;
-#endif // USE(CFURLSTORAGESESSIONS)
#endif
return true;
#include "CacheModel.h"
#include "SandboxExtension.h"
#include "TextCheckerState.h"
-#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
uint32_t initialHTTPCookieAcceptPolicy;
bool shouldPaintNativeControls;
-
-#if USE(CFURLSTORAGESESSIONS)
- RetainPtr<CFDataRef> serializedDefaultStorageSession;
-#endif // USE(CFURLSTORAGESESSIONS)
-#endif // PLATFORM(WIN)
+#endif
};
} // namespace WebKit
#if USE(CFNETWORK)
#include "ArgumentCodersCF.h"
#include "PlatformCertificateInfo.h"
-#include <CFNetwork/CFURLRequestPriv.h>
#include <WebCore/CertificateCFWin.h>
-#include <WebCore/ResourceHandle.h>
#include <WebKitSystemInterface/WebKitSystemInterface.h>
#endif
CFURLRequestRef cfURLRequest = wkCFURLRequestCreateFromSerializableRepresentation(dictionary.get(), CoreIPC::tokenNullTypeRef());
if (!cfURLRequest)
return false;
- CFMutableURLRequestRef mutableCFURLRequest = CFURLRequestCreateMutableCopy(0, cfURLRequest);
- CFRelease(cfURLRequest);
-#if USE(CFURLSTORAGESESSIONS)
- wkSetRequestStorageSession(WebCore::ResourceHandle::currentStorageSession(), mutableCFURLRequest);
-#endif
- resourceRequest = WebCore::ResourceRequest(mutableCFURLRequest);
+ resourceRequest = WebCore::ResourceRequest(cfURLRequest);
return true;
#else
return false;
parameters.cfURLCacheDiskCapacity = CFURLCacheDiskCapacity(cfurlCache.get());
parameters.cfURLCacheMemoryCapacity = CFURLCacheMemoryCapacity(cfurlCache.get());
- RetainPtr<CFStringRef> cfURLCachePath(AdoptCF, wkCopyFoundationCacheDirectory(0));
+ RetainPtr<CFStringRef> cfURLCachePath(AdoptCF, wkCopyFoundationCacheDirectory());
parameters.cfURLCachePath = String(cfURLCachePath.get());
// Remove the ending '\' (necessary to have CFNetwork find the Cache file).
ASSERT(parameters.cfURLCachePath.length());
#if USE(CFURLSTORAGESESSIONS)
parameters.uiProcessBundleIdentifier = String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey)));
- parameters.serializedDefaultStorageSession.adoptCF(wkCopySerializedDefaultStorageSession());
#endif // USE(CFURLSTORAGESESSIONS)
parameters.initialHTTPCookieAcceptPolicy = m_initialHTTPCookieAcceptPolicy;
{
RetainPtr<CFURLRef> cfURL(AdoptCF, url.createCFURL());
RetainPtr<CFMutableURLRequestRef> request(AdoptCF, CFURLRequestCreateMutable(0, cfURL.get(), kCFURLRequestCachePolicyReloadIgnoringCache, 60, 0));
-#if USE(CFURLSTORAGESESSIONS)
- wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), request.get());
-#endif
RetainPtr<CFStringRef> userAgent(AdoptCF, webPage->userAgent().createCFString());
CFURLRequestSetHTTPHeaderFieldValue(request.get(), CFSTR("User-Agent"), userAgent.get());
RetainPtr<CFURLCacheRef> cache;
#if USE(CFURLSTORAGESESSIONS)
- if (CFURLStorageSessionRef currentStorageSession = ResourceHandle::currentStorageSession())
- cache.adoptCF(wkCopyURLCache(currentStorageSession));
+ if (CFURLStorageSessionRef storageSession = ResourceHandle::privateBrowsingStorageSession())
+ cache.adoptCF(wkCopyURLCache(storageSession));
else
#endif
cache.adoptCF(CFURLCacheCopySharedURLCache());
#include <WebCore/FileSystem.h>
#include <WebCore/MemoryCache.h>
#include <WebCore/PageCache.h>
-#include <WebCore/ResourceHandle.h>
#include <WebCore/Settings.h>
#include <wtf/text/WTFString.h>
void WebProcess::platformSetCacheModel(CacheModel cacheModel)
{
#if USE(CFNETWORK)
- RetainPtr<CFStringRef> cfurlCacheDirectory;
-#if USE(CFURLSTORAGESESSIONS)
- if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession())
- cfurlCacheDirectory.adoptCF(wkCopyFoundationCacheDirectory(defaultStorageSession));
- else
-#endif
- cfurlCacheDirectory.adoptCF(wkCopyFoundationCacheDirectory(0));
-
+ RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory());
if (!cfurlCacheDirectory)
cfurlCacheDirectory.adoptCF(WebCore::localUserSpecificStorageDirectory().createCFString());
memoryCache()->setDeadDecodedDataDeletionInterval(deadDecodedDataDeletionInterval);
pageCache()->setCapacity(pageCacheCapacity);
- RetainPtr<CFURLCacheRef> cfurlCache;
-#if USE(CFURLSTORAGESESSIONS)
- if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession())
- cfurlCache.adoptCF(wkCopyURLCache(defaultStorageSession));
- else
-#endif // USE(CFURLSTORAGESESSIONS)
- cfurlCache.adoptCF(CFURLCacheCopySharedURLCache());
-
+ RetainPtr<CFURLCacheRef> cfurlCache(AdoptCF, CFURLCacheCopySharedURLCache());
CFURLCacheSetMemoryCapacity(cfurlCache.get(), urlCacheMemoryCapacity);
CFURLCacheSetDiskCapacity(cfurlCache.get(), max<unsigned long>(urlCacheDiskCapacity, CFURLCacheDiskCapacity(cfurlCache.get()))); // Don't shrink a big disk cache, since that would cause churn.
#endif
#if USE(CFNETWORK)
if (cachesToClear == InMemoryResourceCachesOnly)
return;
-
- RetainPtr<CFURLCacheRef> cache;
-#if USE(CFURLSTORAGESESSIONS)
- if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession())
- cache.adoptCF(wkCopyURLCache(defaultStorageSession));
- else
-#endif // USE(CFURLSTORAGESESSIONS)
- cache.adoptCF(CFURLCacheCopySharedURLCache());
-
- CFURLCacheRemoveAllCachedResponses(cache.get());
-#endif // USE(CFNETWORK)
+ CFURLCacheRemoveAllCachedResponses(RetainPtr<CFURLCacheRef>(AdoptCF, CFURLCacheCopySharedURLCache()).get());
+#endif
}
void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters& parameters, CoreIPC::ArgumentDecoder*)
setShouldPaintNativeControls(parameters.shouldPaintNativeControls);
#if USE(CFNETWORK)
-#if USE(CFURLSTORAGESESSIONS)
- if (CFURLStorageSessionRef defaultStorageSession = wkDeserializeStorageSession(parameters.serializedDefaultStorageSession.get())) {
- ResourceHandle::setDefaultStorageSession(defaultStorageSession);
- return;
- }
-#endif // USE(CFURLSTORAGESESSIONS)
-
RetainPtr<CFStringRef> cachePath(AdoptCF, parameters.cfURLCachePath.createCFString());
if (!cachePath)
return;
CFIndex cacheMemoryCapacity = parameters.cfURLCacheMemoryCapacity;
RetainPtr<CFURLCacheRef> uiProcessCache(AdoptCF, CFURLCacheCreate(kCFAllocatorDefault, cacheMemoryCapacity, cacheDiskCapacity, cachePath.get()));
CFURLCacheSetSharedURLCache(uiProcessCache.get());
-#endif // USE(CFNETWORK)
+#endif
WebCookieManager::shared().setHTTPCookieAcceptPolicy(parameters.initialHTTPCookieAcceptPolicy);
}
+2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r86255.
+ http://trac.webkit.org/changeset/86255
+ https://bugs.webkit.org/show_bug.cgi?id=60660
+
+ REGRESSION (r86255): Lots of tests crashing in
+ CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
+ (WebKit2 Tests) (Requested by aroben on #webkit).
+
+ * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
+ * win/lib/WebKitSystemInterface.lib:
+
2011-05-11 Jessie Berlin <jberlin@apple.com>
Reviewed by Steve Falkenburg.
CFHTTPCookieStorageRef wkGetDefaultHTTPCookieStorage();
CFHTTPCookieStorageRef wkCreateInMemoryHTTPCookieStorage();
void wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool);
-CFStringRef wkCopyFoundationCacheDirectory(CFURLStorageSessionRef);
+CFStringRef wkCopyFoundationCacheDirectory();
void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef);
CFArrayRef wkCFURLRequestCopyHTTPRequestBodyParts(CFURLRequestRef);
void wkSetRequestStorageSession(CFURLStorageSessionRef, CFMutableURLRequestRef);
CFURLCacheRef wkCopyURLCache(CFURLStorageSessionRef);
CFHTTPCookieStorageRef wkCopyHTTPCookieStorage(CFURLStorageSessionRef);
-CFDataRef wkCopySerializedDefaultStorageSession();
-CFURLStorageSessionRef wkDeserializeStorageSession(CFDataRef);
CFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
void wkCFURLCacheDeleteHostNamesInPersistentStore(CFArrayRef hostNames);