Mac: Fix the "no autorelease pool in place" error by initializing an NSAutoreleasePool on every thread (issue #502).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@482 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-02-10 16:22:47 +00:00
parent 9bcab6db78
commit 55b363354f
7 changed files with 50 additions and 30 deletions

View File

@ -33,10 +33,7 @@ CefProcessIOThread::~CefProcessIOThread() {
}
void CefProcessIOThread::Init() {
#if defined(OS_WIN)
// Initializes the COM library on the current thread.
CoInitialize(NULL);
#endif
CefThread::Init();
FilePath cache_path(_Context->cache_path());
request_context_ = new BrowserRequestContext(cache_path,
@ -65,9 +62,5 @@ void CefProcessIOThread::CleanUp() {
_Context->set_request_context(NULL);
request_context_ = NULL;
#if defined(OS_WIN)
// Closes the COM library on the current thread. CoInitialize must
// be balanced by a corresponding call to CoUninitialize.
CoUninitialize();
#endif
CefThread::Cleanup();
}