Skip to content

Truly independent web browser

LibWeb: Use raw GC pointers where nothing visits the holder

Tim Ledbettere4c6e3e70d6f
diff --git a/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h b/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h
index 34e5a973e7c..7e135d112cd 100644
--- a/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h
+++ b/Libraries/LibWeb/HTML/Scripting/SimilarOriginWindowAgent.h
@@ -52,7 +52,7 @@ struct SimilarOriginWindowAgent : public Agent {
// https://html.spec.whatwg.org/multipage/custom-elements.html#active-custom-element-constructor-map
// Each similar-origin window agent has an associated active custom element constructor map, which is a map of
// constructors to CustomElementRegistry objects.
- HashMap<GC::Ref<JS::FunctionObject>, GC::Root<CustomElementRegistry>> active_custom_element_constructor_map;
+ HashMap<GC::RawRef<JS::FunctionObject>, GC::Root<CustomElementRegistry>> active_custom_element_constructor_map;
private:
SimilarOriginWindowAgent(CanBlock);
diff --git a/Libraries/LibWeb/XML/XMLDocumentBuilder.h b/Libraries/LibWeb/XML/XMLDocumentBuilder.h
index ca087577354..91001d57bf6 100644
--- a/Libraries/LibWeb/XML/XMLDocumentBuilder.h
+++ b/Libraries/LibWeb/XML/XMLDocumentBuilder.h
@@ -48,9 +48,9 @@ private:
Optional<Utf16FlyString> namespace_for_name(Utf16FlyString const&);
- GC::Ref<DOM::Document> m_document;
+ GC::RawRef<DOM::Document> m_document;
GC::RootVector<GC::Ref<DOM::Node>> m_template_node_stack;
- GC::Ptr<DOM::Node> m_current_node;
+ GC::RawPtr<DOM::Node> m_current_node;
XMLScriptingSupport m_scripting_support { XMLScriptingSupport::Enabled };
bool m_has_error { false };
Utf16StringBuilder m_text_builder;