Last Comment Bug 742179 - Move MakeRandomString to xpcom/ds
: Move MakeRandomString to xpcom/ds
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: Doug Turner (:dougt)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-03 21:17 PDT by Doug Turner (:dougt)
Modified: 2012-05-04 11:43 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v.1 (6.32 KB, patch)
2012-04-03 21:22 PDT, Doug Turner (:dougt)
benjamin: review+
Details | Diff | Splinter Review

Description Doug Turner (:dougt) 2012-04-03 21:17:55 PDT
http://mxr.mozilla.org/mozilla-central/ident?i=MakeRandomString

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
Comment 1 Doug Turner (:dougt) 2012-04-03 21:22:12 PDT
Created attachment 612098 [details] [diff] [review]
patch v.1
Comment 2 Benjamin Smedberg [:bsmedberg] 2012-04-05 09:00:17 PDT
Comment on attachment 612098 [details] [diff] [review]
patch v.1

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.
Comment 3 Daniel Holbert [:dholbert] 2012-04-05 10:58:45 PDT
This landed as https://hg.mozilla.org/integration/mozilla-inbound/rev/118c07dc56f9
...but it caused windows build bustage:
https://tbpl.mozilla.org/php/getParsedLog.php?id=10670071&tree=Mozilla-Inbound
{
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
Comment 4 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-04-05 11:00:13 PDT
Uses of NSPR in xpcom/glue need ifdefs for standalone glue.
Comment 5 :Ms2ger (⌚ UTC+1/+2) 2012-04-06 04:20:38 PDT
And #include "nsCRTGlue.h" instead of #include "nsCRT.h"
Comment 7 Ed Morley [:emorley] 2012-05-04 11:43:19 PDT
https://hg.mozilla.org/mozilla-central/rev/b46d76d90cc0

Note You need to log in before you can comment on or make changes to this bug.