mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
src: fix fatal errors when a current isolate not exist
napi_fatal_error and node watchdog trigger fatal error but rather running on a thread that hold no current isolate. PR-URL: https://github.com/nodejs/node/pull/38624 Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
1 parent
a0dc194e31
commit
718ad105e5
5 files changed
+49
No files matched your search
@@ -425,6 +425,12 @@ void OnFatalError(const char* location, const char* message) {
|
||||
}
|
||||
|
||||
Isolate* isolate = Isolate::GetCurrent();
|
||||
// TODO(legendecas): investigate failures on triggering node-report with
|
||||
// nullptr isolates.
|
||||
if (isolate == nullptr) {
|
||||
fflush(stderr);
|
||||
ABORT();
|
||||
}
|
||||
Environment* env = Environment::GetCurrent(isolate);
|
||||
bool report_on_fatalerror;
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user