mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
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:
@@ -35,9 +35,9 @@ app.releaseSingleInstanceLock()
|
||||
```
|
||||
|
||||
|
||||
# Planned Breaking API Changes (3.0)
|
||||
# Breaking API Changes (3.0)
|
||||
|
||||
The following list includes the breaking API changes planned for Electron 3.0.
|
||||
The following list includes the breaking API changes in Electron 3.0.
|
||||
|
||||
## `app`
|
||||
|
||||
@@ -46,6 +46,12 @@ The following list includes the breaking API changes planned for Electron 3.0.
|
||||
app.getAppMemoryInfo()
|
||||
// Replace with
|
||||
app.getAppMetrics()
|
||||
|
||||
// Deprecated
|
||||
const metrics = app.getAppMetrics()
|
||||
const {memory} = metrics[0]
|
||||
memory.privateBytes // Deprecated property
|
||||
memory.sharedBytes // Deprecated property
|
||||
```
|
||||
|
||||
## `BrowserWindow`
|
||||
@@ -124,6 +130,15 @@ nativeImage.createFromBuffer(buffer, {
|
||||
})
|
||||
```
|
||||
|
||||
## `process`
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
const info = process.getProcessMemoryInfo()
|
||||
const privateBytes = info.privateBytes // deprecated property
|
||||
const sharedBytes = info.sharedBytes // deprecated property
|
||||
```
|
||||
|
||||
## `screen`
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user