mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibWebView: Disable site isolation and spare processes when debugging
These features make it difficult to debug a single WebContent instance.
This commit is contained in:
parent
0efd1729af
commit
0a5f68eba6
Notes:
github-actions[bot]
2025-03-14 17:54:50 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/0a5f68eba6c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3936 Reviewed-by: https://github.com/gmta ✅
1 changed files with 8 additions and 0 deletions
|
@ -145,6 +145,10 @@ void Application::initialize(Main::Arguments const& arguments, URL::URL new_tab_
|
|||
if (profile_process.has_value())
|
||||
profile_process_type = process_type_from_name(*profile_process);
|
||||
|
||||
// Disable site isolation when debugging WebContent. Otherwise, the process swap may interfere with the gdb session.
|
||||
if (debug_process_type == ProcessType::WebContent)
|
||||
disable_site_isolation = true;
|
||||
|
||||
m_chrome_options = {
|
||||
.urls = sanitize_urls(raw_urls, new_tab_page_url),
|
||||
.raw_urls = move(raw_urls),
|
||||
|
@ -220,6 +224,10 @@ ErrorOr<NonnullRefPtr<WebContentClient>> Application::launch_web_content_process
|
|||
|
||||
void Application::launch_spare_web_content_process()
|
||||
{
|
||||
// Disable spare processes when debugging WebContent. Otherwise, it breaks running `gdb attach -p $(pidof WebContent)`.
|
||||
if (chrome_options().debug_helper_process == ProcessType::WebContent)
|
||||
return;
|
||||
|
||||
if (m_has_queued_task_to_launch_spare_web_content_process)
|
||||
return;
|
||||
m_has_queued_task_to_launch_spare_web_content_process = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue