mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
libcef:
- Fix a leak of CachedResource objects due to the Cache never being cleared (issue #15). - Fix a crash when the main application exits while popup windows exist due to a race condition when deleting CefBrowser objects. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@49 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -64,6 +64,11 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
|
||||
// Clean up anything associated with the WebViewHost widget.
|
||||
browser->GetWebViewHost()->webwidget()->close();
|
||||
|
||||
// Clear the user data pointer.
|
||||
win_util::SetWindowUserData(hwnd, NULL);
|
||||
// Remove the reference added in UIT_CreateBrowser().
|
||||
browser->Release();
|
||||
|
||||
// Remove the browser from the list maintained by the context
|
||||
_Context->RemoveBrowser(browser);
|
||||
}
|
||||
@@ -255,6 +260,8 @@ void CefBrowserImpl::UIT_CreateBrowser(const std::wstring& url)
|
||||
// Set window user data to this object for future reference from the window
|
||||
// procedure
|
||||
win_util::SetWindowUserData(window_info_.m_hWnd, this);
|
||||
// Add a reference that will be released on WM_DESTROY.
|
||||
AddRef();
|
||||
|
||||
// Add the new browser to the list maintained by the context
|
||||
_Context->AddBrowser(this);
|
||||
|
Reference in New Issue
Block a user