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: initialize asar support in worker threads #33395

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Mar 23, 2022

Backport of #33216

See that PR for details.

Notes: fix: initialize asar support in worker threads

* fix: initialize asar support in worker threads

Use `ObjectWrap` instead of gin's Wrap in `electron_api_asar.cc` because
gin isn't fully initialized (and apparently not possible to initialize
without ruining the isolate configuration and array buffer allocator) in
worker threads. In the worker thread call `setupAsarSupport` just as we
do for the main process.

* Update lib/asar/fs-wrapper.ts

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Update patches/node/worker_thread_add_asar_support.patch

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Add a test

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
@trop trop bot requested review from a team as code owners March 23, 2022 00:38
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 23, 2022
@trop trop bot added 17-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 23, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 23, 2022
@jkleinsc jkleinsc merged commit 908b8e4 into 17-x-y Mar 24, 2022
@jkleinsc jkleinsc deleted the trop/17-x-y-bp-fix-initialize-asar-support-in-worker-threads-1647995890000 branch March 24, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
17-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants