Merge revision 736 and revision 737 changes:

- Fix crashes/assertions when CefBrowserImpl is destroyed on a non-UI thread (issue #694).
- Improve the handling of invalidation/painting for off-screen rendering (issue #695).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1025@738 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-08-13 16:36:57 +00:00
parent be1fd6d3c3
commit f0e11cc5df
10 changed files with 162 additions and 234 deletions

View File

@ -771,6 +771,9 @@ void CefBrowserImpl::UIT_DestroyBrowser() {
dev_tools_agent_.reset();
}
if (frame_objects_.size() > 0)
frame_objects_.clear();
// Clean up anything associated with the WebViewHost widget.
if (webviewhost_.get()) {
if (webviewhost_->webwidget())
@ -778,6 +781,13 @@ void CefBrowserImpl::UIT_DestroyBrowser() {
webviewhost_.reset();
}
delegate_.reset(NULL);
popup_delegate_.reset(NULL);
nav_controller_.reset(NULL);
if (paint_delegate_.get())
paint_delegate_.reset(NULL);
// Remove the reference to the window handle.
UIT_ClearMainWndHandle();
@ -789,11 +799,11 @@ void CefBrowserImpl::UIT_DestroyBrowser() {
request_context_proxy_.release());
}
// Remove the reference added in UIT_CreateBrowser().
Release();
// Remove the browser from the list maintained by the context.
_Context->RemoveBrowser(this);
// Remove the reference added in UIT_CreateBrowser().
Release();
}
void CefBrowserImpl::UIT_CloseBrowser() {