1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 08:35:08 +00:00
serenity/Meta/Lagom/Tools/CodeGenerators
DexesTTP 2ab8d474c6 Lagom: Fix leaks in the IDL Wrapper generator
By using RefPtrs to handle interfaces, the IDL parser could store cyclic
references to interfaces that import each other. One main example is the
"EventTarget.idl" and the "AbortSignal.idl" files, which both reference
each other. This caused huge amounts of memory not to be freed on exit.

To fix this, the parsed IDL interfaces are now stored in a HashTable of
NonnullOwnPtr<Interface>, which serves as the sole reference for every
parsed interface. All other usages of the Interface are changed to use
references instead of RefPtrs, or occasionally as raw pointers where
references don't fit inside the data structures.

This new HashTable is static, and as such will automatically be freed
prior to exiting the generator. This ensures that the code generator
properly cleans up after itself.

With this change, The IDL code generators can properly run on Lagom when
compiled with the -DENABLE_ADDRESS_SANITIZER=ON flag, and gets compiled
properly on the CI :^)
2022-05-25 22:25:09 +01:00
..
IPCCompiler Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibEDID Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LibTimeZone LibCore+Everywhere: Make Core::Stream read_line() return StringView 2022-04-16 13:27:51 -04:00
LibUnicode LibCore+Everywhere: Make Core::Stream read_line() return StringView 2022-04-16 13:27:51 -04:00
LibWeb Lagom: Fix leaks in the IDL Wrapper generator 2022-05-25 22:25:09 +01:00
StateMachineGenerator Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CMakeLists.txt Meta+LibEDID: Download and generate the PNP ID database 2022-01-23 22:45:21 +00:00