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
Timothy Flynn
911ea2b379
LibCore: Ensure we don't replace an already-installed event loop manager
...
Once an event loop manager is installed, we want to be sure we only use
that manager in the current process going forward. Mixing event loop
implementations can only cause problems.
More to the point, this ensures that we have installed the AppKit or Qt
event loop managers before the first time EventLoopManager::the() is
invoked. Now that we defer this installation until we know whether we
are running headlessly, we want to be extra sure that we have done so
before any services using the event loop have started.
2025-06-13 17:06:16 +02:00
Ali Mohammad Pur
59b6293182
LibCore: Add a Promise::after(promises) API
...
This is equivalent to Promise.all() in js, more or less.
2025-06-11 18:16:29 +02:00
R-Goc
6c8623320f
LibCore: Implement chdir on Windows
...
This commit adds a wrapper around chdir in LibCore.
Co-authored-by: Andrew Kaster <andrew@ladybird.org>
2025-06-05 22:00:55 -06:00
Rocco Corsi
9281baffd8
LibCore: Recognize filenames .shellrc and CMakeLists.txt as text
...
There was a missing comma in the array, so these two entries were
concatenated accidentally.
2025-05-26 14:23:43 -06:00
blukai
4b3691ff39
LibCore+LibGfx: Move font_directories from LibCore to LibGfx
...
the goal is to rely on fontconfig for font directory resolution. it
doesn't seem like it would be appropritate to call to fontconfig funcs
from within the LibCore.
i'm not 100% confident that FontDatabase is the correct place.. seems
okay?
2025-05-26 12:14:29 -06:00
Andrew Kaster
087cbf2b0a
LibCore: Expose Unix socket fd transfer limit publicly
2025-05-24 19:15:06 +03:00