Open Bug 994799 Opened 12 years ago Updated 2 years ago

Require PersistentRooted objects give a name for their root

Categories

(Core :: JavaScript: GC, enhancement, P5)

24 Branch
enhancement

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

PersistentRooted is a really great interface for rooting stuff, but it would be nice if it stored a name along with it for GC log purposes. Hopefully there aren't so many of these that it makes a difference for memory usage. I'll try to throw a prototype together.
This seems to work. People may object to the very boilerplatey named argument. Another nasty problem is that when you create a persistent rooted with a nullptr as the second argument, that ends up in the case where the name pointer is null, and you end up in a null deref whenever you try to mark it. I had to fix a number of these. It would be nice if that was a compile error. But anyways, this seems to work.
Looks good!
Depends on: 993413
Assignee: continuation → nobody
Severity: normal → S3
Blocks: GC.easeofuse
Severity: S3 → N/A
Type: defect → enhancement
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: