Closed Bug 1536106 Opened 5 years ago Closed 5 years ago

GCPolicy<JS::Heap<>> and GCPolicy<js::HeapPtr<>> should support null pointers

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

Currently GCPolicy<JS::Heap<>> and GCPolicy<js::HeapPtr<>> call TraceEdge() but they should call TraceNullableEdge() so that they support null pointers properly.

Actually it looks like only GCPolicy<js::HeapPtr<>> is affected - it calls js::TraceEdge() which does not have a null check. In contrast, GCPolicy<JS::Heap<>> calls JS::TraceEdge(), which does contain a null check. (Namespaces FTW!)

Since js::TraceEdge does not handle null edges, use
js::TraceNullableEdge instead.

Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1f4a7dc7cfe6
Allow nullable edges in HeapPtr<>. r=jonco
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: