Skip to content
Closed
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
Next Next commit
worker: call CancelTerminateExecution() before exiting Locker
As the comment indicates, this fixes a DCHECK failure, although I don’t
quite understand why it is happening in the first place.
  • Loading branch information
addaleax committed May 10, 2020
commit b523a314bb3759b7d5d1aac8d472bfe16c3c33f4
5 changes: 5 additions & 0 deletions src/node_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ void Worker::Run() {

DeleteFnPtr<Environment, FreeEnvironment> env_;
auto cleanup_env = OnScopeLeave([&]() {
// TODO(addaleax): This call is harmless but should not be necessary.
// Figure out why V8 is raising a DCHECK() here without it
// (in test/parallel/test-async-hooks-worker-asyncfn-terminate-4.js).
isolate_->CancelTerminateExecution();

if (!env_) return;
env_->set_can_call_into_js(false);

Expand Down