From 79fb0cf4ab90850141bbac969488f8eab260ed1a 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. --- 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'); });