Skip to content

Commit 0a1fe25

Browse files
limit cef render processes to 1
1 parent 728425b commit 0a1fe25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

desktop/src/cef/internal/browser_process_app.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ impl<H: CefEventHandler> ImplApp for BrowserProcessAppImpl<H> {
3333

3434
fn on_before_command_line_processing(&self, _process_type: Option<&cef::CefString>, command_line: Option<&mut cef::CommandLine>) {
3535
if let Some(cmd) = command_line {
36+
// Limit renderer processes to 1
37+
cmd.append_switch_with_value(Some(&CefString::from("renderer-process-limit")), Some(&CefString::from("1")));
38+
3639
#[cfg(not(feature = "accelerated_paint"))]
3740
{
3841
// Disable GPU acceleration when accelerated_paint feature is not enabled

0 commit comments

Comments
 (0)