refactor: deprecation handling apis (#14615)
This commit is contained in:
parent
7e5815c180
commit
89148bcf8d
3 changed files with 142 additions and 161 deletions
|
@ -60,9 +60,13 @@ Object.assign(app, {
|
|||
|
||||
const nativeFn = app.getAppMetrics
|
||||
app.getAppMetrics = () => {
|
||||
deprecate.removeProperty(nativeFn, 'privateBytes')
|
||||
deprecate.removeProperty(nativeFn, 'sharedBytes')
|
||||
return nativeFn.call(app)
|
||||
let metrics = nativeFn.call(app)
|
||||
for (const metric of metrics) {
|
||||
deprecate.removeProperty(metric, 'memory', true)
|
||||
if ('memory' in metric) {
|
||||
deprecate.removeProperty(metric, 'memory')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app.isPackaged = (() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue