Age | Commit message (Collapse) | Author |
|
All of these files were getting ByteBuffer.h from someone else and then
using it. Let's include it explicitly.
|
|
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.
Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.
In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
|
|
|
|
|
|
This makes the forked process capable of constructing a new event loop,
should it choose to.
|
|
This allows safer asynchronous handling of signals. Signals are
dispatched with highest priority.
|
|
If a notifier has disabled read/write notifications via its event mask,
we should not spam it with events, even if they have a hook callback.
|
|
This allows signal handlers to request the loop to terminate.
|
|
- Parsing invalid JSON no longer asserts
Instead of asserting when coming across malformed JSON,
JsonParser::parse now returns an Optional<JsonValue>.
- Disallow trailing commas in JSON objects and arrays
- No longer parse 'undefined', as that is a purely JS thing
- No longer allow non-whitespace after anything consumed by the initial
parse() call. Examples of things that were valid and no longer are:
- undefineddfz
- {"foo": 1}abcd
- [1,2,3]4
- JsonObject.for_each_member now iterates in original insertion order
|
|
|
|
We have a hierarchical filesystem, let's make use of it :^)
|
|
Now that the Shell uses Core::EventLoop, we can't afford to just crash if /tmp
is unwritable.
|
|
This fixes an issue where continuously posting new events to the queue
would keep the event loop saturated, causing it to ignore notifiers.
Since notifiers are part of the big select(), we always have to call
wait_for_events() even if there are pending events. We're already smart
enough to select() without a timeout if we already have pending events.
|
|
The previous code did not account for the case when there are timers present,
but none are enabled, and used a zero polling timeout.
Fixes https://github.com/SerenityOS/serenity/issues/2222
|
|
Clang complains about this; with the change the next commit is going
to make to ASSERT() internals, GCC is going to start to complain as well.
|
|
The event that triggered the exit from an inner event loop would always
get re-delivered in the outer event loop due to a silly off-by-one
mistake when transferring pending events between loops.
|
|
|
|
The ID allocator is destroyed before a timer in HackStudio is
is unregistered leading to an access violation.
Fixes #1382.
|
|
Use this instead of uintptr_t throughout the codebase. This makes it
possible to pass a FlatPtr to something that has u32 and u64 overloads.
|
|
|
|
Add a SetInspectedObject call that tells us which Core::Object a remote
client is currently looking it. Objects get notified when they gain
their first inspector, and when they lose their last one.
|
|
|
|
This matches what we already do for string types.
|
|
|
|
This patch adds <LibCore/Forward.h> and uses it in various places to
shrink the header dependency graph.
|
|
|
|
|