mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb: Forbid reentrancy of style-layout-repaint in EventLoop::process
Fixes crashing on https://playbiolab.com/ in VERIFY(page.client().is_ready_to_paint()) caused by attempting to start the next repaint before the ongoing repaint is done.
This commit is contained in:
parent
5faca4f027
commit
f341af1d72
Notes:
github-actions[bot]
2024-09-30 06:11:51 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: f341af1d72
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1565
Reviewed-by: https://github.com/awesomekling ✅
2 changed files with 13 additions and 0 deletions
|
@ -177,6 +177,17 @@ void EventLoop::process()
|
|||
// 8. Microtasks: Perform a microtask checkpoint.
|
||||
perform_a_microtask_checkpoint();
|
||||
|
||||
if (m_is_running_reflow_steps) {
|
||||
// NOTE: If we entered style-layout-repaint steps, then we need to wait for them to finish before doing next iteration.
|
||||
schedule();
|
||||
return;
|
||||
}
|
||||
|
||||
m_is_running_reflow_steps = true;
|
||||
ScopeGuard const guard = [this] {
|
||||
m_is_running_reflow_steps = false;
|
||||
};
|
||||
|
||||
// 9. Let hasARenderingOpportunity be false.
|
||||
[[maybe_unused]] bool has_a_rendering_opportunity = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue