1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators/LibWeb
Andreas Kling 68452c749a LibWeb: Prevent GC from running during intrinsics allocation
Due to the way we lazily construct prototypes and constructors for web
platform interfaces, it's possible for nested GC allocation to occur
while GC objects have been allocated but not fully constructed.

If the garbage collector ends up running in this state, it may attempt
to call JS::Cell::visit_edges() on an object whose vtable pointer hasn't
been set up yet.

This patch works around the issue by deferring GC while intrinsics are
being brought up. Furthermore, we also create a dummy global object for
the internal realm, and populate it with intrinsics. This works around
the same issue happening when allocating something (like the default UA
stylesheets) in the internal realm.

These solutions are pretty hacky and sad, so I've left FIXMEs about
finding a nicer way.
2022-10-20 15:16:23 +02:00
..
BindingsGenerator LibWeb: Add support for DOM::Document to XHR::send() 2022-10-16 02:06:29 +03:30
CMakeLists.txt LibWeb: Add new code generator for creating exposed interface helpers 2022-10-09 10:14:57 +02:00
GenerateCSSEnums.cpp LibWeb: Assign an underlying type to generated CSS enums 2022-04-14 14:54:06 +02:00
GenerateCSSMediaFeatureID.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
GenerateCSSPropertyID.cpp LibWeb+Meta: Parse the backdrop-filter CSS property 2022-09-16 10:50:48 +01:00
GenerateCSSTransformFunctions.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
GenerateCSSValueID.cpp Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00
GenerateWindowOrWorkerInterfaces.cpp LibWeb: Prevent GC from running during intrinsics allocation 2022-10-20 15:16:23 +02:00
GeneratorUtil.h Everywhere: Add sv suffix to strings relying on StringView(char const*) 2022-07-12 23:11:35 +02:00