-
Notifications
You must be signed in to change notification settings - Fork 0
[CORRUPTED] Synthetic Benchmark PR #48788 - fix: enable wasm trap handlers in all Node.js processes #38
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
base: base_pr_48788_20251204_2762
Are you sure you want to change the base?
[CORRUPTED] Synthetic Benchmark PR #48788 - fix: enable wasm trap handlers in all Node.js processes #38
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
Benchmark PR electron#48788
Type: Corrupted (contains bugs)
Original PR Title: fix: enable wasm trap handlers in all Node.js processes
Original PR Description: #### Description of Change
Found while investigating microsoft/vscode#273191
Since electron#47186 we had accidentally disabled V8 trap handlers in browser and utility process. This incurs performance cost when executing wasm due to inlined bound checks.
Enable the feature back and align it with upstream based on the feature parameter across all processes features::kWebAssemblyTrapHandler
Current matrix of enabled platforms.
Release Notes
Notes: Reenable V8 trap handlers for wasm in browser and utility process, improves runtime execution of wasm
Original PR URL: electron#48788
PR Type
Enhancement
Description
Enable WebAssembly trap handlers across all Node.js processes
Consolidate trap handler setup logic into shared utility function
Add feature flag detection for utility process initialization
Support Linux x86_64/arm64, Windows, and macOS platforms
Diagram Walkthrough
File Walkthrough
v8_util.h
Add WebAssembly trap handler function declarationshell/common/v8_util.h
SetUpWebAssemblyTrapHandler()v8_util.cc
Implement cross-platform WebAssembly trap handler setupshell/common/v8_util.cc
SetUpWebAssemblyTrapHandler()function withplatform-specific logic
Linux
electron_browser_main_parts.cc
Initialize trap handlers in browser processshell/browser/electron_browser_main_parts.cc
shell/common/v8_util.hSetUpWebAssemblyTrapHandler()inPostEarlyInitialization()afterfeature list initialization
electron_renderer_client.cc
Refactor renderer to use shared trap handler logicshell/renderer/electron_renderer_client.cc
electron::SetUpWebAssemblyTrapHandler()functionSetUpWebAssemblyTrapHandler()method to call commonimplementation
node_service.cc
Initialize trap handlers in utility processshell/services/node/node_service.cc
content/public/common/content_features.handshell/common/v8_util.hSetUpWebAssemblyTrapHandler()inInitialize()after V8 isolatesetup
features::kWebAssemblyTrapHandlerfeature flag before enabling