Ali Mohammad Pur
4462348916
Everywhere: Slap some [[clang::lifetimebound]] where appropriate
...
This first pass only applies to the following two cases:
- Public functions returning a view type into an object they own
- Public ctors storing a view type
This catches a grand total of one (1) issue, which is fixed in
the previous commit.
2025-09-01 11:11:38 +02:00
Luke Wilde
b17783bb10
Everywhere: Change west consts caught by clang-format-21 to east consts
2025-08-29 18:18:55 +01:00
ayeteadoe
ff71efebb6
LibCore: Fix WSAEMSGSIZE error in pending_bytes with proper zero-init
...
In SocketWindows, the return value for the ioctl call was not
initialized to zero. This was causing test_udp in TesDNSResolver
to fail as UDPSocket::read_some() was incorrectly failing with
WSAEMSGSIZE due the result of pending_bytes being some
unspecified default value for an uninitialized unsigned long
2025-08-23 18:35:45 -06:00
ayeteadoe
84690f432e
test-web: Allow help command to succeed
...
These are required for test-web runtime to actually work
2025-08-23 16:04:36 -06:00
zac
b8f95a091c
LibCore: Add AVIF to registered types in MimeData
2025-08-22 08:03:28 -04:00
Jelle Raaijmakers
bc7658d3d3
LibCore: Don't send SIGTRAP when debugger attaches
...
Both gdb and lldb interrupt execution after attaching to the process, so
no need to send a SIGTRAP immediately after which would require typing
`continue` in the debugger twice.
2025-08-19 06:24:57 -04:00
Jelle Raaijmakers
afda3aba14
LibCore: Remove Command
...
This went unused.
2025-08-17 16:44:14 -04:00
Andreas Kling
bd7599ccfc
LibCore: Remove macro-generated EventReceiver::try_create(...) factories
...
We can just use the infallible factory everywhere instead.
2025-08-11 16:55:25 +02:00
Andreas Kling
aec1f6aa7e
LibCore: Remove unused CustomEvent
2025-08-11 16:55:25 +02:00
Andreas Kling
c47e253c60
LibCore: Remove unused "visible for timer purposes" concept
...
This was a long-unused leftover from SerenityOS.
2025-08-11 16:55:25 +02:00
Andreas Kling
0037df88d5
LibCore: Remove unused ChildEvent
2025-08-11 16:55:25 +02:00
Andreas Kling
75091016d7
LibCore: Remove parent/child concept from EventReceiver
...
This ownership model is no longer used.
2025-08-11 16:55:25 +02:00
Andreas Kling
134fd8e413
LibCore: Don't have Promise inherit from EventReceiver
...
This was only used for parenting promises to each other, but we can do
that with a simple vector of children.
2025-08-11 16:55:25 +02:00
Andreas Kling
b8357bc190
LibCore: Remove unused LocalServer constructor parameter
2025-08-11 16:55:25 +02:00
Andreas Kling
cfcb63239d
LibCore: Remove unused ThreadedPromise constructor
2025-08-11 16:55:25 +02:00
Andreas Kling
fa8592b4a9
LibCore: Remove unused UDPServer constructor parameter
2025-08-11 16:55:25 +02:00
Andreas Kling
036aa43a41
LibCore: Remove unused TCPServer constructor parameter
2025-08-11 16:55:25 +02:00
Andreas Kling
d13884e933
LibCore: Remove unused Timer APIs for constructing with a parent
2025-08-11 16:55:25 +02:00
Andreas Kling
4d285d6dce
LibCore: Remove an unused Promise constructor
2025-08-11 16:55:25 +02:00
Andreas Kling
ecf0395c27
LibCore: Stop parenting notifiers
...
There's no need to participate in the ancient EventReceiver parent/child
ownership scheme here. Notifiers are already owned by RefPtrs anyway.
2025-08-11 16:55:25 +02:00
Andreas Kling
34709cc796
LibCore: Remove unused "name" concept from EventReceiver
2025-08-11 16:55:25 +02:00
ayeteadoe
688d0ada97
Tests/LibCore: Enable TestLibCoreStream in Windows CI
2025-08-06 20:24:38 -06:00
ayeteadoe
e01a95f6cd
LibCore: Implement UDPSocket::connect() on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
ba15348d56
LibCore: Implement PosixSocketHelper::pending_bytes() on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
4d68d28e16
LibCore: Implement PosixSocketHelper::set_receive_timeout() on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
79594279da
LibCore: Make TCPServer::set_blocking() unsupported on Windows
...
Winsock2 doesn't seem to support blocking sockets, or at least
not in the naiive way.
2025-08-06 20:24:38 -06:00
ayeteadoe
d236e1a509
LibCore: Implement LocalServer on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
6e7565766d
LibCore: Implement LocalSocket::connect() on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
904f736b95
LibCore: Implement UDPServer on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
cc3cabc768
LibCore: Implement TCPServer on Windows
2025-08-06 20:24:38 -06:00
ayeteadoe
9d7971c111
Tests/LibCore: Enable several tests in Windows CI
...
These are the set of tests that were already building and passing
with little to no modifications required.
2025-08-06 20:24:38 -06:00
Luke Wilde
31faf31f6a
LibCore: Unmark timer interval being dirty after applying new interval
...
Previously it was never unmarked, so the timer would constantly stop
and start, which made the timer jittery especially at small intervals.
2025-07-26 10:09:12 -04:00
Timothy Flynn
9582895759
AK+LibJS+LibWeb+LibRegex: Replace AK::Utf16Data with AK::Utf16String
2025-07-18 12:45:38 -04:00
Undefine
2aa8c950ca
LibCore+Meta: Workaround some symbols not being exported on FreeBSD
...
On FreeBSD some symbols like `environ` or `__progname` are not exported
anywhere and are filled in by the dynamic loader. `environ` is
a special case because we make use of it explicitly so we need to mark
it a weak symbol so the linker doesn't complain.
2025-07-15 13:44:54 -06:00
Jelle Raaijmakers
4c88c7445c
LibCore: Remove EventReceiver's event filter
...
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This went unused.
2025-07-14 11:54:57 +01:00
Timothy Flynn
af671f58ed
LibCore: Revert change to simplify tracking of notifers and poll structs
...
The issue with that refactor was that the same fd can be used in more
than one notifier. This reverts us back to using 2 members to track the
notifiers in play.
2025-07-08 13:53:27 +01:00
Timothy Flynn
a9f7579738
LibCore: Awaken read notifiers when we receive POLLHUP events
...
POLLHUP is set when the remote end of the monitored fd is closed. There
may still be some buffered data to read from the socket, however. Some
systems do not set POLLIN in these cases. So we should just always try
to read from fds when we receive this event.
2025-07-07 15:53:15 -06:00
Timothy Flynn
f46b721c57
LibCore: Always reset the polled revents
field back to 0
...
One benefit of using `poll` over `select` is that we can re-use the poll
structure list. But there's no guarantee that the underlying system will
reset the `revents` field back to 0. So let's explicitly do so.
2025-07-07 15:53:15 -06:00
Timothy Flynn
0499d216b8
LibCore: Simplify tracking of notifiers and poll structures
...
We don't need 2 vectors and a hash map to track these structures. We can
store the poll structures in a list and just track notifiers by the fd.
2025-07-07 15:53:15 -06:00
ayeteadoe
25f5936dee
CMake: Rename serenity_* helper functions/macros to ladybird_*
2025-07-03 23:19:41 +02:00
Timothy Flynn
86b1c78c1a
AK+Everywhere: Prepare Utf16View for integration with a UTF-16 string
...
To prepare for an upcoming Utf16String, this migrates Utf16View to store
its data as a char16_t. Most function definitions are moved inline and
made constexpr.
This also adds a UDL to construct a Utf16View from a string literal:
auto string = u"hello"sv;
This let's us remove the NTTP Utf16View constructor, as we have found
that such constructors bloat binary size quite a bit.
2025-07-03 09:51:56 -04:00
Rocco Corsi
cdb623b663
LibCore: Remove .xht from common_extensions in MimeType text/html
...
Extension .xht was part of common_extensions for two MimeType Array
entries: application/xhtml+xml and text/html. Should only be part of
one.
2025-06-25 18:49:43 -06:00
Ali Mohammad Pur
e47b1cc1a2
LibCore: Accept any Promise<T> in Promise::after()
2025-06-25 08:20:40 +02:00
stasoid
6be0816172
LibCore: Add Windows implementation of TCPSocket::connect
2025-06-23 18:58:01 -06:00
stasoid
c14e6473d6
LibCore: Add Windows impl of System::socket, getaddrinfo, connect
2025-06-23 18:58:01 -06:00
Tomasz Strejczek
7278a17e87
LibCore: Remove DateTime::to_string() and to_byte_string()
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-06-19 18:42:45 -06:00
stasoid
75b0e9a199
LibCore: Fix race condition in PosixSocketHelper::read on Windows
...
CancelIo introduces a race condition: if data arrives between calls to
WSARecv and CancelIo it will be lost.
See also: https://vstinner.github.io/asyncio-proactor-wsarecv-cancellation-data-loss.html
2025-06-17 20:56:32 +02:00
Viktor Szépe
19f88f96dc
Everywhere: Fix typos - act III
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
2025-06-16 14:20:48 +01:00
rmg-x
a4d931d14a
LibCore+LibIPC: Move various encode/decode specializations to LibIPC
...
This removes a dependency on LibIPC from LibCore.
2025-06-14 16:03:26 -04:00
rmg-x
18f28f398b
LibCore+LibIPC: Remove badge on File::leak_fd
...
This removes a dependency on LibIPC from LibCore.
2025-06-14 16:03:26 -04:00