From 5bf43729a403b992cc90b5cdbbaaf505769d1107 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 2 Nov 2019 19:06:47 +0100 Subject: src: make EndStartedProfilers an exit hook Run `EndStartedProfilers` on Environment teardown. This is part of a series of changes to make embedding easier, by requiring fewer internal methods to build a fully functioning Node.js instance. PR-URL: https://github.com/nodejs/node/pull/30229 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Joyee Cheung Reviewed-By: Shelley Vohr --- src/node_errors.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/node_errors.cc') diff --git a/src/node_errors.cc b/src/node_errors.cc index ec14746514..e094fe4681 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -993,9 +993,7 @@ void TriggerUncaughtException(Isolate* isolate, // Now we are certain that the exception is fatal. ReportFatalException(env, error, message, EnhanceFatalException::kEnhance); -#if HAVE_INSPECTOR - profiler::EndStartedProfilers(env); -#endif + RunAtExit(env); // If the global uncaught exception handler sets process.exitCode, // exit with that code. Otherwise, exit with 1. -- cgit v1.2.1