From ddff63b2d6c22468cd413c16968558f77fd00bb3 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Fri, 24 May 2019 13:58:13 +0300 Subject: add main thread only cache for nsIAtoms to speed up atomization xpcom/ds add main thread only cache for nsIAtoms to speed up atomization --- xpcom/ds/nsIAtom.idl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xpcom/ds/nsIAtom.idl') diff --git a/xpcom/ds/nsIAtom.idl b/xpcom/ds/nsIAtom.idl index c02540838..6e8602c42 100644 --- a/xpcom/ds/nsIAtom.idl +++ b/xpcom/ds/nsIAtom.idl @@ -119,6 +119,11 @@ extern already_AddRefed NS_Atomize(const char16_t* aUTF16String); */ extern already_AddRefed NS_Atomize(const nsAString& aUTF16String); +/** + * An optimized version of the method above for the main thread. + */ +extern already_AddRefed NS_AtomizeMainThread(const nsAString& aUTF16String); + /** * Return a count of the total number of atoms currently * alive in the system. -- cgit v1.2.3