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

Various fixes around the extensions lifecycle on Chrome / Chromium #8

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

fmoessbauer
Copy link
Member

This solves the host-part double initialization and non-termination issues on Chrome and Chromium.

@fmoessbauer fmoessbauer self-assigned this Jul 1, 2024
Copy link
Collaborator

@jan-kiszka jan-kiszka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing reasoning for patch 1, otherwise looks good (to the degree this is possible with Chrome).

These functions are non async anyways, hence there is no need to make
them async. By that, we also can use them directly in the handler
instead of wrapping in a lambda.

Signed-off-by: Felix Moessbauer <[email protected]>
On chrome and chromium, the native part is not reliably terminated when
the browser is terminated. As we also cannot reliably send a message to
the host part on termination of the browser, there is no direct way to
let the host script known. In theory, the script should terminate once
stdio is closed, but in practice this is not always the case, leading to
orphaned processes.

To fix this, we use prctl to register a PDEATHSIG handler.

Signed-off-by: Felix Moessbauer <[email protected]>
@fmoessbauer fmoessbauer merged commit 407d493 into main Jul 2, 2024
3 checks passed
@fmoessbauer fmoessbauer deleted the fm/fix-lifecycle-chrome branch July 2, 2024 11:41
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