1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00
serenity/Userland/Libraries
Linus Groh cbbf4abb0d LibJS: Add a way to get from a GlobalObject to its associated Realm
This is just another workaround, but it should be much more reliable
than Interpreter::realm(), especially when allocating NativeFunctions
and ECMAScriptFunctionObjects: we're guaranteed to have a GlobalObject
at that point, and it likely was set as the GlobalObject of a Realm and
can lead us back to it. We're however not guaranteed that the VM can
give us an Interpreter, which is why functions in LibWeb can be a bit
crashy at the moment.

We use a WeakPtr<Realm> to properly handle the unlikely case where the
Realm goes away after associating a GlobalObject to it.

We'll always need _something_ of this sort if we want to support
OrdinaryFunctionCreate and CreateBuiltinFunction without the explicit
realm argument while no JS is running, because they want to use the
current Realm Record (always in the first and as fallback in the second
case).
2021-10-14 23:02:19 +01:00
..
LibArchive Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibAudio Audio: Add per-client volume 2021-09-12 23:38:57 +02:00
LibC LibC: Use the new pread syscall to implement pread 2021-10-13 16:10:50 +02:00
LibCards LibGfx: Use "try_" prefix for static factory functions 2021-07-21 18:02:15 +02:00
LibChess LibChess: Fix hashing of the chess board 2021-07-30 20:49:18 +02:00
LibCompress LibCompress: Add missing header to DeflateTables.h 2021-10-06 23:52:40 +01:00
LibConfig ConfigServer+LibConfig: Add way for clients to listen for config changes 2021-08-26 23:41:38 +02:00
LibCore LibCore: Display the correct allocation size in the debug line 2021-10-09 23:30:12 +02:00
LibCoredump LibCoredump: Don't copy uncompressed coredumps into a ByteBuffer 2021-09-22 00:40:07 +02:00
LibCpp LibCpp: Remove redundant comparison to Token::Type::PipePipe 2021-09-28 10:58:09 +02:00
LibCrypt Everywhere: Use my cool new @serenityos.org email address 2021-09-01 11:37:25 +04:30
LibCrypto LibCrypto: Add missing header to EMSA_PSS.h 2021-10-06 23:52:40 +01:00
LibDebug LibDebug: Add missing break in AddressRanges::for_each_range() 2021-09-28 18:05:42 +02:00
LibDesktop Userland: Use Core::Process::spawn() instead of posix_spawn() in places 2021-08-06 01:06:42 +02:00
LibDiff LibDiff: Coalesce adjacent changes into the same Hunk 2021-09-24 14:32:52 +02:00
LibDl Toolchain+Userland: Enable TLS for x86_64 2021-07-04 01:07:28 +02:00
LibDSP LibDSP: Remove unused Effects::Delay::m_old_delay_size member 2021-09-28 10:58:09 +02:00
LibELF LibELF: Use member initialization for AuxiliaryVector::optional_string 2021-10-10 13:48:04 +02:00
LibFileSystemAccessClient LibFileSystemAccessClient: Convert request paths to absolute if needed 2021-09-10 20:46:50 +04:30
LibGemini LibHTTP+LibGemini: Set underlying sockets as idle when detaching 2021-10-04 15:31:26 +02:00
LibGfx LibGfx: Implement copy-assign for Matrix 2021-10-10 21:03:27 +01:00
LibGL Libraries: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
LibGUI Libraries: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
LibHTTP LibHTTP: Quit the read loop when an incomplete chunk size line is seen 2021-10-10 00:27:44 +02:00
LibImageDecoderClient Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibIMAP LibIMAP: Remove unused Variant option 2021-09-21 04:22:52 +04:30
LibIPC LibIPC: Use default instead of an empty constructor/destructor 2021-09-16 17:17:13 +02:00
LibJS LibJS: Add a way to get from a GlobalObject to its associated Realm 2021-10-14 23:02:19 +01:00
LibKeyboard AK: Make Utf8View constructors inline and remove C string constructor 2021-09-18 19:54:24 +02:00
LibLine Libraries: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
LibM Libraries: Fix typos 2021-10-01 01:06:40 +01:00
LibMarkdown LibMarkdown: Implement introspection of the document tree 2021-10-10 15:18:55 -07:00
LibPCIDB Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
LibPDF LibPDF: Rely on default-constructor of Variant 2021-09-21 04:22:52 +04:30
LibProtocol RequestServer+LibProtocol: Add an 'EnsureConnection' IPC endpoint 2021-09-28 22:32:31 +02:00
LibPthread LibPthread: Correct nonsensical loop exit condition in RWLock unlock 2021-09-28 12:34:51 +03:30
LibRegex LibRegex: Transform 0,1 min/unbounded max repetitions to * or + 2021-10-09 15:57:05 +02:00
LibSanitizer LibSanitizer+AK: Add float cast overflow handler 2021-08-08 10:55:36 +02:00
LibSQL Libraries: Fix -Wunreachable-code warnings from clang 2021-10-08 23:33:46 +02:00
LibSymbolication LibSymbolication+SystemMonitor: Show ELF object in stack 2021-09-30 00:51:08 +02:00
LibSyntax LibSyntax: Add missing headers to HighlighterClient.h 2021-10-06 23:52:40 +01:00
LibSystem Kernel+LibSystem: Add a 4th syscall argument 2021-07-25 14:08:50 +02:00
LibTest LibJS: Convert Object::get() to ThrowCompletionOr 2021-10-03 20:14:03 +01:00
LibTextCodec LibTextCodec: Ignore BYTE ORDER MARK at the start of utf8/16 strings 2021-09-15 17:00:18 +02:00
LibThreading LibThreading: Add missing headers to Mutex.h 2021-10-06 23:52:40 +01:00
LibTLS LibTLS: Remove useless ByteBuffer allocation in TLSv12::read_line() 2021-10-10 00:27:44 +02:00
LibUnicode LibUnicode: Generate standalone compile-time array for combining class 2021-10-10 13:49:37 +02:00
LibUSBDB LibUSBDB: Fix vendor id decoding 2021-06-18 19:41:25 +04:30
LibVideo Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
LibVT LibVT: Add missing headers 2021-10-06 23:52:40 +01:00
LibWasm LibWasm: Add missing forward declaration to Printer/Printer.h 2021-10-06 23:52:40 +01:00
LibWeb LibWeb: Implement position:fixed painting at the stacking context level 2021-10-14 23:50:33 +02:00
LibWebSocket LibWebSocket: Add missing headers to Message.h 2021-10-06 23:52:40 +01:00
LibX86 LibX86: Use default instead of an empty constructor/destructor 2021-09-16 17:17:13 +02:00
CMakeLists.txt Libraries: Add LibDSP 2021-08-31 17:03:55 +04:30