diff --git a/dom/base/nsStyledElement.cpp b/dom/base/nsStyledElement.cpp index 607926a484..4fd423acc7 100644 --- a/dom/base/nsStyledElement.cpp +++ b/dom/base/nsStyledElement.cpp @@ -25,9 +25,11 @@ using namespace mozilla; using namespace mozilla::dom; -NS_IMPL_QUERY_INTERFACE_INHERITED(nsStyledElement, - nsStyledElementBase, - nsStyledElement) +// Using the CC variant of this, even though this class does not define +// a new CC participant, to make QIing to the CC interfaces faster. +NS_IMPL_QUERY_INTERFACE_CYCLE_COLLECTION_INHERITED(nsStyledElement, + nsStyledElementBase, + nsStyledElement) //---------------------------------------------------------------------- // nsIContent methods diff --git a/dom/base/nsTextNode.cpp b/dom/base/nsTextNode.cpp index 3fd45f4668..b91c9e5571 100644 --- a/dom/base/nsTextNode.cpp +++ b/dom/base/nsTextNode.cpp @@ -97,8 +97,13 @@ nsTextNode::~nsTextNode() { } -NS_IMPL_ISUPPORTS_INHERITED(nsTextNode, nsGenericDOMDataNode, nsIDOMNode, - nsIDOMText, nsIDOMCharacterData) +// Using the CC variant of this, even though this class does not define +// a new CC participant, to make QIing to the CC interfaces faster. +NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(nsTextNode, + nsGenericDOMDataNode, + nsIDOMNode, + nsIDOMText, + nsIDOMCharacterData) JSObject* nsTextNode::WrapNode(JSContext *aCx, JS::Handle aGivenProto)