Closed
Bug 554307
Opened 14 years ago
Closed 14 years ago
improve nsExtensionManager.js::getRandomFileName
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
VERIFIED
FIXED
mozilla1.9.3a5
People
(Reporter: mak, Assigned: mossop)
References
Details
(Whiteboard: [rewrite])
this sucks: var characters = "abcdefghijklmnopqrstuvwxyz0123456789"; ... please do Math.random().toString(36).substr(2, 3);
Reporter | ||
Comment 1•14 years ago
|
||
better (handles 0 case): Math.random().toString(36).replace(/.*\./, '').substr(-3)
Assignee | ||
Comment 2•14 years ago
|
||
All this code goes away with the rewrite so no need to think about it too much.
Reporter | ||
Comment 3•14 years ago
|
||
no problem, i'm not thinking about extension manager, just that i'm fixing this code in other places, and found it here :)
Assignee | ||
Comment 4•14 years ago
|
||
Actually we need this.
Assignee | ||
Comment 5•14 years ago
|
||
This got fixed as a part of bug 553169
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Comment 6•14 years ago
|
||
Dave, I can't find any result for getRandomFileName. Does it mean this function has been completely removed?
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6) > Dave, I can't find any result for getRandomFileName. Does it mean this function > has been completely removed? I just merged the function into the main code, it is here: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#3625
Comment 8•14 years ago
|
||
Verified fixed based on last comment.
Status: RESOLVED → VERIFIED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•