Closed Bug 1258314 Opened 4 years ago Closed 4 years ago

Consider adding TraceNullableEdge, like TraceNullableRoot

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 files)

Currently TraceEdge when called with a HeapPtr<T> expects its argument to be non-null.  We often trace pointers that may be null, so a TraceNullableEdge would be useful.

(Also, the versions of TraceEdge called from the browser allow tracing null pointers - maybe these should be renamed for clarity?)
Add TraceNullableEdge API.
Assignee: nobody → jcoppeard
Attachment #8733404 - Flags: review?(terrence)
Convert existing conditional uses of TraceEdge to TraceNullableEdge.
Attachment #8733405 - Flags: review?(terrence)
Comment on attachment 8733404 [details] [diff] [review]
bug1258314-trace-nullable-edge

Review of attachment 8733404 [details] [diff] [review]:
-----------------------------------------------------------------

Yeah, I've been meaning to add this.
Attachment #8733404 - Flags: review?(terrence) → review+
Comment on attachment 8733405 [details] [diff] [review]
bug1258314-use-trace-nullable-edge

Review of attachment 8733405 [details] [diff] [review]:
-----------------------------------------------------------------

Wow, I had no idea that that would be such a huge cleanup. I run into places where it would help now and then, but stacking them all up together it's such an obvious win.
Attachment #8733405 - Flags: review?(terrence) → review+
https://hg.mozilla.org/mozilla-central/rev/f4b0e2f230e8
https://hg.mozilla.org/mozilla-central/rev/9f7c4f40087a
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.