Closed
Bug 592064
Opened 15 years ago
Closed 9 years ago
gc() in browser reftests no longer gcs
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 669949
People
(Reporter: luke, Assigned: gwagner)
Details
Attachments
(1 file, 1 obsolete file)
662 bytes,
patch
|
gal
:
review-
|
Details | Diff | Splinter Review |
js/src/tests/browser.js defines
function gc()
{
// Thanks to igor.bukanov@gmail.com
for (var i = 0; i != 4e6; ++i)
{
var tmp = i + 0.1;
}
}
which won't gc (fatvals), but will make js reftests in the browser go slower than they need to. I'm don't really know about the gc-in-the-browser story, so I'm not sure what the fix is.
![]() |
||
Comment 1•15 years ago
|
||
If this is guaranteed to run in browser, there are ways of triggering gc via xpconnect there...
Updated•15 years ago
|
Assignee: general → anygregor
Comment 2•15 years ago
|
||
Yeah that code is just ludicrous.
![]() |
Reporter | |
Comment 3•14 years ago
|
||
Anyone know if this got fixed during all the recent changes?
Assignee | ||
Comment 4•14 years ago
|
||
No it's not fixed!
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #521400 -
Attachment is obsolete: true
Attachment #521535 -
Flags: review?(bzbarsky)
![]() |
||
Comment 6•14 years ago
|
||
Comment on attachment 521535 [details] [diff] [review]
patch
So two things.
1) We're trying to get rid of enablePrivilege. Is this running in a window where you could use the stuff in bug 643803 to trigger gc (and cc, actually) via nsIDOMWindowUtils.garbageCollect?
2) The fact that parts of this file carefully avoid assuming there's a "netscape" and so forth worries me. You should probably ask Bob Clary for a review here too.
![]() |
||
Comment 7•14 years ago
|
||
Hmm. Looks like no SpecialPowers in reftest yet.... Ted, is the path of least resistance here taking the patch as-is and then fixing it in the mass "fix the places that call forceGC" change?
Comment 8•14 years ago
|
||
So, there's not currently any effort to fix reftests, since reftests aren't supposed to be able to use enablePrivilege. This is in jstestbrowser, right? I didn't know there were consumers there, but if you can convince dbaron that we ought to have SpecialPowers for the reftest harness, then we can fix it as part of the SpecialPowers rewrite.
Comment 9•14 years ago
|
||
Comment on attachment 521535 [details] [diff] [review]
patch
no more enable privilege in new code, we need something else here (thanks for working on this though!)
Attachment #521535 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 10•14 years ago
|
||
It seems fake GC function already caused some damage because I see some random orange during the jstestbrowser with this patch.
Comment 11•9 years ago
|
||
Fixed in bug 669949 and later updated in bug 911573.
https://hg.mozilla.org/mozilla-central/rev/e31bbb9dbc92
https://hg.mozilla.org/mozilla-central/rev/d1737d0cb675
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•