1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00
serenity/Userland/Libraries/LibCore
Andrew Kaster d253beb2f7 LibCore: Don't leak proto-Resources when loading non-existent paths
The construct `adopt_ref(*new Obj(TRY(get_resource())))` is another
manifestation of a classic anti-pattern. In old C++, you would leak the
object's memory if the argument threw an exception, or if a member
initializer threw an exception. In our case, we leak if the MappedFile
returns an Error. This is pretty concerning, and we should avoid this
pattern at all costs, and try to use the "safer" helpers whenever
possible.
2023-12-13 17:28:07 -05:00
..
Account.cpp AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
Account.h AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
AnonymousBuffer.cpp Userland+Tests: Don't use MAP_FILE when mmap-ing 2023-09-01 19:50:35 +02:00
AnonymousBuffer.h LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr 2023-01-04 11:49:15 +01:00
ArgsParser.cpp LibCore: Implement handler for Vector<String> positional arguments 2023-10-30 10:39:59 +00:00
ArgsParser.h LibCore: Implement handler for Vector<String> positional arguments 2023-10-30 10:39:59 +00:00
CMakeLists.txt LibCore: Add Resource for platform agnostic application resource loading 2023-10-17 11:02:01 -06:00
Command.cpp LibCore: Error on a fail to write in Command::write_lines 2023-07-18 14:48:45 +01:00
Command.h LibCore: Port Command::write_lines to ErrorOr 2023-07-18 14:48:45 +01:00
ConfigFile.cpp AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
ConfigFile.h AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
DateTime.cpp LibCore: Support wildcard-skipping characters in Core::DateTime::parse 2023-11-08 09:28:17 +01:00
DateTime.h LibCore: Change Core::DateTime::parse to accept a StringView 2023-11-08 09:28:17 +01:00
Debounce.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
DeferredInvocationContext.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
Directory.cpp LibCore: Add wrapper for fstatat() 2023-05-28 05:51:27 -06:00
Directory.h LibCore: Add wrapper for fstatat() 2023-05-28 05:51:27 -06:00
DirectoryEntry.cpp LibCore: Ignore non-S_IFMT bits in directory_entry_type_from_stat 2023-12-01 20:46:16 +01:00
DirectoryEntry.h LibCore: Keep the raw inode number value in DirectoryEntry 2023-08-05 18:41:01 +02:00
DirIterator.cpp LibCore: Use DirectoryEntry::from_stat on Haiku 2023-09-17 13:38:12 -06:00
DirIterator.h LibCore+Everywhere: Return an Error from DirIterator::error() 2023-03-05 20:23:42 +01:00
ElapsedTimer.cpp Everywhere: Use MonotonicTime instead of Duration 2023-05-24 23:18:07 +02:00
ElapsedTimer.h Everywhere: Use MonotonicTime instead of Duration 2023-05-24 23:18:07 +02:00
Event.cpp Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
Event.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
EventLoop.cpp Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
EventLoop.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
EventLoopImplementation.cpp LibCore: Move post_event() back to EventLoopImplementation 2023-04-26 19:17:04 +01:00
EventLoopImplementation.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
EventLoopImplementationUnix.cpp LibCore: Only use coarse time in the Unix event loop wait_for_events() 2023-08-07 13:38:20 +02:00
EventLoopImplementationUnix.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
EventReceiver.cpp LibCore: Don't print class_name() from EventReceiver::stop_timer() 2023-09-01 11:19:18 +02:00
EventReceiver.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
File.cpp LibCore: Keep track of file offset to avoid system call for tell() 2023-07-06 21:05:57 +02:00
File.h AK+LibCore: Make output buffered stream seekable 2023-08-12 12:25:26 -06:00
FilePermissionsMask.cpp LibCore: Implement four-digit modes for FilePermissionsMask parsing 2022-07-27 21:45:01 +00:00
FilePermissionsMask.h Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
FileWatcher.h LibCore: Allow subclassing FileWatcher 2023-01-19 11:29:48 +00:00
FileWatcherLinux.cpp LibCore: Simplify Core::Notifier by only allowing one event type 2023-04-25 14:48:40 +02:00
FileWatcherMacOS.mm AK: Rename Time to Duration 2023-05-24 23:18:07 +02:00
FileWatcherSerenity.cpp LibCore: Simplify Core::Notifier by only allowing one event type 2023-04-25 14:48:40 +02:00
FileWatcherUnimplemented.cpp LibCore+ConfigServer: Add FileWatcherFlags to replace InodeWatcherFlags 2023-01-18 09:37:11 -05:00
Forward.h LibCore: Add Resource for platform agnostic application resource loading 2023-10-17 11:02:01 -06:00
GetPassword.cpp LibCore: Propagate errors in SecretString 2023-02-08 19:49:48 +01:00
GetPassword.h LibCore: Use ErrorOr<T> for Core::get_password() 2021-11-08 00:35:27 +01:00
Group.cpp LibCore: Make Group::add_group() unavailable on Haiku 2023-09-17 13:38:12 -06:00
Group.h LibCore: Make Group::add_group() unavailable on Haiku 2023-09-17 13:38:12 -06:00
LocalServer.cpp LibCore: Use accept instead of accept4 on Haiku 2023-09-17 13:38:12 -06:00
LocalServer.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
LockFile.cpp LibCore+Userland: Remove File::ensure_parent_directories 2022-04-11 00:08:48 +02:00
LockFile.h Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
MappedFile.cpp AK: Use an enum to specify the open mode instead of a bool 2023-11-08 18:19:34 +01:00
MappedFile.h AK: Use an enum to specify the open mode instead of a bool 2023-11-08 18:19:34 +01:00
MimeData.cpp LibGfx/ILBMLoader: Add support for PC DeluxePaint files 2023-12-13 10:39:13 +00:00
MimeData.h Userland: Port lists of mime types to String 2023-09-29 14:40:21 +01:00
NetworkJob.cpp LibCore: Don't implement pure virtual methods in NetworkJob 2023-07-03 23:29:28 +02:00
NetworkJob.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
NetworkResponse.h Libraries: Use default constructors/destructors in LibCore 2022-03-10 18:04:26 -08:00
Notifier.cpp Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
Notifier.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
Process.cpp LibCore: Support POSIX file actions in Core::Process::spawn 2023-12-07 10:13:21 -07:00
Process.h LibCore: Support POSIX file actions in Core::Process::spawn 2023-12-07 10:13:21 -07:00
ProcessStatisticsReader.cpp Kernel+LibCore+SystemMonitor: Make thread statistics values 64-bit 2023-06-11 09:26:54 +01:00
ProcessStatisticsReader.h Kernel+LibCore+SystemMonitor: Make thread statistics values 64-bit 2023-06-11 09:26:54 +01:00
Promise.h LibCore: Check if a promise is already resolved in Promise::map() 2023-08-31 11:10:09 +02:00
Proxy.h AK: Serialize URL hosts with 'concept-host-serializer' 2023-07-31 05:18:51 +02:00
Resource.cpp LibCore: Add a Resource method to create a file:// URL from a resource 2023-11-06 09:39:59 +01:00
Resource.h LibCore: Add a Resource method to create a file:// URL from a resource 2023-11-06 09:39:59 +01:00
ResourceImplementation.cpp LibCore: Don't leak proto-Resources when loading non-existent paths 2023-12-13 17:28:07 -05:00
ResourceImplementation.h LibCore: Do not return an Optional from Resource:::filesystem_path 2023-11-06 09:39:59 +01:00
ResourceImplementationFile.cpp LibCore: Do not return an Optional from Resource:::filesystem_path 2023-11-06 09:39:59 +01:00
ResourceImplementationFile.h LibCore: Do not return an Optional from Resource:::filesystem_path 2023-11-06 09:39:59 +01:00
SecretString.cpp LibCore: Propagate errors in SecretString 2023-02-08 19:49:48 +01:00
SecretString.h LibCore: Use AK_MAKE_DEFAULT_MOVABLE to avoid mistakes in default impls 2023-06-18 08:47:51 +01:00
SessionManagement.cpp Kernel+LibCore: Make %sid path parsing not take ages 2023-01-10 19:32:31 +01:00
SessionManagement.h AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
SharedCircularQueue.h LibCore: Remove try_ prefix from fallible SharedCircularQueue methods 2023-01-28 22:41:36 +01:00
Socket.cpp LibCore: Enable receive_fd and send_fd on Haiku 2023-09-17 13:38:12 -06:00
Socket.h Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
SocketAddress.h AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
SOCKSProxyClient.cpp AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
SOCKSProxyClient.h AK: Rename Stream::{read,write} to Stream::{read_some,write_some} 2023-03-13 15:16:20 +00:00
StandardPaths.cpp LibCore: Add standard paths for Haiku 2023-09-17 13:38:12 -06:00
StandardPaths.h LibCore: Add StandardPaths::font_directories() 2023-01-11 20:54:49 +00:00
System.cpp Everywhere: Unport Core::System::current_executable_path from new string 2023-12-07 10:13:21 -07:00
System.h Everywhere: Unport Core::System::current_executable_path from new string 2023-12-07 10:13:21 -07:00
SystemServerTakeover.cpp LibCore: Remove strtol call from parse_sockets_from_system_server 2023-11-04 18:06:30 +01:00
SystemServerTakeover.h LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
TCPServer.cpp LibCore: Use accept instead of accept4 on Haiku 2023-09-17 13:38:12 -06:00
TCPServer.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
ThreadedPromise.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
ThreadEventQueue.cpp Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
ThreadEventQueue.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
Timer.cpp Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
Timer.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
UDPServer.cpp Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
UDPServer.h Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
UmaskScope.h Everywhere: Fix order of includes and #pragma once 2022-09-18 18:30:05 -07:00
Version.cpp LibCore: Add default version for Lagom applications 2023-08-27 19:01:32 -04:00
Version.h LibCore+LibGUI+About: Use String in Core::Version and GUI::AboutDialog 2023-03-03 15:23:47 +01:00