From a44f98e3336989aeb469a7dec6ae15729508ac60 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 15 Mar 2019 12:12:26 +0100 Subject: [PATCH] lib: run prepareMainThreadExecution for third_party_main Treat `_third_party_main` like any other CJS entry point, as it was done before 6967f91368cbb9cad3877ee59874cc83ccef4653. PR-URL: https://github.com/nodejs/node/pull/26677 Reviewed-By: Colin Ihrig Reviewed-By: Gus Caplan Reviewed-By: Joyee Cheung Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater --- lib/internal/main/run_third_party_main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/internal/main/run_third_party_main.js b/lib/internal/main/run_third_party_main.js index c26c1f25f380c8..5fb1d39bc6d072 100644 --- a/lib/internal/main/run_third_party_main.js +++ b/lib/internal/main/run_third_party_main.js @@ -1,9 +1,13 @@ 'use strict'; -// Legacy _third_party_main.js support +const { + prepareMainThreadExecution +} = require('internal/bootstrap/pre_execution'); +prepareMainThreadExecution(); markBootstrapComplete(); +// Legacy _third_party_main.js support process.nextTick(() => { require('_third_party_main'); });