Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Event to update the rendering swallows all events #1647

Open
shannonbooth opened this issue Oct 6, 2024 · 0 comments
Open

LibWeb: Event to update the rendering swallows all events #1647

shannonbooth opened this issue Oct 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@shannonbooth
Copy link
Contributor

The timer to render

m_paint_refresh_timer->start();

Seems to infinitely grow the number of tasks in the EventLoop, which for the below reproducer will mean that

queue_global_task(Task::Source::NavigationAndTraversal, relevant_global_object(*document), JS::create_heap_function(heap(), [&] {
never ends up running.

Reverting 4a43d0a appears to resolve the problem.

Steps to reproduce:

Apply the hack patch (fixing another timeout issue) of:

diff --git a/Ladybird/Qt/WebContentView.cpp b/Ladybird/Qt/WebContentView.cpp
index 9c0cdb74ed6..bc54686d59b 100644
--- a/Ladybird/Qt/WebContentView.cpp
+++ b/Ladybird/Qt/WebContentView.cpp
@@ -681,7 +681,7 @@ void WebContentView::initialize_client(WebView::ViewImplementation::CreateNewCli

     update_screen_rects();

-    if (auto webdriver_content_ipc_path = WebView::Application::chrome_options().webdriver_content_ipc_path; webdriver_content_ipc_path.has_value())
+    if (auto webdriver_content_ipc_path = WebView::Application::chrome_options().webdriver_content_ipc_path; webdriver_content_ipc_path.has_value() && m_client_state.page_index < 2)
         client().async_connect_to_webdriver(m_client_state.page_index, *webdriver_content_ipc_path);
 }

And run ./Meta/WPT.sh run --log-mach hmm.log url/failure.html

cc @kalenikaliaksandr

kalenikaliaksandr added a commit to kalenikaliaksandr/ladybird that referenced this issue Oct 6, 2024
If, by the time we need to schedule rendering of the next frame, the
previous one is still not processed, we could skip it instead of growing
task queue.

Should help with LadybirdBrowser#1647
kalenikaliaksandr added a commit that referenced this issue Oct 6, 2024
If, by the time we need to schedule rendering of the next frame, the
previous one is still not processed, we could skip it instead of growing
task queue.

Should help with #1647
@AtkinsSJ AtkinsSJ added the bug Something isn't working label Oct 11, 2024
ebanner pushed a commit to ebanner/ladybird that referenced this issue Oct 15, 2024
If, by the time we need to schedule rendering of the next frame, the
previous one is still not processed, we could skip it instead of growing
task queue.

Should help with LadybirdBrowser#1647
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants