-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Open
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
18.0.1 x64
What operating system are you using?
Windows
Operating System Version
win7 sp1 x64
What arch are you using?
x64
Last Known Working Electron version
4.2
Expected Behavior
since user_data_dir is not multi-instance safe
and per the intent expressed here:
#22772 (comment)
#22772 (review)
if the defaultSession is not needed by the app (when it uses a memory or persisted partition) the defaultSession should not be created, but more importantly persisted (which makes the app multi-instance unsafe)
Actual Behavior
the defaultSession is always created and persisted
run the following app
'use strict';
const {app, BrowserWindow, session} = require('electron'),
path = require('path');
let win;
app.setPath('userData', path.join(__dirname, `user_data_${process.versions.chrome.split('.')[0]}`));
app.once('ready', () => {
win = new BrowserWindow({
webPreferences: {
partition: 'memory_partition_1',
},
});
});
the user_data dir is filled with the persisted defaultSession not used by the app
Testcase Gist URL
No response
Additional Information
No response