add main thread only cache for nsIAtoms to speed up atomization xpcom/ds

add main thread only cache for nsIAtoms to speed up atomization
This commit is contained in:
win7-7 2019-05-24 13:58:13 +03:00 • committed by Roy Tam
commit 6f55b09688
2 changed files with 57 additions and 2 deletions

View file

@ -119,6 +119,11 @@ extern already_AddRefed<nsIAtom> NS_Atomize(const char16_t* aUTF16String);
*/
extern already_AddRefed<nsIAtom> NS_Atomize(const nsAString& aUTF16String);
/**
* An optimized version of the method above for the main thread.
*/
extern already_AddRefed<nsIAtom> NS_AtomizeMainThread(const nsAString& aUTF16String);
/**
* Return a count of the total number of atoms currently
* alive in the system.