src: add handle scope to OnFatalError()
For the report generation, we use `Environment::GetCurrent(isolate)` which uses `isolate->GetCurrentContext()` under the hood, thus allocates a handle. Without a `HandleScope`, this is invalid. This might not strictly be allowed inside of `OnFatalError()`, but it won’t make anything worse either. PR-URL: https://github.com/nodejs/node/pull/25775 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
6f217e7ce5
commit
006aa632c6
@ -319,6 +319,7 @@ 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) {
|
||||
std::shared_ptr<PerIsolateOptions> options = env->isolate_data()->options();
|
||||
|
Loading…
x
Reference in New Issue
Block a user