remove ses.setCertificateVerifyProc() deprecation
This commit is contained in:
parent
22fed0c798
commit
fb4a8e9cb9
2 changed files with 8 additions and 43 deletions
|
@ -16,30 +16,6 @@ let optionsB = {webPreferences: {enableBlinkFeatures: ''}}
|
|||
let windowB = new BrowserWindow(optionsB)
|
||||
```
|
||||
|
||||
## `nativeImage`
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
nativeImage.createFromBuffer(buffer, 1.0)
|
||||
// Replace with
|
||||
nativeImage.createFromBuffer(buffer, {
|
||||
scaleFactor: 1.0
|
||||
})
|
||||
```
|
||||
|
||||
## `session`
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
ses.setCertificateVerifyProc(function (hostname, certificate, callback) {
|
||||
callback(true)
|
||||
})
|
||||
// Replace with
|
||||
ses.setCertificateVerifyProc(function (request, callback) {
|
||||
callback(0)
|
||||
})
|
||||
```
|
||||
|
||||
## Node Headers URL
|
||||
|
||||
This is the URL specified as `disturl` in a `.npmrc` file or as the `--dist-url`
|
||||
|
@ -49,12 +25,6 @@ Deprecated: https://atom.io/download/atom-shell
|
|||
|
||||
Replace with: https://atom.io/download/electron
|
||||
|
||||
## `FIXME` comments
|
||||
|
||||
The `FIXME` string is used in code comments to denote things that should be
|
||||
fixed for the 3.0 release. See
|
||||
https://github.com/electron/electron/search?q=fixme
|
||||
|
||||
# Planned Breaking API Changes (4.0)
|
||||
|
||||
The following list includes the APIs that will be removed in Electron 4.0.
|
||||
|
@ -94,4 +64,10 @@ app.on('second-instance', function (argv, cwd) {
|
|||
app.releaseSingleInstance()
|
||||
// Replace with
|
||||
app.releaseSingleInstanceLock()
|
||||
```
|
||||
```
|
||||
|
||||
## `FIXME` comments
|
||||
|
||||
The `FIXME` string is used in code comments to denote things that should be
|
||||
fixed for the 3.0 release. See
|
||||
https://github.com/electron/electron/search?q=fixme
|
|
@ -22,16 +22,5 @@ Session.prototype._init = function () {
|
|||
}
|
||||
|
||||
Session.prototype.setCertificateVerifyProc = function (verifyProc) {
|
||||
if (verifyProc != null && verifyProc.length > 2) {
|
||||
// TODO(kevinsawicki): Remove in 2.0, deprecate before then with warnings
|
||||
this._setCertificateVerifyProc(({hostname, certificate, verificationResult}, cb) => {
|
||||
verifyProc(hostname, certificate, (result) => {
|
||||
// Disabled due to false positive in StandardJS
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
cb(result ? 0 : -2)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this._setCertificateVerifyProc(verifyProc)
|
||||
}
|
||||
this._setCertificateVerifyProc(verifyProc)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue