ladybird/Libraries/LibCore
Aliaksandr Kalenik de3f32a5c9 LibCore: Make timer firing order stable for equal deadlines
Timers scheduled with identical `fire_time` could fire out of order
because the heap is not stable. This change assigns a monotonically
increasing `sequence_id` when a timer is scheduled and extend the heap
comparator to order by (`fire_time`, `sequence_id`). This guarantees
FIFO among timers with the same deadline.

This matches the HTML "run steps after a timeout" ordering requirement:
older invocations with <= delay complete before newer ones.
https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#run-steps-after-a-timeout
2025-09-22 12:34:32 +01:00
..
Platform
AnonymousBuffer.cpp LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
AnonymousBuffer.h LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
AnonymousBufferWindows.cpp LibCore: Consistently treat file descriptors as handles on Windows 2025-02-05 19:27:47 -07:00
ArgsParser.cpp LibCore+LibJS+LibWasm: Always use a real format string 2025-04-08 20:00:18 -04:00
ArgsParser.h
CMakeLists.txt LibCore: Remove Command 2025-08-17 16:44:14 -04:00
ConfigFile.cpp Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
ConfigFile.h
DateTime.cpp LibCore: Remove DateTime::to_string() and to_byte_string() 2025-06-19 18:42:45 -06:00
DateTime.h LibCore: Remove DateTime::to_string() and to_byte_string() 2025-06-19 18:42:45 -06:00
DeferredInvocationContext.h
Directory.cpp AK+LibCore: Avoid double-negation of syscall error values 2025-05-10 21:19:46 -04:00
Directory.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
DirectoryEntry.cpp
DirectoryEntry.h
DirIterator.cpp
DirIterator.h
ElapsedTimer.cpp
ElapsedTimer.h LibCore: Remove deprecated ElapsedTimer::elapsed() 2024-11-23 19:20:03 +01:00
Environment.cpp LibCore+Meta: Workaround some symbols not being exported on FreeBSD 2025-07-15 13:44:54 -06:00
Environment.h
Event.h LibCore: Remove unused CustomEvent 2025-08-11 16:55:25 +02:00
EventLoop.cpp LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoop.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopExecutor.swift LibCore: Add swift bindings for EventLoop as an Executor and Actor 2025-03-15 21:51:22 -06:00
EventLoopImplementation.cpp LibCore: Ensure we don't replace an already-installed event loop manager 2025-06-13 17:06:16 +02:00
EventLoopImplementation.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopImplementationUnix.cpp LibCore: Make timer firing order stable for equal deadlines 2025-09-22 12:34:32 +01:00
EventLoopImplementationUnix.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopImplementationWindows.cpp LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventLoopImplementationWindows.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
EventReceiver.cpp LibCore: Remove unused CustomEvent 2025-08-11 16:55:25 +02:00
EventReceiver.h LibCore: Remove macro-generated EventReceiver::try_create(...) factories 2025-08-11 16:55:25 +02:00
EventSwift.h LibCore: Add swift bindings for EventLoop as an Executor and Actor 2025-03-15 21:51:22 -06:00
EventSwift.mm Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
File.cpp Everywhere: Fix typos - act III 2025-06-16 14:20:48 +01:00
File.h LibCore+LibIPC: Remove badge on File::leak_fd 2025-06-14 16:03:26 -04:00
FileWatcher.h Everywhere: Include HashMap only where it's actually used 2024-12-09 12:31:16 +01:00
FileWatcherLinux.cpp LibCore: Remove macro-generated EventReceiver::try_create(...) factories 2025-08-11 16:55:25 +02:00
FileWatcherMacOS.mm LibCore: Remove macro-generated EventReceiver::try_create(...) factories 2025-08-11 16:55:25 +02:00
FileWatcherUnimplemented.cpp
Forward.h LibCore: Remove unused "visible for timer purposes" concept 2025-08-11 16:55:25 +02:00
IOSurface.cpp
IOSurface.h
LocalServer.cpp LibCore: Remove unused LocalServer constructor parameter 2025-08-11 16:55:25 +02:00
LocalServer.h LibCore: Remove unused LocalServer constructor parameter 2025-08-11 16:55:25 +02:00
LocalServerWindows.cpp LibCore: Remove unused LocalServer constructor parameter 2025-08-11 16:55:25 +02:00
MachPort.cpp
MachPort.h
MappedFile.cpp LibCore+LibIPC: Remove badge on File::leak_fd 2025-06-14 16:03:26 -04:00
MappedFile.h Everywhere: Slap some [[clang::lifetimebound]] where appropriate 2025-09-01 11:11:38 +02:00
MimeData.cpp LibCore: Add AVIF to registered types in MimeData 2025-08-22 08:03:28 -04:00
MimeData.h
NetworkResponse.h
Notifier.cpp LibCore: Stop parenting notifiers 2025-08-11 16:55:25 +02:00
Notifier.h LibCore: Stop parenting notifiers 2025-08-11 16:55:25 +02:00
Process.cpp Everywhere: Fix a few unreachable-return / unreachable-break warnings 2025-09-12 14:33:14 +01:00
Process.h LibCore: Implement System::current_executable_path on Windows 2025-03-19 20:25:24 -06:00
ProcessWindows.cpp AK+LibJS+LibWeb+LibRegex: Replace AK::Utf16Data with AK::Utf16String 2025-07-18 12:45:38 -04:00
Promise.h LibCore: Don't have Promise inherit from EventReceiver 2025-08-11 16:55:25 +02:00
Proxy.h LibCore+LibIPC: Move various encode/decode specializations to LibIPC 2025-06-14 16:03:26 -04:00
Resource.cpp
Resource.h
ResourceImplementation.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementation.h
ResourceImplementationFile.cpp LibCore: Add S_ISDIR, S_ISREG to System.h on Windows 2025-02-12 18:42:05 -07:00
ResourceImplementationFile.h
SharedCircularQueue.h LibCore: Atomically ref-count SharedSingleProducerCircularQueue guts 2025-05-24 06:52:25 -06:00
Socket.cpp Tests/LibCore: Enable TestLibCoreStream in Windows CI 2025-08-06 20:24:38 -06:00
Socket.h Tests/LibCore: Enable TestLibCoreStream in Windows CI 2025-08-06 20:24:38 -06:00
SocketAddress.h AK+Meta+LibCore+Tests: Remove unused SipHash implementation 2025-04-06 01:47:50 +02:00
SocketAddressWindows.h LibCore: Add Windows implementation of TCPSocket::connect 2025-06-23 18:58:01 -06:00
SocketpairWindows.cpp LibCore: Implement System::socketpair on Windows 2025-02-14 09:38:59 -07:00
SocketWindows.cpp LibCore: Fix WSAEMSGSIZE error in pending_bytes with proper zero-init 2025-08-23 18:35:45 -06:00
StandardPaths.cpp test-web: Allow help command to succeed 2025-08-23 16:04:36 -06:00
StandardPaths.h LibCore+LibGfx: Move font_directories from LibCore to LibGfx 2025-05-26 12:14:29 -06:00
System.cpp LibCore: Always reset the polled revents field back to 0 2025-07-07 15:53:15 -06:00
System.h LibCore: Implement SIGTERM-based kill() on Windows 2025-09-15 09:19:52 +02:00
SystemServerTakeover.cpp LibCore: Port SystemServerTakeover.cpp to Windows 2025-02-06 15:25:14 -07:00
SystemServerTakeover.h
SystemWindows.cpp LibCore: Implement SIGTERM-based kill() on Windows 2025-09-15 09:19:52 +02:00
TCPServer.cpp LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
TCPServer.h LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
TCPServerWindows.cpp LibCore: Remove unused TCPServer constructor parameter 2025-08-11 16:55:25 +02:00
ThreadedPromise.h LibCore: Remove unused ThreadedPromise constructor 2025-08-11 16:55:25 +02:00
ThreadEventQueue.cpp
ThreadEventQueue.h
Timer.cpp LibCore: Remove unused Timer APIs for constructing with a parent 2025-08-11 16:55:25 +02:00
Timer.h LibCore: Remove unused Timer APIs for constructing with a parent 2025-08-11 16:55:25 +02:00
TimeZoneWatcher.h
TimeZoneWatcherLinux.cpp
TimeZoneWatcherMacOS.mm
TimeZoneWatcherUnimplemented.cpp
UDPServer.cpp LibCore: Remove unused UDPServer constructor parameter 2025-08-11 16:55:25 +02:00
UDPServer.h LibCore: Remove unused UDPServer constructor parameter 2025-08-11 16:55:25 +02:00
UDPServerWindows.cpp LibCore: Remove unused UDPServer constructor parameter 2025-08-11 16:55:25 +02:00
Version.cpp LibCore: Remove LADYBIRD_GIT_VERSION environment variable usage 2025-05-15 14:02:48 +02:00
Version.h LibCore: Remove ErrorOr return type from read_long_version_string 2025-02-13 08:27:02 -05:00