diff --git a/lib/internal/bootstrap/switches/is_main_thread.js b/lib/internal/bootstrap/switches/is_main_thread.js index 08623898edafac..d9cb5f39b6e242 100644 --- a/lib/internal/bootstrap/switches/is_main_thread.js +++ b/lib/internal/bootstrap/switches/is_main_thread.js @@ -1,6 +1,9 @@ 'use strict'; -const { ObjectDefineProperty } = primordials; +const { + FunctionPrototype, + ObjectDefineProperty +} = primordials; const rawMethods = internalBinding('process_methods'); // TODO(joyeecheung): deprecate and remove these underscore methods @@ -10,8 +13,8 @@ process._debugEnd = rawMethods._debugEnd; // See the discussion in https://github.com/nodejs/node/issues/19009 and // https://github.com/nodejs/node/pull/34010 for why these are no-ops. // Five word summary: they were broken beyond repair. -process._startProfilerIdleNotifier = () => {}; -process._stopProfilerIdleNotifier = () => {}; +process._startProfilerIdleNotifier = FunctionPrototype; +process._stopProfilerIdleNotifier = FunctionPrototype; function defineStream(name, getter) { ObjectDefineProperty(process, name, {