mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 04:30:46 +01:00
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,8 +565,12 @@ bool CefContext::RemoveBrowser(CefRefPtr<CefBrowserImpl> browser)
|
||||
}
|
||||
|
||||
if (empty) {
|
||||
CefThread::PostTask(CefThread::UI, FROM_HERE,
|
||||
NewRunnableFunction(webkit_glue::ClearCache));
|
||||
if (CefThread::CurrentlyOn(CefThread::UI)) {
|
||||
webkit_glue::ClearCache();
|
||||
} else {
|
||||
CefThread::PostTask(CefThread::UI, FROM_HERE,
|
||||
NewRunnableFunction(webkit_glue::ClearCache));
|
||||
}
|
||||
}
|
||||
|
||||
return deleted;
|
||||
|
Loading…
x
Reference in New Issue
Block a user