From 231d4e3152a9c27a73b6ac7badbe6be673aa3ddf Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 8 Oct 2009 17:19:54 +0100 Subject: Merge webkit.org at R49305 : Automatic merge by git. Change-Id: I8968561bc1bfd72b8923b7118d3728579c6dbcc7 --- WebKit/win/WebDownloadCFNet.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'WebKit/win/WebDownloadCFNet.cpp') diff --git a/WebKit/win/WebDownloadCFNet.cpp b/WebKit/win/WebDownloadCFNet.cpp index 0df738e..144a6a5 100644 --- a/WebKit/win/WebDownloadCFNet.cpp +++ b/WebKit/win/WebDownloadCFNet.cpp @@ -47,6 +47,7 @@ #pragma warning(push, 0) #include #include +#include #include #include #include @@ -193,7 +194,7 @@ HRESULT STDMETHODCALLTYPE WebDownload::initToResumeWithBundle( // Attempt to remove the ".download" extension from the bundle for the final file destination // Failing that, we clear m_destination and will ask the delegate later once the download starts if (m_bundlePath.endsWith(bundleExtension(), false)) { - m_destination = m_bundlePath.copy(); + m_destination = m_bundlePath.threadsafeCopy(); m_destination.truncate(m_destination.length() - bundleExtension().length()); } else m_destination = String(); @@ -381,9 +382,10 @@ void WebDownload::didReceiveAuthenticationChallenge(CFURLAuthChallengeRef challe { // Try previously stored credential first. if (!CFURLAuthChallengeGetPreviousFailureCount(challenge)) { - CFURLCredentialRef credential = WebCoreCredentialStorage::get(CFURLAuthChallengeGetProtectionSpace(challenge)); - if (credential) { - CFURLDownloadUseCredential(m_download.get(), credential, challenge); + Credential credential = CredentialStorage::get(core(CFURLAuthChallengeGetProtectionSpace(challenge))); + if (!credential.isEmpty()) { + RetainPtr cfCredential(AdoptCF, createCF(credential)); + CFURLDownloadUseCredential(m_download.get(), cfCredential.get(), challenge); return; } } -- cgit v1.1