rename blinkFeatures to enableBlinkFeatures

This commit is contained in:
Shelley Vohr 2018-05-23 14:01:34 -07:00
parent bc10be3de6
commit 5f5322c64e
No known key found for this signature in database
GPG key ID: F13993A75599653C
9 changed files with 19 additions and 47 deletions

View file

@ -229,23 +229,23 @@ module.exports = {
},
/**
* #10 on the checklist: Do not use blinkFeatures
* #10 on the checklist: Do not use enableBlinkFeatures
*
* Logs a warning message about blinkFeatures
* Logs a warning message about enableBlinkFeatures
*/
warnAboutBlinkFeatures: () => {
warnAboutEnableBlinkFeatures: () => {
const webPreferences = getWebPreferences()
if (!webPreferences || !webPreferences.blinkFeatures ||
(webPreferences.blinkFeatures.length && webPreferences.blinkFeatures.length === 0)) {
if (!webPreferences || !webPreferences.enableBlinkFeatures ||
(webPreferences.enableBlinkFeatures.length && webPreferences.enableBlinkFeatures.length === 0)) {
return
}
let warning = 'This renderer process has additional "blinkFeatures" ' +
let warning = 'This renderer process has additional "enableBlinkFeatures" ' +
'enabled. This exposes users of this app to some security risk. ' +
'If you do not need this feature, you should disable it.\n' +
moreInformation
console.warn('%cElectron Security Warning (blinkFeatures)',
console.warn('%cElectron Security Warning (enableBlinkFeatures)',
'font-weight: bold;', warning)
},