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

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

* fix: separate registrations to account for featurelist init
This commit is contained in:
Robo
2025-11-07 20:56:51 +09:00
committed by GitHub
parent 194ce1a1d6
commit ca0b46b413
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(),