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

Add support for JSB with frames #1321

Merged
merged 8 commits into from
Oct 13, 2015

Conversation

amaitland
Copy link
Member

Current implementation only works with a single context per CefBrowser wrapper, when multiple frames are added a new V8Context is created per Frame.

This PR is based on/inspired by #1319

Support for a JavascriptRootObjectWrapper per V8Context has been added. Each JS Callback and Async Method call now includes a FrameId, 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).

… 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)
@amaitland amaitland added this to the 45.0.0 milestone Oct 11, 2015
@amaitland
Copy link
Member Author

Potential fix for #1317 and #1315

@illfang
Copy link
Contributor

illfang commented Oct 13, 2015

@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.
amaitland#4

amaitland added a commit that referenced this pull request Oct 13, 2015
@amaitland amaitland merged commit 13bdc09 into cefsharp:master Oct 13, 2015
@amaitland amaitland deleted the enhancement/v8contextperframe branch October 13, 2015 08:47
@amaitland
Copy link
Member Author

@illfang Thanks for your hard work on this 👍 I've merged into master, if all goes well then I'll probably back port the changes into the cefsharp/43 branch at some point in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants