diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-06-14 18:04:13 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-25 03:43:29 +0300 |
commit | 0fb91acedff792463dd4f8a67c60cc645e6aa5c3 (patch) | |
tree | 6ea44b9d40aaae91eedfdda6da144df3acc2b16d /src/node_worker.cc | |
parent | 409fdba6d5c052f14af3ea73f0abb36db197f3d3 (diff) |
src: disallow JS execution inside FreeEnvironment
This addresses a TODO comment, and aligns the behavior between
worker threads and the main thread.
The primary motivation for this change is to more strictly enforce
the invariant that no JS runs after the `'exit'` event is emitted.
PR-URL: https://github.com/nodejs/node/pull/33874
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Diffstat (limited to 'src/node_worker.cc')
-rw-r--r-- | src/node_worker.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/node_worker.cc b/src/node_worker.cc index 403c054ab21..fa68fe88dc8 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -274,10 +274,6 @@ void Worker::Run() { this->env_ = nullptr; } - // TODO(addaleax): Try moving DisallowJavascriptExecutionScope into - // FreeEnvironment(). - Isolate::DisallowJavascriptExecutionScope disallow_js(isolate_, - Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE); env_.reset(); }); |