Make off-screen rendering example work with multi-threaded message loop mode (issue #804).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@938 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-12-04 01:16:13 +00:00
parent c3bbaac18f
commit 2a17f00844
5 changed files with 59 additions and 33 deletions

View File

@ -281,6 +281,11 @@ void ClientHandler::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
if (m_BrowserId == browser->GetIdentifier()) {
// Free the browser pointer so that the browser can be destroyed
m_Browser = NULL;
if (m_OSRHandler.get()) {
m_OSRHandler->OnBeforeClose(browser);
m_OSRHandler = NULL;
}
} else if (browser->IsPopup()) {
// Remove the record for DevTools popup windows.
std::set<std::string>::iterator it =