Backport (3-0-x) - fix: deprecate properties in app.getAppMetrics() (#13453)

* fix: deprecate properties in app.getAppMetrics()

* address feedback from review

* fix deprecated property location

* simplify test
This commit is contained in:
trop[bot] 2018-06-27 19:07:39 +10:00 committed by Samuel Attard
parent ec993214a2
commit 93edf2edd3
4 changed files with 47 additions and 6 deletions

View file

@ -58,6 +58,13 @@ Object.assign(app, {
}
})
const nativeFn = app.getAppMetrics
app.getAppMetrics = () => {
deprecate.removeProperty(nativeFn, 'privateBytes')
deprecate.removeProperty(nativeFn, 'sharedBytes')
return nativeFn.call(app)
}
app.isPackaged = (() => {
const execFile = path.basename(process.execPath).toLowerCase()
if (process.platform === 'win32') {