Skip to content

Truly independent web browser

LibWeb: Root the contiguous text nodes of Text.wholeText

Shannon Booth36d573d53b83
diff --git a/Libraries/LibWeb/DOM/Text.cpp b/Libraries/LibWeb/DOM/Text.cpp
index 7c4d9a84ecf..8d05311d6fb 100644
--- a/Libraries/LibWeb/DOM/Text.cpp
+++ b/Libraries/LibWeb/DOM/Text.cpp
@@ -152,7 +152,7 @@ Utf16String Text::whole_text()
// https://dom.spec.whatwg.org/#contiguous-text-nodes
// The contiguous Text nodes of a node node are node, node’s previous sibling Text node, if any, and its contiguous
// Text nodes, and node’s next sibling Text node, if any, and its contiguous Text nodes, avoiding any duplicates.
- Vector<Text*> nodes;
+ GC::RootVector<Text*> nodes;
nodes.append(this);