mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
The `RecordedNodeValue` struct contains a `GC::Ref` to a DOM node, which might disappear as a result of a garbage collection. For example, during the "outdent" command, we record nodes, split the parent of those nodes potentially resulting in all kinds of DOM changes, and then try to restore the nodes' values. This caused a crash in the `editing/run/outdent.html` WPT subtests. By returning a `ConservativeVector`, we make sure the `GC::Ref` gets marked during sweeps and nodes do not suddenly disappear.
222 KiB
222 KiB