-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add support for JSB with frames #1321
Add support for JSB with frames #1321
Conversation
… can be executed on a specific frame Resolves a problem where multiple contexts are created and only the first one is dealt with properly (each frame has it's own V8 context)
…aitland/CefSharp into fix-v8contextperframe-destructor
…r, added comment to clarify the missing destructor call
…arpper message handling
@amaitland I have tried your solution and it is still possible to crash CEF. (process crash for popups, render process crash for usual page) I've created a PR on your repository which I believe fixes the remaining issues. |
…nt/v8contextperframe
…aitland/CefSharp into fix-v8contextperframe-destructor
Adjustment for the v8 context per frame implementation
Add support for JSB with frames
@illfang Thanks for your hard work on this 👍 I've merged into |
Current implementation only works with a single context per
CefBrowser
wrapper, when multiple frames are added a newV8Context
is created perFrame
.This
PR
is based on/inspired by #1319Support for a
JavascriptRootObjectWrapper
perV8Context
has been added. EachJS Callback
andAsync Method
call now includes aFrameId
, so they can be associated with the correct wrapper.I haven't yet done extensive testing, it appears to work. The changes are quite fiddly as params passed using the native
IPC
are index based. (At some point a layer of abstraction needs to be added to handle this complexity as it's a little hard to follow at the moment, It was a deliberate decision to avoid doing that as yet, I though it was more important to fully understand the problem domain before attempting to engineer a solution).