Popups must share the parent context to avoid crashes on parent browser destruction (issue #2162)

This commit is contained in:
Marshall Greenblatt
2017-05-04 17:53:27 -04:00
parent 5a5b538af7
commit 3f970689a0
17 changed files with 448 additions and 390 deletions

View File

@@ -21,7 +21,8 @@ namespace {
// Return the main context for now since we don't currently have a good way to
// determine that.
CefBrowserContextImpl* GetActiveBrowserContext() {
return CefContentBrowserClient::Get()->browser_context();
return static_cast<CefBrowserContextImpl*>(
CefContentBrowserClient::Get()->request_context()->GetBrowserContext());
}
} // namespace