summaryrefslogtreecommitdiff
path: root/Libraries/LibCore/EventLoop.cpp
AgeCommit message (Collapse)Author
2020-06-13AK: JsonParser improvementsMatthew Olsson
- 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
2020-06-02LibCore: Put some annoying debug spam behind EVENTLOOP_DEBUGAndreas Kling
2020-05-29LibCore+Inspector: Move RPC sockets to /tmp/rpcSergey Bugaev
We have a hierarchical filesystem, let's make use of it :^)
2020-05-29LibCore: Do not assert that we can start the RPC serverSergey Bugaev
Now that the Shell uses Core::EventLoop, we can't afford to just crash if /tmp is unwritable.
2020-05-16LibCore: Always wait_for_events() when pumping the event loopAndreas Kling
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.
2020-05-15LibCore: Fix timer expiration processingSergey Bugaev
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
2020-04-30LibCore: Do not assert that NonnullRefPtr is non-nullSergey Bugaev
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.
2020-04-03LibCore: Don't replay last handled event when leaving nested event loopAndreas Kling
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.
2020-03-19LibCore: Use monotonic time when handling timersLiav A
2020-03-10EventLoop: Don't destroy ID allocator (#1403)Alex Muscar
The ID allocator is destroyed before a timer in HackStudio is is unregistered leading to an access violation. Fixes #1382.
2020-03-08AK: Add global FlatPtr typedef. It's u32 or u64, based on sizeof(void*)Andreas Kling
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.
2020-03-05LibCore: Add a way to set an individual Core::Object property remotelyAndreas Kling
2020-03-05LibCore: Allow RPC clients to specify the currently inspected objectAndreas Kling
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.
2020-02-25AK: Make Vector use size_t for its size and capacityAndreas Kling
2020-02-20AK: Use size_t for ByteBuffer sizesAndreas Kling
This matches what we already do for string types.
2020-02-15LibCore: Reduce header dependencies of EventLoopAndreas Kling
2020-02-14LibCore: Add a forward declaration headerAndreas Kling
This patch adds <LibCore/Forward.h> and uses it in various places to shrink the header dependency graph.
2020-02-06LibCore: Merge the CSyscallUtils namespace into CoreAndreas Kling
2020-02-06LibCore: Remove leading C from filenamesAndreas Kling