Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronous Bindings in SelfHosted BrowserSubProcess #4562

Closed
1 task done
PKMNPlatin opened this issue Aug 2, 2023 · 0 comments
Closed
1 task done

Synchronous Bindings in SelfHosted BrowserSubProcess #4562

PKMNPlatin opened this issue Aug 2, 2023 · 0 comments
Milestone

Comments

@PKMNPlatin
Copy link

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

114.2.120

Operating System

Windows 11

Architecture

x64

.Net Version

4.5.2

Implementation

WinForms

Reproduction Steps

Fork the Minimal Example of CefSharp.WinForms and modify to run as SelfHosted Cef

Register one async and one sync object like:

m_browser.JavascriptObjectRepository.Register("syncObj", obj1, isAsync: false, options: BindingOptions.DefaultBinder);
m_browser.JavascriptObjectRepository.Register("asyncObj", obj2, isAsync: true, options: BindingOptions.DefaultBinder);

and call CefSharp.BindObjectAsync(); in JavaScript

The Async binding is created, the Sync one is nowhere to be found.

Expected behavior

Exposing the Sync-Binding to the global Window

Actual behavior

Only exposing the Async-Binding if using it as SelfHost

Regression?

No response

Known Workarounds

Haven't found one yet

Does this problem also occur in the CEF Sample Application

Not Tested

Other information

The cefclient application don't provide tests for JSBindings

From debug.log:

[0802/083647.102:ERROR:JavascriptRootObjectWrapper.cpp(37)] IBrowserProcess is null, unable to bind object testBinding

Only occurs Cef is running as SelfHosted Application

@amaitland amaitland changed the title Synchronous Bindings in SelfHosted-Cef Synchronous Bindings in SelfHosted BrowserSubProcess Aug 2, 2023
@amaitland amaitland added this to the 116.0.x milestone Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants