fix: stack traces in non-Node.js contexts (#26820)

This commit is contained in:
Shelley Vohr 2020-12-09 11:08:13 -08:00 committed by GitHub
parent 1a79bedb27
commit 76f721474e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 52 additions and 0 deletions

View file

@ -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);