Comment on attachment 118755
patch (add many comments)
close! Just a few nits:
+ ReadSystemPref((const char*)aData);
you can't just cast from const PRUnichaR* to const char* - to catch errors like
this you should always use C++ style static_cast - in our codebase it is
NS_STATIC_CAST(const char*, aData) - the compiler would tell you that this is
an illegal cast.
Instead, you need to convert it from Unicode to ASCII:
Comment on attachment 118755
patch (add many comments)
close! Just a few nits: (const char*)aData);
+ ReadSystemPref(
you can't just cast from const PRUnichaR* to const char* - to catch errors like CAST(const char*, aData) - the compiler would tell you that this is
this you should always use C++ style static_cast - in our codebase it is
NS_STATIC_
an illegal cast.
Instead, you need to convert it from Unicode to ASCII:
ReadSystemPref( NS_LossyConvert UCS2toASCII( aData). get())
+ nsresult GetAtomForMozKe y(const char *aMozKey, PRUint32 *aAtom) \
+ {return GetAtom(aMozKey, 0, aAtom); }
+ const char *GetMozKey(PRUint32 aAtom) \
+ {return GetKey(aAtom, 0); }
+
again, please dump the "\" at the end of these lines - you just don't need
them, and they will muck up the indenting in some editors
I'm almost done with this review, so hold off another day before I get through
this.