mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-05 01:10:24 +00:00
LibCore: Restore single-shot timer objects manual reset on Windows
The initial IOCP event loop implementation removed the single shot
timer fix added in 0005207 was removed.
Adding this back allowed simple web pages like https://ladybird.org/ to
be loaded again.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
11b8bbeadf
commit
540bbae480
Notes:
github-actions[bot]
2025-11-18 17:50:55 +00:00
Author: https://github.com/ayeteadoe Commit: https://github.com/LadybirdBrowser/ladybird/commit/540bbae4800 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6838 Reviewed-by: https://github.com/R-Goc ✅ Reviewed-by: https://github.com/gmta ✅
@@ -288,9 +288,14 @@ intptr_t EventLoopManagerWindows::register_timer(EventReceiver& object, int mill
|
||||
VERIFY(thread_data);
|
||||
auto& timers = thread_data->timers;
|
||||
|
||||
// FIXME: This is a temporary fix for issue #3641
|
||||
bool manual_reset = static_cast<Timer&>(object).is_single_shot();
|
||||
HANDLE timer = CreateWaitableTimer(NULL, manual_reset, NULL);
|
||||
VERIFY(timer);
|
||||
|
||||
auto timer_data = make<EventLoopTimer>();
|
||||
timer_data->type = CompletionType::Timer;
|
||||
timer_data->timer.handle = CreateWaitableTimer(NULL, FALSE, NULL);
|
||||
timer_data->timer.handle = timer;
|
||||
timer_data->owner = object.make_weak_ptr();
|
||||
timer_data->is_periodic = should_reload;
|
||||
VERIFY(timer_data->timer.handle);
|
||||
|
||||
Reference in New Issue
Block a user