mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Issue #2678 - Make QIing to a few often-used CCed classes faster.
QIing to CC interfaces is a hot path for a few widely-used classes. Presumably there are many of these objects being created and destroyed. By making these classes check first for the CC interfaces directly, rather than going up the inheritance chain, the resulting overhead is reduced.
This commit is contained in:
parent
33140a9b1b
commit
85f8f23a23
2 changed files with 12 additions and 5 deletions
|
|
@ -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<JSObject*> aGivenProto)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue