mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Simplify ownership of CefBrowserContext objects (issue #2083)
This commit is contained in:
@@ -59,16 +59,18 @@ bool ShouldProxyUserData(const void* key) {
|
||||
|
||||
CefBrowserContextProxy::CefBrowserContextProxy(
|
||||
CefRefPtr<CefRequestContextHandler> handler,
|
||||
scoped_refptr<CefBrowserContextImpl> parent)
|
||||
CefBrowserContextImpl* parent)
|
||||
: CefBrowserContext(true),
|
||||
handler_(handler),
|
||||
parent_(parent) {
|
||||
DCHECK(handler_.get());
|
||||
DCHECK(parent_.get());
|
||||
DCHECK(parent_);
|
||||
parent_->AddProxy(this);
|
||||
}
|
||||
|
||||
CefBrowserContextProxy::~CefBrowserContextProxy() {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
Shutdown();
|
||||
|
||||
parent_->RemoveProxy(this);
|
||||
|
Reference in New Issue
Block a user