mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
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>
This commit is contained in:
5 files changed
+13
-9
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user