Merge revision 650 changes:

- Make sure BrowserRequestContextProxy is only used on the IO thread (issue #542).
- Windows: Reset the window procedure in the WebWidgetHost destructor to avoid crashes if messages are delivered after the window is destroyed.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1025@651 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-05-25 20:46:44 +00:00
parent 0bccf1bff2
commit 46021aafbd
5 changed files with 26 additions and 13 deletions

View File

@ -180,9 +180,6 @@ CefBrowserImpl::CefBrowserImpl(const CefWindowInfo& windowInfo,
popup_delegate_.reset(new BrowserWebViewDelegate(this));
nav_controller_.reset(new BrowserNavigationController(this));
request_context_proxy_ =
new BrowserRequestContextProxy(_Context->request_context(), this);
if (!file_system_root_.CreateUniqueTempDir()) {
LOG(WARNING) << "Failed to create a temp dir for the filesystem."
"FileSystem feature will be disabled.";
@ -785,7 +782,10 @@ void CefBrowserImpl::UIT_DestroyBrowser() {
UIT_ClearMainWndHandle();
main_frame_ = NULL;
request_context_proxy_ = NULL;
// Release the proxy on the IO thread.
CefThread::ReleaseSoon(CefThread::IO, FROM_HERE,
request_context_proxy_.release());
// Remove the reference added in UIT_CreateBrowser().
Release();
@ -1585,6 +1585,16 @@ GURL CefBrowserImpl::pending_url() {
return pending_url_;
}
net::URLRequestContext* CefBrowserImpl::request_context_proxy() {
DCHECK(CefThread::CurrentlyOn(CefThread::IO));
if (!request_context_proxy_) {
request_context_proxy_ =
new BrowserRequestContextProxy(_Context->request_context(), this);
}
return request_context_proxy_;
}
void CefBrowserImpl::UIT_CreateDevToolsClient(BrowserDevToolsAgent *agent) {
dev_tools_client_.reset(new BrowserDevToolsClient(this, agent));
}