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

src: remove abort_on_uncaught_exception node.cc #22724

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,11 @@ inline void Environment::set_trace_sync_io(bool value) {
}

inline bool Environment::abort_on_uncaught_exception() const {
return abort_on_uncaught_exception_;
return options_->abort_on_uncaught_exception;
}

inline void Environment::set_abort_on_uncaught_exception(bool value) {
abort_on_uncaught_exception_ = value;
options_->abort_on_uncaught_exception = value;
}

inline AliasedBuffer<uint32_t, v8::Uint32Array>&
Expand Down
7 changes: 1 addition & 6 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ static node_module* modlist_internal;
static node_module* modlist_linked;
static node_module* modlist_addon;

// TODO(addaleax): This should not be global.
static bool abort_on_uncaught_exception = false;

// Bit flag used to track security reverts (see node_revert.h)
unsigned int reverted = 0;

Expand Down Expand Up @@ -2670,7 +2667,7 @@ void ProcessArgv(std::vector<std::string>* args,
"--abort-on-uncaught-exception") != v8_args.end() ||
std::find(v8_args.begin(), v8_args.end(),
"--abort_on_uncaught_exception") != v8_args.end()) {
abort_on_uncaught_exception = true;
per_process_opts->per_isolate->per_env->abort_on_uncaught_exception = true;
danbev marked this conversation as resolved.
Show resolved Hide resolved
}

// TODO(bnoordhuis) Intercept --prof arguments and start the CPU profiler
Expand Down Expand Up @@ -3036,8 +3033,6 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
return 12; // Signal internal error.
}

env.set_abort_on_uncaught_exception(abort_on_uncaught_exception);

// TODO(addaleax): Maybe access this option directly instead of setting
// a boolean member of Environment. Ditto below for trace_sync_io.
if (env.options()->no_force_async_hooks_checks) {
Expand Down
1 change: 1 addition & 0 deletions src/node_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class DebugOptions {
class EnvironmentOptions {
public:
std::shared_ptr<DebugOptions> debug_options { new DebugOptions() };
bool abort_on_uncaught_exception = false;
bool experimental_modules = false;
bool experimental_repl_await = false;
bool experimental_vm_modules = false;
Expand Down