This function and its associated table is used in two places. I am considering also using it for a very similar purpose. I'd like to move it into xpcom/ds - probably nsCRT
Created attachment 612098 [details] [diff] [review]
Comment on attachment 612098 [details] [diff] [review]
Please make this NS_GetRandomString and put it in nsCRTGlue.h/cpp instead of nsCRT which is supposed to be going away. r=me with that change.
This landed as https://hg.mozilla.org/integration/mozilla-inbound/rev/118c07dc56f9
...but it caused windows build bustage:
error LNK2019: unresolved external symbol __imp_PR_Now referenced in function "void __cdecl NS_MakeRandomString(char *,int)" (?NS_MakeRandomString@@YAXPEADH@Z)
...so I backed it out as https://hg.mozilla.org/integration/mozilla-inbound/rev/290dd1ca19b6
Uses of NSPR in xpcom/glue need ifdefs for standalone glue.
And #include "nsCRTGlue.h" instead of #include "nsCRT.h"