From ae2eec3efa2726be2db6a8c24ceb2160a918e637 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Tue, 17 May 2016 14:37:32 -0700 Subject: [PATCH] Move process-stats methods to process --- lib/common/api/exports/electron.js | 6 ------ lib/common/api/process-stats.js | 1 - lib/common/init.js | 2 ++ 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 lib/common/api/process-stats.js 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'))