Open magreenblatt opened 4 years ago
We cannot use
extra_info
ofOnBrowserCreated
as well, because it’s called afterOnWebKitInitialized
whereCefMessageRouterRendererSide
is created.
So create the CefMessageRouterRendererSide
in OnBrowserCreated
instead. OnBrowserCreated
might be called multiple times if the render process is used by multiple browsers, so you can either keep a map of browser ID to router, or just use the first registration for all browsers.
Alternately, the registration could be handled via the messages in OnProcessMessageReceived
exclusively.
Original report by Nikita Gubarkov (Bitbucket: YaaZ, GitHub: YaaZ).
Please see https://bitbucket.org/chromiumembedded/cef/issues/2978
As CEF now creates render processes in advance, we cannot pass
CefMessageRouterConfig
parameters toextra_info
ofOnRenderThreadCreated
, as it’s now called too early for us to know what to pass to it. We cannot useextra_info
ofOnBrowserCreated
as well, because it’s called afterOnWebKitInitialized
whereCefMessageRouterRendererSide
is created.Original issue with JS callbacks was posted on CEF forum, there’s also a test and necessary steps for reproducing the problem: https://magpcss.org/ceforum/viewtopic.php?f=17&t=17599
This is a critical issue, which completely breaks usage of JS callbacks and exists since 78.2.7+g9cd8bac+chromium-78.0.3904.70