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

fix: Make ElectronBrowser mojo interface frame associated. #32734

Merged
merged 1 commit into from Feb 8, 2022

Conversation

marekharanczyk
Copy link
Contributor

Description of Change

Switch electron implementation of mojo interface to use same message pipe as some if interfaces handling frame in chromium. This will assure proper sequencing of events on browser side wrt electron ipc and frame handling. Otherwise race condition could be seen when objects operating on same models in browser process as standard web api is using, for example:

let child = window.open("https://www.example.com/","my_new_child") // cross site
ipcRenderer.send("do_something_with_child", "my_new_child");

will be racy without the change and ipc event could be handled before window is created (albeit rarely as it is timing dependent).

Checklist

Release Notes

Notes: Fixed possible race conditions between frame state and electron ipc.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 3, 2022
@nornagon nornagon added semver/patch backwards-compatible bug fixes target/17-x-y labels Feb 3, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 4, 2022
@jkleinsc jkleinsc merged commit e119da8 into electron:main Feb 8, 2022
@release-clerk
Copy link

release-clerk bot commented Feb 8, 2022

Release Notes Persisted

Fixed possible race conditions between frame state and electron ipc.

@trop
Copy link
Contributor

trop bot commented Feb 8, 2022

I have automatically backported this PR to "17-x-y", please check out #32815

@miniak
Copy link
Contributor

miniak commented Feb 9, 2022

@marekharanczyk do we need to backport this to 15-x-y and 16-x-y as well?

@marekharanczyk
Copy link
Contributor Author

I think it needs backporting to 18-x-y as that branch was created after PR, so it is on main and 17 but not 18. Regarding older branches, the problem is definitely there, just hidden for that specific case due to other code, but I am not going to make a call on that, those are stable branches after all and I had not compiled nor tested it extensively there to take that risk.

@miniak
Copy link
Contributor

miniak commented Feb 10, 2022

/trop run backport-to 18-x-y

@trop
Copy link
Contributor

trop bot commented Feb 10, 2022

The backport process for this PR has been manually initiated - sending your PR to 18-x-y!

@trop
Copy link
Contributor

trop bot commented Feb 10, 2022

I have automatically backported this PR to "18-x-y", please check out #32851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants