LibWeb: Use JS::MarkedVector while parsing CSS keyframe rules

We need to be sure they are marked in case the GC runs while we're
in the CSS parser.
This commit is contained in:
Andreas Kling 2023-09-04 09:51:00 +02:00
parent bb4eca2037
commit 9577cd853a
Notes: sideshowbarker 2024-07-17 18:38:54 +09:00
3 changed files with 4 additions and 4 deletions

View file

@ -1505,7 +1505,7 @@ CSSRule* Parser::convert_to_rule(NonnullRefPtr<Rule> rule)
auto child_tokens = TokenStream { rule->block()->values() };
Vector<JS::NonnullGCPtr<CSSKeyframeRule>> keyframes;
JS::MarkedVector<JS::NonnullGCPtr<CSSKeyframeRule>> keyframes(m_context.realm().heap());
while (child_tokens.has_next_token()) {
child_tokens.skip_whitespace();
// keyframe-selector = <keyframe-keyword> | <percentage>