mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
Browser: Don't spawn RequestServer and WebSocket in multi-process mode
Single-process Browser forces a connection to these services early on, to avoid having to unveil their paths. I'm suspicious of the benefits of this (and the comment about it wasn't even accurate) but let's keep it for now. In multi-process mode, there's no need to do this, and in fact it was causing us to spawn two extra totally unused processes.
This commit is contained in:
parent
3ed5a73ede
commit
5fd65adb19
2 changed files with 14 additions and 10 deletions
|
@ -646,13 +646,15 @@ void Tab::update_bookmark_button(const String& url)
|
|||
|
||||
void Tab::did_become_active()
|
||||
{
|
||||
Web::ResourceLoader::the().on_load_counter_change = [this] {
|
||||
if (Web::ResourceLoader::the().pending_loads() == 0) {
|
||||
m_statusbar->set_text("");
|
||||
return;
|
||||
}
|
||||
m_statusbar->set_text(String::formatted("Loading ({} pending resources...)", Web::ResourceLoader::the().pending_loads()));
|
||||
};
|
||||
if (m_type == Type::InProcessWebView) {
|
||||
Web::ResourceLoader::the().on_load_counter_change = [this] {
|
||||
if (Web::ResourceLoader::the().pending_loads() == 0) {
|
||||
m_statusbar->set_text("");
|
||||
return;
|
||||
}
|
||||
m_statusbar->set_text(String::formatted("Loading ({} pending resources...)", Web::ResourceLoader::the().pending_loads()));
|
||||
};
|
||||
}
|
||||
|
||||
BookmarksBarWidget::the().on_bookmark_click = [this](auto& url, unsigned modifiers) {
|
||||
if (modifiers & Mod_Ctrl)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue