mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Bug 1430951 - Avoid element name atomizing to improve performance of LookupCustomElementDefinition
Since we are dealing with the element (nodeInfo->LocalName() and NameAtom() are the same value), we could use nodeInfo->NameAtom() instead. Tag UXP Issue #1344
This commit is contained in:
parent
2cdd48f819
commit
57da7a1935
7 changed files with 16 additions and 11 deletions
|
|
@ -243,12 +243,11 @@ CustomElementRegistry::~CustomElementRegistry()
|
|||
}
|
||||
|
||||
CustomElementDefinition*
|
||||
CustomElementRegistry::LookupCustomElementDefinition(const nsAString& aLocalName,
|
||||
CustomElementRegistry::LookupCustomElementDefinition(nsIAtom* aNameAtom,
|
||||
nsIAtom* aTypeAtom) const
|
||||
{
|
||||
nsCOMPtr<nsIAtom> localNameAtom = NS_Atomize(aLocalName);
|
||||
CustomElementDefinition* data = mCustomDefinitions.GetWeak(aTypeAtom);
|
||||
if (data && data->mLocalName == localNameAtom) {
|
||||
if (data && data->mLocalName == aNameAtom) {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue