remove ses.setCertificateVerifyProc() deprecation

This commit is contained in:
Shelley Vohr 2018-05-23 09:47:14 -07:00
parent 22fed0c798
commit fb4a8e9cb9
No known key found for this signature in database
GPG key ID: F13993A75599653C
2 changed files with 8 additions and 43 deletions

View file

@ -16,30 +16,6 @@ let optionsB = {webPreferences: {enableBlinkFeatures: ''}}
let windowB = new BrowserWindow(optionsB) 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 ## Node Headers URL
This is the URL specified as `disturl` in a `.npmrc` file or as the `--dist-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 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) # Planned Breaking API Changes (4.0)
The following list includes the APIs that will be removed in Electron 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() app.releaseSingleInstance()
// Replace with // Replace with
app.releaseSingleInstanceLock() 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

View file

@ -22,16 +22,5 @@ Session.prototype._init = function () {
} }
Session.prototype.setCertificateVerifyProc = function (verifyProc) { Session.prototype.setCertificateVerifyProc = function (verifyProc) {
if (verifyProc != null && verifyProc.length > 2) { this._setCertificateVerifyProc(verifyProc)
// 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)
}
} }