chore: refactor deprecation apis (#14495)
This commit is contained in:
parent
3a6e88c0e7
commit
2157d09956
3 changed files with 148 additions and 146 deletions
|
@ -42,9 +42,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 {memory} of metrics) {
|
||||
deprecate.removeProperty(memory, 'privateBytes')
|
||||
deprecate.removeProperty(memory, 'sharedBytes')
|
||||
}
|
||||
|
||||
return metrics
|
||||
}
|
||||
|
||||
app.isPackaged = (() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue