diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-02-24 23:52:14 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-03-06 00:40:00 +0300 |
commit | c2f620ab76c3e42fa1fcdfde82aba7bcba3031e9 (patch) | |
tree | 05ae336d10e36944f1d65a7f7d72aeb12f58c6b6 /src/node_errors.cc | |
parent | cc4e8e0696ffd5813df9cb50af7b47c27aaf2712 (diff) |
src: refactor `Environment::GetCurrent(isolate)` usage
Do not require an explicit `HandleScope`, or the ability to create
one, when using `Environment::GetCurrent()`.
`isolate->InContext()` is used as an indicator that it is probably
okay to create a `HandleScope`, see also the short discussion in
https://github.com/nodejs/node/pull/25775#pullrequestreview-197371049.
PR-URL: https://github.com/nodejs/node/pull/26376
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_errors.cc')
-rw-r--r-- | src/node_errors.cc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc index 1c15b555845..5c1e227966c 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -314,7 +314,6 @@ void OnFatalError(const char* location, const char* message) { } #ifdef NODE_REPORT Isolate* isolate = Isolate::GetCurrent(); - HandleScope handle_scope(isolate); Environment* env = Environment::GetCurrent(isolate); if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) { report::TriggerNodeReport( |