mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
fix: stack traces in non-Node.js contexts (#26820)
This commit is contained in:
@@ -503,6 +503,13 @@ node::Environment* NodeBindings::CreateEnvironment(
|
||||
// context. We need to use the one Blink already provides.
|
||||
is.flags |=
|
||||
node::IsolateSettingsFlags::SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK;
|
||||
|
||||
// We do not want to use the stack trace callback that Node.js uses,
|
||||
// because it relies on Node.js being aware of the current Context and
|
||||
// that's not always the case. We need to use the one Blink already
|
||||
// provides.
|
||||
is.flags |=
|
||||
node::IsolateSettingsFlags::SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK;
|
||||
}
|
||||
|
||||
node::SetIsolateUpForNode(context->GetIsolate(), is);
|
||||
|
||||
Reference in New Issue
Block a user