Changeset 86271 in webkit
- Timestamp:
- May 11, 2011 2:25:43 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86270 r86271 1 2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r86255. 4 http://trac.webkit.org/changeset/86255 5 https://bugs.webkit.org/show_bug.cgi?id=60660 6 7 REGRESSION (r86255): Lots of tests crashing in 8 CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release 9 (WebKit2 Tests) (Requested by aroben on #webkit). 10 11 * platform/network/ResourceHandle.h: 12 * platform/network/cf/CookieStorageCFNet.cpp: 13 (WebCore::currentCookieStorage): 14 (WebCore::defaultCookieStorage): 15 * platform/network/cf/ResourceHandleCFNet.cpp: 16 (WebCore::willSendRequest): 17 (WebCore::makeFinalRequest): 18 (WebCore::ResourceHandle::willSendRequest): 19 * platform/network/cf/ResourceRequestCFNet.cpp: 20 (WebCore::ResourceRequest::doUpdatePlatformRequest): 21 1 22 2011-05-11 Sam Weinig <sam@webkit.org> 2 23 -
trunk/Source/WebCore/platform/network/ResourceHandle.h
r86255 r86271 195 195 static CFURLStorageSessionRef privateBrowsingStorageSession(); 196 196 static void setPrivateBrowsingStorageSessionIdentifierBase(const String&); 197 static CFURLStorageSessionRef currentStorageSession(); 198 #if PLATFORM(WIN) 199 static void setDefaultStorageSession(CFURLStorageSessionRef); 200 static CFURLStorageSessionRef defaultStorageSession(); 201 #endif // PLATFORM(WIN) 202 #endif // USE(CFURLSTORAGESESSIONS) 197 #endif 203 198 204 199 using RefCounted<ResourceHandle>::ref; -
trunk/Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
r86255 r86271 63 63 #if USE(CFNETWORK) 64 64 65 static RetainPtr<CFHTTPCookieStorageRef>& defaultSessionCookieStorage()66 {67 DEFINE_STATIC_LOCAL(RetainPtr<CFHTTPCookieStorageRef>, cookieStorage, ());68 #if USE(CFURLSTORAGESESSIONS) && PLATFORM(WIN)69 if (!cookieStorage && ResourceHandle::defaultStorageSession())70 cookieStorage.adoptCF(wkCopyHTTPCookieStorage(ResourceHandle::defaultStorageSession()));71 #endif72 return cookieStorage;73 }74 75 65 CFHTTPCookieStorageRef currentCookieStorage() 76 66 { … … 79 69 if (CFHTTPCookieStorageRef cookieStorage = privateBrowsingCookieStorage().get()) 80 70 return cookieStorage; 81 return defaultCookieStorage();71 return wkGetDefaultHTTPCookieStorage(); 82 72 } 83 73 … … 108 98 CFHTTPCookieStorageRef defaultCookieStorage() 109 99 { 110 if (CFHTTPCookieStorageRef defaultCookieStorage = defaultSessionCookieStorage().get())111 return defaultCookieStorage;112 100 return wkGetDefaultHTTPCookieStorage(); 113 101 } -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r86255 r86271 149 149 if (CFStringCompareWithOptions(lastHTTPMethod.get(), newMethod.get(), CFRangeMake(0, CFStringGetLength(lastHTTPMethod.get())), kCFCompareCaseInsensitive)) { 150 150 RetainPtr<CFMutableURLRequestRef> mutableRequest(AdoptCF, CFURLRequestCreateMutableCopy(0, cfRequest)); 151 #if USE(CFURLSTORAGESESSIONS)152 wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), mutableRequest.get());153 #endif154 151 CFURLRequestSetHTTPRequestMethod(mutableRequest.get(), lastHTTPMethod.get()); 155 152 … … 344 341 { 345 342 CFMutableURLRequestRef newRequest = CFURLRequestCreateMutableCopy(kCFAllocatorDefault, request.cfURLRequest()); 343 346 344 #if USE(CFURLSTORAGESESSIONS) 347 wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), newRequest); 345 if (CFURLStorageSessionRef storageSession = ResourceHandle::privateBrowsingStorageSession()) 346 wkSetRequestStorageSession(storageSession, newRequest); 348 347 #endif 349 348 … … 495 494 496 495 #if USE(CFURLSTORAGESESSIONS) 497 request.setStorageSession(ResourceHandle::currentStorageSession()); 496 if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession()) 497 request.setStorageSession(storageSession); 498 498 #endif 499 499 … … 745 745 } 746 746 747 CFURLStorageSessionRef ResourceHandle::currentStorageSession()748 {749 if (CFURLStorageSessionRef privateStorageSession = privateBrowsingStorageSession())750 return privateStorageSession;751 #if PLATFORM(WIN)752 return defaultStorageSession();753 #else754 return 0;755 747 #endif 756 }757 758 #if PLATFORM(WIN)759 760 static RetainPtr<CFURLStorageSessionRef>& defaultCFURLStorageSession()761 {762 DEFINE_STATIC_LOCAL(RetainPtr<CFURLStorageSessionRef>, storageSession, ());763 return storageSession;764 }765 766 void ResourceHandle::setDefaultStorageSession(CFURLStorageSessionRef storageSession)767 {768 defaultCFURLStorageSession().adoptCF(storageSession);769 }770 771 CFURLStorageSessionRef ResourceHandle::defaultStorageSession()772 {773 return defaultCFURLStorageSession().get();774 }775 776 #endif // PLATFORM(WIN)777 778 #endif // USE(CFURLSTORAGESESSIONS)779 748 780 749 void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/) -
trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp
r86255 r86271 27 27 #include "ResourceRequestCFNet.h" 28 28 29 #include "ResourceHandle.h"30 29 #include "ResourceRequest.h" 31 30 … … 125 124 CFURLRequestSetCachePolicy(cfRequest, (CFURLRequestCachePolicy)cachePolicy()); 126 125 CFURLRequestSetTimeoutInterval(cfRequest, timeoutInterval()); 127 } else 126 } else { 128 127 cfRequest = CFURLRequestCreateMutable(0, url.get(), (CFURLRequestCachePolicy)cachePolicy(), timeoutInterval(), firstPartyForCookies.get()); 129 #if USE(CFURLSTORAGESESSIONS) 130 wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), cfRequest); 131 #endif 128 } 132 129 133 130 RetainPtr<CFStringRef> requestMethod(AdoptCF, httpMethod().createCFString()); -
trunk/Source/WebKit/win/ChangeLog
r86255 r86271 1 2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r86255. 4 http://trac.webkit.org/changeset/86255 5 https://bugs.webkit.org/show_bug.cgi?id=60660 6 7 REGRESSION (r86255): Lots of tests crashing in 8 CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release 9 (WebKit2 Tests) (Requested by aroben on #webkit). 10 11 * WebView.cpp: 12 (WebView::setCacheModel): 13 1 14 2011-05-11 Jessie Berlin <jberlin@apple.com> 2 15 -
trunk/Source/WebKit/win/WebView.cpp
r86255 r86271 453 453 454 454 RetainPtr<CFURLCacheRef> cfurlCache(AdoptCF, CFURLCacheCopySharedURLCache()); 455 RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory( 0));455 RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory()); 456 456 if (!cfurlCacheDirectory) 457 457 cfurlCacheDirectory.adoptCF(WebCore::localUserSpecificStorageDirectory().createCFString()); -
trunk/Source/WebKit2/ChangeLog
r86259 r86271 1 2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r86255. 4 http://trac.webkit.org/changeset/86255 5 https://bugs.webkit.org/show_bug.cgi?id=60660 6 7 REGRESSION (r86255): Lots of tests crashing in 8 CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release 9 (WebKit2 Tests) (Requested by aroben on #webkit). 10 11 * Shared/WebProcessCreationParameters.cpp: 12 (WebKit::WebProcessCreationParameters::encode): 13 (WebKit::WebProcessCreationParameters::decode): 14 * Shared/WebProcessCreationParameters.h: 15 * Shared/win/WebCoreArgumentCodersWin.cpp: 16 (CoreIPC::decodeResourceRequest): 17 * UIProcess/win/WebContextWin.cpp: 18 (WebKit::WebContext::platformInitializeWebProcess): 19 * WebProcess/WebPage/win/WebPageWin.cpp: 20 (WebKit::cachedResponseForURL): 21 * WebProcess/win/WebProcessWin.cpp: 22 (WebKit::WebProcess::platformSetCacheModel): 23 (WebKit::WebProcess::platformClearResourceCaches): 24 (WebKit::WebProcess::platformInitializeWebProcess): 25 1 26 2011-05-11 Adam Roben <aroben@apple.com> 2 27 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
r86255 r86271 28 28 29 29 #include "ArgumentCoders.h" 30 #if USE(CFURLSTORAGESESSIONS) && PLATFORM(WIN)31 #include "ArgumentCodersCF.h"32 #endif33 30 34 31 namespace WebKit { … … 83 80 encoder->encode(cfURLCacheMemoryCapacity); 84 81 encoder->encode(initialHTTPCookieAcceptPolicy); 85 #if USE(CFURLSTORAGESESSIONS)86 CoreIPC::encode(encoder, serializedDefaultStorageSession.get());87 #endif // USE(CFURLSTORAGESESSIONS)88 82 #endif 89 83 } … … 156 150 if (!decoder->decode(parameters.initialHTTPCookieAcceptPolicy)) 157 151 return false; 158 #if USE(CFURLSTORAGESESSIONS)159 if (!CoreIPC::decode(decoder, parameters.serializedDefaultStorageSession))160 return false;161 #endif // USE(CFURLSTORAGESESSIONS)162 152 #endif 163 153 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h
r86255 r86271 30 30 #include "SandboxExtension.h" 31 31 #include "TextCheckerState.h" 32 #include <wtf/RetainPtr.h>33 32 #include <wtf/Vector.h> 34 33 #include <wtf/text/WTFString.h> … … 105 104 106 105 bool shouldPaintNativeControls; 107 108 #if USE(CFURLSTORAGESESSIONS) 109 RetainPtr<CFDataRef> serializedDefaultStorageSession; 110 #endif // USE(CFURLSTORAGESESSIONS) 111 #endif // PLATFORM(WIN) 106 #endif 112 107 }; 113 108 -
trunk/Source/WebKit2/Shared/win/WebCoreArgumentCodersWin.cpp
r86255 r86271 30 30 #include "ArgumentCodersCF.h" 31 31 #include "PlatformCertificateInfo.h" 32 #include <CFNetwork/CFURLRequestPriv.h>33 32 #include <WebCore/CertificateCFWin.h> 34 #include <WebCore/ResourceHandle.h>35 33 #include <WebKitSystemInterface/WebKitSystemInterface.h> 36 34 #endif … … 73 71 if (!cfURLRequest) 74 72 return false; 75 CFMutableURLRequestRef mutableCFURLRequest = CFURLRequestCreateMutableCopy(0, cfURLRequest);76 CFRelease(cfURLRequest);77 #if USE(CFURLSTORAGESESSIONS)78 wkSetRequestStorageSession(WebCore::ResourceHandle::currentStorageSession(), mutableCFURLRequest);79 #endif80 73 81 resourceRequest = WebCore::ResourceRequest( mutableCFURLRequest);74 resourceRequest = WebCore::ResourceRequest(cfURLRequest); 82 75 return true; 83 76 #else -
trunk/Source/WebKit2/UIProcess/win/WebContextWin.cpp
r86255 r86271 61 61 parameters.cfURLCacheMemoryCapacity = CFURLCacheMemoryCapacity(cfurlCache.get()); 62 62 63 RetainPtr<CFStringRef> cfURLCachePath(AdoptCF, wkCopyFoundationCacheDirectory( 0));63 RetainPtr<CFStringRef> cfURLCachePath(AdoptCF, wkCopyFoundationCacheDirectory()); 64 64 parameters.cfURLCachePath = String(cfURLCachePath.get()); 65 65 // Remove the ending '\' (necessary to have CFNetwork find the Cache file). … … 70 70 #if USE(CFURLSTORAGESESSIONS) 71 71 parameters.uiProcessBundleIdentifier = String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey))); 72 parameters.serializedDefaultStorageSession.adoptCF(wkCopySerializedDefaultStorageSession());73 72 #endif // USE(CFURLSTORAGESESSIONS) 74 73 -
trunk/Source/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
r86255 r86271 268 268 RetainPtr<CFURLRef> cfURL(AdoptCF, url.createCFURL()); 269 269 RetainPtr<CFMutableURLRequestRef> request(AdoptCF, CFURLRequestCreateMutable(0, cfURL.get(), kCFURLRequestCachePolicyReloadIgnoringCache, 60, 0)); 270 #if USE(CFURLSTORAGESESSIONS)271 wkSetRequestStorageSession(ResourceHandle::currentStorageSession(), request.get());272 #endif273 270 274 271 RetainPtr<CFStringRef> userAgent(AdoptCF, webPage->userAgent().createCFString()); … … 277 274 RetainPtr<CFURLCacheRef> cache; 278 275 #if USE(CFURLSTORAGESESSIONS) 279 if (CFURLStorageSessionRef currentStorageSession = ResourceHandle::currentStorageSession())280 cache.adoptCF(wkCopyURLCache( currentStorageSession));276 if (CFURLStorageSessionRef storageSession = ResourceHandle::privateBrowsingStorageSession()) 277 cache.adoptCF(wkCopyURLCache(storageSession)); 281 278 else 282 279 #endif -
trunk/Source/WebKit2/WebProcess/win/WebProcessWin.cpp
r86255 r86271 33 33 #include <WebCore/MemoryCache.h> 34 34 #include <WebCore/PageCache.h> 35 #include <WebCore/ResourceHandle.h>36 35 #include <WebCore/Settings.h> 37 36 #include <wtf/text/WTFString.h> … … 71 70 { 72 71 #if USE(CFNETWORK) 73 RetainPtr<CFStringRef> cfurlCacheDirectory; 74 #if USE(CFURLSTORAGESESSIONS) 75 if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession()) 76 cfurlCacheDirectory.adoptCF(wkCopyFoundationCacheDirectory(defaultStorageSession)); 77 else 78 #endif 79 cfurlCacheDirectory.adoptCF(wkCopyFoundationCacheDirectory(0)); 80 72 RetainPtr<CFStringRef> cfurlCacheDirectory(AdoptCF, wkCopyFoundationCacheDirectory()); 81 73 if (!cfurlCacheDirectory) 82 74 cfurlCacheDirectory.adoptCF(WebCore::localUserSpecificStorageDirectory().createCFString()); … … 103 95 pageCache()->setCapacity(pageCacheCapacity); 104 96 105 RetainPtr<CFURLCacheRef> cfurlCache; 106 #if USE(CFURLSTORAGESESSIONS) 107 if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession()) 108 cfurlCache.adoptCF(wkCopyURLCache(defaultStorageSession)); 109 else 110 #endif // USE(CFURLSTORAGESESSIONS) 111 cfurlCache.adoptCF(CFURLCacheCopySharedURLCache()); 112 97 RetainPtr<CFURLCacheRef> cfurlCache(AdoptCF, CFURLCacheCopySharedURLCache()); 113 98 CFURLCacheSetMemoryCapacity(cfurlCache.get(), urlCacheMemoryCapacity); 114 99 CFURLCacheSetDiskCapacity(cfurlCache.get(), max<unsigned long>(urlCacheDiskCapacity, CFURLCacheDiskCapacity(cfurlCache.get()))); // Don't shrink a big disk cache, since that would cause churn. … … 121 106 if (cachesToClear == InMemoryResourceCachesOnly) 122 107 return; 123 124 RetainPtr<CFURLCacheRef> cache; 125 #if USE(CFURLSTORAGESESSIONS) 126 if (CFURLStorageSessionRef defaultStorageSession = ResourceHandle::defaultStorageSession()) 127 cache.adoptCF(wkCopyURLCache(defaultStorageSession)); 128 else 129 #endif // USE(CFURLSTORAGESESSIONS) 130 cache.adoptCF(CFURLCacheCopySharedURLCache()); 131 132 CFURLCacheRemoveAllCachedResponses(cache.get()); 133 #endif // USE(CFNETWORK) 108 CFURLCacheRemoveAllCachedResponses(RetainPtr<CFURLCacheRef>(AdoptCF, CFURLCacheCopySharedURLCache()).get()); 109 #endif 134 110 } 135 111 … … 139 115 140 116 #if USE(CFNETWORK) 141 #if USE(CFURLSTORAGESESSIONS)142 if (CFURLStorageSessionRef defaultStorageSession = wkDeserializeStorageSession(parameters.serializedDefaultStorageSession.get())) {143 ResourceHandle::setDefaultStorageSession(defaultStorageSession);144 return;145 }146 #endif // USE(CFURLSTORAGESESSIONS)147 148 117 RetainPtr<CFStringRef> cachePath(AdoptCF, parameters.cfURLCachePath.createCFString()); 149 118 if (!cachePath) … … 154 123 RetainPtr<CFURLCacheRef> uiProcessCache(AdoptCF, CFURLCacheCreate(kCFAllocatorDefault, cacheMemoryCapacity, cacheDiskCapacity, cachePath.get())); 155 124 CFURLCacheSetSharedURLCache(uiProcessCache.get()); 156 #endif // USE(CFNETWORK)125 #endif 157 126 158 127 WebCookieManager::shared().setHTTPCookieAcceptPolicy(parameters.initialHTTPCookieAcceptPolicy); -
trunk/WebKitLibraries/ChangeLog
r86255 r86271 1 2011-05-11 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r86255. 4 http://trac.webkit.org/changeset/86255 5 https://bugs.webkit.org/show_bug.cgi?id=60660 6 7 REGRESSION (r86255): Lots of tests crashing in 8 CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release 9 (WebKit2 Tests) (Requested by aroben on #webkit). 10 11 * win/include/WebKitSystemInterface/WebKitSystemInterface.h: 12 * win/lib/WebKitSystemInterface.lib: 13 1 14 2011-05-11 Jessie Berlin <jberlin@apple.com> 2 15 -
trunk/WebKitLibraries/win/include/WebKitSystemInterface/WebKitSystemInterface.h
r86255 r86271 94 94 CFHTTPCookieStorageRef wkCreateInMemoryHTTPCookieStorage(); 95 95 void wkSetCFURLRequestShouldContentSniff(CFMutableURLRequestRef, bool); 96 CFStringRef wkCopyFoundationCacheDirectory( CFURLStorageSessionRef);96 CFStringRef wkCopyFoundationCacheDirectory(); 97 97 void wkSetClientCertificateInSSLProperties(CFMutableDictionaryRef, CFDataRef); 98 98 … … 104 104 CFURLCacheRef wkCopyURLCache(CFURLStorageSessionRef); 105 105 CFHTTPCookieStorageRef wkCopyHTTPCookieStorage(CFURLStorageSessionRef); 106 CFDataRef wkCopySerializedDefaultStorageSession();107 CFURLStorageSessionRef wkDeserializeStorageSession(CFDataRef);108 106 109 107 CFArrayRef wkCFURLCacheCopyAllHostNamesInPersistentStore();
Note: See TracChangeset
for help on using the changeset viewer.