From 5ddd26e48370b0731ef7ed740cc992f28ce3fd29 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 20 May 2021 15:09:10 -0400 Subject: [PATCH] Restore support for CreateBrowserSync with NULL |request_context| (see issue #2969) This was unintentionally lost during the Chrome runtime refactoring effort. --- libcef/browser/browser_host_create.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcef/browser/browser_host_create.cc b/libcef/browser/browser_host_create.cc index f9aa59076..10a3a4e25 100644 --- a/libcef/browser/browser_host_create.cc +++ b/libcef/browser/browser_host_create.cc @@ -119,6 +119,10 @@ CefRefPtr CefBrowserHost::CreateBrowserSync( return nullptr; } + if (!request_context) { + request_context = CefRequestContext::GetGlobalContext(); + } + // Verify that the browser context is valid. auto request_context_impl = static_cast(request_context.get());