diff --git a/xpcom/ds/nsAtomTable.cpp b/xpcom/ds/nsAtomTable.cpp index b37ae4091ca2..47ee91d4e181 100644 --- a/xpcom/ds/nsAtomTable.cpp +++ b/xpcom/ds/nsAtomTable.cpp @@ -169,7 +169,8 @@ NS_COM nsIAtom* NS_NewAtom( const nsAReadableString& aString ) (PLHashComparator)CompareKeys, (PLHashComparator)0, 0, 0); - const PRUnichar *str = nsPromiseFlatString(aString).get(); + nsPromiseFlatString flat(aString); + const PRUnichar *str = flat.get(); PRUint32 hashCode = HashKey(str);