Bug 1411893 - Introduce nsStaticAtom. r=emilio,froydnj.
It's a sub-class of nsAtom, useful for cases where you know you are dealing exclusively with static atoms. The nice thing about it is that you can use raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.) MozReview-Commit-ID: 4Q6QHX5h44V
This commit is contained in:
@@ -50,7 +50,7 @@ nsHtml5AtomTable::GetAtom(const nsAString& aKey)
|
||||
return cachedAtom;
|
||||
}
|
||||
|
||||
nsAtom* atom = NS_GetStaticAtom(aKey);
|
||||
nsStaticAtom* atom = NS_GetStaticAtom(aKey);
|
||||
if (atom) {
|
||||
mRecentlyUsedParserAtoms[index] = atom;
|
||||
return atom;
|
||||
|
||||
Reference in New Issue
Block a user