Skip to content

fix: add back fallback wasm-trap handling - #47186

Merged
codebytere merged 2 commits into
mainfrom
refactor-wasm-trap-handling
Jun 3, 2025
Merged

codebytere merged 2 commits into
mainfrom
refactor-wasm-trap-handling

Conversation

@codebytere

@codebytere codebytere commented May 21, 2025 •

Copy link
Copy Markdown
Member

Description of Change

Refs CL:5372409

This change sets up wasm-trap handling for the case where content_shell has not enabled crash reporting but moves the responsibility to ElectronRendererClient. The default ContentRendererClient assumes that crash reporting is enabled (crashpad enabled by default) and does not set up its own handler.

As a side effect, we can also set --no-freeze-flags-after-init in the override and remove a patch

Checklist

Release Notes

Notes: none

@codebytere
codebytere requested review from ckerr and deepak1556 May 21, 2025 07:51
@codebytere
codebytere requested a review from a team as a code owner May 21, 2025 07:51
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label May 21, 2025
@codebytere codebytere added semver/patch backwards-compatible bug fixes target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. labels May 21, 2025
@codebytere
codebytere force-pushed the refactor-wasm-trap-handling branch 2 times, most recently from d6d3c49 to e36c53d Compare May 21, 2025 09:55
@deepak1556

Copy link
Copy Markdown
Member

Looks like the trap handler feature in only enabled for 64-bit arch, so we still need a way to inject early enough for Linux arm. Would ContentRendererClient::PostIOThreadCreated be a good enough early hook to add no-freeze-flags-after-init ?

@codebytere
codebytere force-pushed the refactor-wasm-trap-handling branch from 70bf5b6 to 750f536 Compare May 21, 2025 14:42
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label May 22, 2025
@codebytere
codebytere force-pushed the refactor-wasm-trap-handling branch from 750f536 to 535099f Compare May 28, 2025 13:00
@codebytere
codebytere requested a review from deepak1556 May 28, 2025 13:00
@deepak1556

Copy link
Copy Markdown
Member

Couple more changes are needed,

  1. Change for the 32-bit arch fix: add back fallback wasm-trap handling #47186 (comment)
  2. ENABLE_WEB_ASSEMBLY_TRAP_HANDLER_LINUX needs to be defined for 64-bit arch

@codebytere
codebytere force-pushed the refactor-wasm-trap-handling branch 2 times, most recently from 29433dd to 42e09c1 Compare June 2, 2025 19:18
Refs https://chromium-review.googlesource.com/c/chromium/src/+/5372409

This change sets up wasm-trap handling for the case where content_shell
has not enabled crash reporting but moves the responsibility to
ElectronRendererClient. The default ContentRendererClient assumes
that crash reporting is enabled (crashpad enabled by default) and does
not set up its own handler.
@codebytere
codebytere force-pushed the refactor-wasm-trap-handling branch from bab3777 to 5ebb9a6 Compare June 3, 2025 08:15
@codebytere
codebytere merged commit 5f5e8d0 into main Jun 3, 2025
@codebytere
codebytere deleted the refactor-wasm-trap-handling branch June 3, 2025 13:31
@release-clerk

release-clerk Bot commented Jun 3, 2025

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "36-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/36-x-y and removed target/36-x-y PR should also be added to the "36-x-y" branch. labels Jun 3, 2025
@trop

trop Bot commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

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

@trop trop Bot added in-flight/37-x-y and removed target/37-x-y PR should also be added to the "37-x-y" branch. labels Jun 3, 2025
@trop trop Bot added merged/37-x-y PR was merged to the "37-x-y" branch. and removed in-flight/37-x-y labels Jun 10, 2025
@trop

trop Bot commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

@codebytere has manually backported this PR to "36-x-y", please check out #47623

@trop trop Bot added in-flight/36-x-y merged/36-x-y PR was merged to the "36-x-y" branch. and removed needs-manual-bp/36-x-y in-flight/36-x-y labels Jul 1, 2025
kigh-ota pushed a commit to kigh-ota/electron that referenced this pull request Sep 30, 2025
* fix: add back fallback wasm-trap handling

Refs https://chromium-review.googlesource.com/c/chromium/src/+/5372409

This change sets up wasm-trap handling for the case where content_shell
has not enabled crash reporting but moves the responsibility to
ElectronRendererClient. The default ContentRendererClient assumes
that crash reporting is enabled (crashpad enabled by default) and does
not set up its own handler.

* chore: fix build

---------

Co-authored-by: deepak1556 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged/36-x-y PR was merged to the "36-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants