summaryrefslogtreecommitdiff
path: root/src/node_errors.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-02-24 21:52:14 +0100
committerAnna Henningsen <anna@addaleax.net>2019-03-05 22:40:00 +0100
commitc2f620ab76c3e42fa1fcdfde82aba7bcba3031e9 (patch)
tree05ae336d10e36944f1d65a7f7d72aeb12f58c6b6 /src/node_errors.cc
parentcc4e8e0696ffd5813df9cb50af7b47c27aaf2712 (diff)
downloadandroid-node-v8-c2f620ab76c3e42fa1fcdfde82aba7bcba3031e9.tar.gz
android-node-v8-c2f620ab76c3e42fa1fcdfde82aba7bcba3031e9.tar.bz2
android-node-v8-c2f620ab76c3e42fa1fcdfde82aba7bcba3031e9.zip
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.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc
index 1c15b55584..5c1e227966 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(