fix: enable wasm trap handlers in all Node.js processes (#48839)

* fix: enable wasm trap handlers in all Node.js processes

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* fix: separate registrations to account for featurelist init

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
trop[bot]
2025-11-07 23:49:40 +09:00
committed by GitHub
parent c4d9d9645a
commit bb52517054
5 changed files with 72 additions and 47 deletions

View File

@@ -62,6 +62,7 @@
#include "shell/common/logging.h"
#include "shell/common/node_bindings.h"
#include "shell/common/node_includes.h"
#include "shell/common/v8_util.h"
#include "ui/base/idle/idle.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/ui_base_switches.h"
@@ -274,6 +275,10 @@ void ElectronBrowserMainParts::PostEarlyInitialization() {
// Initialize field trials.
InitializeFieldTrials();
if (base::FeatureList::IsEnabled(features::kWebAssemblyTrapHandler)) {
electron::SetUpWebAssemblyTrapHandler();
}
// Reinitialize logging now that the app has had a chance to set the app name
// and/or user data directory.
logging::InitElectronLogging(*base::CommandLine::ForCurrentProcess(),