-
Notifications
You must be signed in to change notification settings - Fork 68
AFFINITY_GLOBAL_CHECK
Anthony Trummer edited this page Jan 6, 2022
·
7 revisions
When specified, renderers with the same affinity will run in the same renderer process.
Note that when reusing the renderer process, certain webPreferences
properties will also be shared between the web pages even when their values are different. This can lead to unexpected security configuration overrides.
Improper use of the affinity
property can cause the unwanted sharing of webPreferences
options.
It is suggested to use exact same webPreferences
for web pages with the same affinity. Look for all occurrences of the affinity
attribute and compare their values:
<webview src="https://doyensec.com" webpreferences="affinity=secPrefs"></webview>
firstWin = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
affinity: "secPrefs"
}
})
secondWin = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: false,
affinity: "secPrefs"
}
})