Core - ManagedCefBrowserAdapter::CreateBrowser add missing UnWrap call

Add UnWrap call to allow for passing in CefSharp.WindowInfo (the wrapper object)

Resolves #3399
This commit is contained in:
Alex Maitland
2021-02-09 21:05:49 +10:00
parent 47a3fe142d
commit f929914432
@@ -27,8 +27,6 @@ namespace CefSharp
void ManagedCefBrowserAdapter::CreateBrowser(IWindowInfo^ windowInfo, IBrowserSettings^ browserSettings, IRequestContext^ requestContext, String^ address)
{
auto cefWindowInfoWrapper = static_cast<WindowInfo^>(windowInfo);
CefString addressNative = StringUtils::ToNative(address);
if (browserSettings == nullptr)
@@ -90,10 +88,11 @@ namespace CefSharp
auto managedRequestCtx = (RequestContext^)requestContext->UnWrap();
requestCtx = static_cast<CefRefPtr<CefRequestContext>>(managedRequestCtx);
}
auto winInfo = (WindowInfo^)windowInfo->UnWrap();
auto bSettings = (BrowserSettings^)browserSettings->UnWrap();
if (!CefBrowserHost::CreateBrowser(*cefWindowInfoWrapper->GetWindowInfo(), _clientAdapter.get(), addressNative,
if (!CefBrowserHost::CreateBrowser(*winInfo->GetWindowInfo(), _clientAdapter.get(), addressNative,
*bSettings->_browserSettings, extraInfo, requestCtx))
{
throw gcnew InvalidOperationException("CefBrowserHost::CreateBrowser call failed, review the CEF log file for more details.");