Closed Bug 624640 Opened 14 years ago Closed 13 years ago

Browser-based gczeal is a trap for the unwary

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Waldo, Assigned: Waldo)

References

(Depends on 1 open bug)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

It changes GC zeal for all time, not until the next test occurs.  This is bad.  It's not at all what I would have expected, and it caused a change I made to produce inexplicable tinderbox timeouts, at least until I debugged this.  Nobody should have to make this mistake.
Attachment #502730 - Flags: review?(bclary)
Future-luke thanks you.
Attachment #502730 - Flags: review?(bclary) → review+
http://hg.mozilla.org/tracemonkey/rev/e272d471f4c4

Existing tests will continue to reset gczeal, don't think that needs to be fixed now (or indeed ever, actually, but we might still want to do it so people learning by example don't think entirely wrongly).
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/e272d471f4c4
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
fyi, with this change it is no longer possible to run the full suite under gczeal 2.
Hm, point; that's not ideal.  We could sample gczeal at test start, then restore to that original value at test end.  And perhaps we should change the current imperative mode of gczealing to something functional that could restore the original zeal, not just clear to 0 -- withZeal(2, callback) -- although I'm less certain about whether this or something else would be preferable.  Mind filing the followup to do this?
Depends on: 628310
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: