Skip to content

Commit 734cb8f

Browse files
committed
Core - Crash opening popup window
Upstream changes mean that extraInfo can now be null (https://bitbucket.org/chromiumembedded/cef/issues/3123/convert-legacy-ipc-messages-to-mojo) We currently only send extra Info for the main browser and not for popups. Assign the _jsBindingPropertyName/_jsBindingPropertyNameCamelCase properties by default and only update when the user has specified their own name. It's not currently possible to have different naming in the same render process (was previously the case). Issue #3670
1 parent b4d87d7 commit 734cb8f

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,13 @@ namespace CefSharp
9090
}
9191
}
9292
}
93-
}
9493

95-
if (extraInfo->HasKey("JsBindingPropertyName") || extraInfo->HasKey("JsBindingPropertyNameCamelCase"))
96-
{
97-
//TODO: Create constant for these and legacy binding strings above
98-
_jsBindingPropertyName = extraInfo->GetString("JsBindingPropertyName");
99-
_jsBindingPropertyNameCamelCase = extraInfo->GetString("JsBindingPropertyNameCamelCase");
100-
}
101-
else
102-
{
103-
_jsBindingPropertyName = "CefSharp";
104-
_jsBindingPropertyNameCamelCase = "cefSharp";
94+
if (extraInfo->HasKey("JsBindingPropertyName") || extraInfo->HasKey("JsBindingPropertyNameCamelCase"))
95+
{
96+
//TODO: Create constant for these and legacy binding strings above
97+
_jsBindingPropertyName = extraInfo->GetString("JsBindingPropertyName");
98+
_jsBindingPropertyNameCamelCase = extraInfo->GetString("JsBindingPropertyNameCamelCase");
99+
}
105100
}
106101
}
107102

CefSharp.BrowserSubprocess.Core/CefAppUnmanagedWrapper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ namespace CefSharp
5050
_javascriptObjects = gcnew Dictionary<String^, JavascriptObject^>();
5151
_registerBoundObjectRegistry = gcnew RegisterBoundObjectRegistry();
5252
_legacyBindingEnabled = false;
53+
_jsBindingPropertyName = "CefSharp";
54+
_jsBindingPropertyNameCamelCase = "cefSharp";
5355
}
5456

5557
~CefAppUnmanagedWrapper()

0 commit comments

Comments
 (0)