views: Fix dangling raw_ptr on CefToolbarViewView destruction
This commit is contained in:
parent
6036df047f
commit
265a733807
|
@ -11,6 +11,13 @@ ChromeBrowserView::ChromeBrowserView(CefBrowserViewImpl* cef_browser_view)
|
||||||
: ParentClass(cef_browser_view->delegate()),
|
: ParentClass(cef_browser_view->delegate()),
|
||||||
cef_browser_view_(cef_browser_view) {}
|
cef_browser_view_(cef_browser_view) {}
|
||||||
|
|
||||||
|
ChromeBrowserView::~ChromeBrowserView() {
|
||||||
|
if (cef_toolbar_) {
|
||||||
|
WillDestroyToolbar();
|
||||||
|
cef_toolbar_ = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ChromeBrowserView::InitBrowser(std::unique_ptr<Browser> browser) {
|
void ChromeBrowserView::InitBrowser(std::unique_ptr<Browser> browser) {
|
||||||
DCHECK(!web_view_);
|
DCHECK(!web_view_);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ class ChromeBrowserView
|
||||||
|
|
||||||
// |cef_browser_view| is non-nullptr and will outlive this object.
|
// |cef_browser_view| is non-nullptr and will outlive this object.
|
||||||
explicit ChromeBrowserView(CefBrowserViewImpl* cef_browser_view);
|
explicit ChromeBrowserView(CefBrowserViewImpl* cef_browser_view);
|
||||||
|
~ChromeBrowserView() override;
|
||||||
|
|
||||||
ChromeBrowserView(const ChromeBrowserView&) = delete;
|
ChromeBrowserView(const ChromeBrowserView&) = delete;
|
||||||
ChromeBrowserView& operator=(const ChromeBrowserView&) = delete;
|
ChromeBrowserView& operator=(const ChromeBrowserView&) = delete;
|
||||||
|
|
Loading…
Reference in New Issue