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 #33396

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 18-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
@zcbenz zcbenz merged commit bb6a072 into 18-x-y Mar 24, 2022
@zcbenz zcbenz deleted the trop/18-x-y-bp-fix-initialize-asar-support-in-worker-threads-1647995891427 branch March 24, 2022 07:24
@release-clerk
Copy link

release-clerk bot commented Mar 24, 2022

Release Notes Persisted

fix: initialize asar support in worker threads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
18-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