Closed Bug 592064 Opened 15 years ago Closed 9 years ago

gc() in browser reftests no longer gcs

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 669949

People

(Reporter: luke, Assigned: gwagner)

Details

Attachments

(1 file, 1 obsolete file)

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.
If this is guaranteed to run in browser, there are ways of triggering gc via xpconnect there...
Assignee: general → anygregor
Yeah that code is just ludicrous.
Anyone know if this got fixed during all the recent changes?
Attached patch patch (obsolete) — Splinter Review
No it's not fixed!
Attached patch patchSplinter Review
Attachment #521400 - Attachment is obsolete: true
Attachment #521535 - Flags: review?(bzbarsky)
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.
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?
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 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-
It seems fake GC function already caused some damage because I see some random orange during the jstestbrowser with this patch.
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.

Attachment

General

Created:
Updated:
Size: