diff --git a/lib/common/api/exports/electron.js b/lib/common/api/exports/electron.js index b381a90d675d..1e9c2d71f3b7 100644 --- a/lib/common/api/exports/electron.js +++ b/lib/common/api/exports/electron.js @@ -21,12 +21,6 @@ exports.defineProperties = function (exports) { return require('../native-image') } }, - processStats: { - enumerable: true, - get: function () { - return require('../process-stats') - } - }, shell: { enumerable: true, get: function () { diff --git a/lib/common/api/process-stats.js b/lib/common/api/process-stats.js deleted file mode 100644 index 22ad34c6dd78..000000000000 --- a/lib/common/api/process-stats.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = process.atomBinding('process_stats') diff --git a/lib/common/init.js b/lib/common/init.js index 257249f0a639..8df576831b5f 100644 --- a/lib/common/init.js +++ b/lib/common/init.js @@ -46,3 +46,5 @@ if (process.type === 'browser') { if (process.platform === 'win32' && __dirname.indexOf('\\Program Files\\WindowsApps\\') === 2) { process.windowsStore = true } + +Object.assign(Object.getPrototypeOf(process), process.atomBinding('process_stats'))