Commit 142d7057 authored by sfalken@apple.com's avatar sfalken@apple.com

Fix Windows build of DumpRenderTree.

        * DumpRenderTree/win/DumpRenderTree.cpp:
        (sharedCFURLCache):
        (main):



git-svn-id: svn://svn.chromium.org/blink/trunk@42564 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 925d99a4
2009-04-15 Steve Falkenburg <sfalken@apple.com>
Fix Windows build of DumpRenderTree.
* DumpRenderTree/win/DumpRenderTree.cpp:
(sharedCFURLCache):
(main):
2009-04-15 Adam Roben <aroben@apple.com>
Skip yet another JavaScriptCore test that sometimes fails on Windows
......
......@@ -1040,6 +1040,25 @@ IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
return webView;
}
RetainPtr<CFURLCacheRef> sharedCFURLCache()
{
HMODULE module = GetModuleHandle(TEXT("CFNetwork_debug.dll"));
if (!module)
module = GetModuleHandle(TEXT("CFNetwork.dll"));
if (!module)
return 0;
typedef CFURLCacheRef (*CFURLCacheCopySharedURLCacheProcPtr)(void);
if (CFURLCacheCopySharedURLCacheProcPtr copyCache = reinterpret_cast<CFURLCacheCopySharedURLCacheProcPtr>(GetProcAddress(module, "CFURLCacheCopySharedURLCache")))
return RetainPtr<CFURLCacheRef>(AdoptCF, copyCache());
typedef CFURLCacheRef (*CFURLCacheSharedURLCacheProcPtr)(void);
if (CFURLCacheSharedURLCacheProcPtr sharedCache = reinterpret_cast<CFURLCacheSharedURLCacheProcPtr>(GetProcAddress(module, "CFURLCacheSharedURLCache")))
return sharedCache();
return 0;
}
int main(int argc, char* argv[])
{
leakChecking = false;
......@@ -1095,7 +1114,8 @@ int main(int argc, char* argv[])
if (FAILED(webView->mainFrame(&frame)))
return -1;
CFURLCacheRemoveAllCachedResponses(CFURLCacheSharedURLCache());
RetainPtr<CFURLCacheRef> urlCache = sharedCFURLCache();
CFURLCacheRemoveAllCachedResponses(urlCache.get());
#ifdef _DEBUG
_CrtMemState entryToMainMemCheckpoint;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment