In CefContext::RemoveBrowser() allow the call to webkit_glue::ClearCache() to be executed immediately if we're already on the UI thread (which is the case when called "from" CefShutdown()), instead of being posted as a delayed task to avoid a thread death race condition (issue #277).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@273 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
3b34f0014d
commit
dadd852cd3
|
@ -565,9 +565,13 @@ bool CefContext::RemoveBrowser(CefRefPtr<CefBrowserImpl> browser)
|
|||
}
|
||||
|
||||
if (empty) {
|
||||
if (CefThread::CurrentlyOn(CefThread::UI)) {
|
||||
webkit_glue::ClearCache();
|
||||
} else {
|
||||
CefThread::PostTask(CefThread::UI, FROM_HERE,
|
||||
NewRunnableFunction(webkit_glue::ClearCache));
|
||||
}
|
||||
}
|
||||
|
||||
return deleted;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue