Closed
Bug 465809
Opened 16 years ago
Closed 6 years ago
Mochitest should have some easy way to call garbage/cycle collector
Categories
(Testing :: Mochitest, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: smaug, Unassigned)
Details
We have something like netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils) .garbageCollect(); in many mochitests. Would be nice to have that as a helper method, so that tests could just call SimpleTest.gc() or similar.
Comment 1•16 years ago
|
||
What's wrong with that? I find that actually easier to use than SimpleTest.gc(), which could mean anything.
Comment 2•16 years ago
|
||
> What's wrong with that?
It's impossible to remember, so takes longer to write tests.
I'm happy to have SimpleTest.garbageCollect() if gc() is seen as too obscure, I guess. But having to remember the QI/GetI mess is just not called for. And "GC" is the usual term for garbage collection..
Comment 3•16 years ago
|
||
Sorry, gc() is fine by me, I might remember this function when I need it. I guess I was more 'complaining' about synthesizeKey as I never could remember the arguments it needs (in which case I just would use the relevant xpcom fuctions).
Comment 4•6 years ago
|
||
Mass closing mochitest bugs that haven't had activity in the past 5 years. Please re-open or file a new bug with modern context if this is still relevant.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Comment 5•6 years ago
|
||
Nowadays test do SpecialPowers.DOMWindowUtils.garbageCollect(). Not awesome, but better than what we used to have.
You need to log in
before you can comment on or make changes to this bug.
Description
•