mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Popups must share the parent context to avoid crashes on parent browser destruction (issue #2162)
This commit is contained in:
@@ -20,7 +20,8 @@ class CefStoragePartitionProxy;
|
||||
// browser_context.h for an object relationship diagram.
|
||||
class CefBrowserContextProxy : public CefBrowserContext {
|
||||
public:
|
||||
CefBrowserContextProxy(CefRefPtr<CefRequestContextHandler> handler,
|
||||
CefBrowserContextProxy(CefRequestContextImpl* const request_context,
|
||||
CefRefPtr<CefRequestContextHandler> handler,
|
||||
CefBrowserContextImpl* parent);
|
||||
|
||||
// Must be called immediately after this object is created.
|
||||
@@ -61,6 +62,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
||||
const PrefService* GetPrefs() const override;
|
||||
|
||||
// CefBrowserContext methods.
|
||||
CefRequestContextImpl* GetCefRequestContext() const override;
|
||||
const CefRequestContextSettings& GetSettings() const override;
|
||||
CefRefPtr<CefRequestContextHandler> GetHandler() const override;
|
||||
HostContentSettingsMap* GetHostContentSettingsMap() override;
|
||||
@@ -79,6 +81,9 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
||||
|
||||
~CefBrowserContextProxy() override;
|
||||
|
||||
// Guaranteed to outlive this object.
|
||||
CefRequestContextImpl* const request_context_;
|
||||
|
||||
// Members initialized during construction are safe to access from any thread.
|
||||
CefRefPtr<CefRequestContextHandler> handler_;
|
||||
CefBrowserContextImpl* parent_; // Guaranteed to outlive this object.
|
||||
|
Reference in New Issue
Block a user