Closed Bug 1659472 Opened 4 years ago Closed 4 years ago

Tracing a JS Map/Set key unnecessarily triggers a pre-barrier

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

The TraceKey function constructs a HashableValue on the stack, and that contains a PreBarriered<Value> so we run a pre-barrier in its destructor:

https://searchfox.org/mozilla-central/source/js/src/builtin/MapObject.cpp#462

Ideally this would be reworked to separate out the barrier from HashableValue
but that ended up being more work than expected. This is a small fix to clear
the value and avoid the barrier in this situation.

Assignee: nobody → jcoppeard
Status: NEW → ASSIGNED
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf98d258454a
Avoid pre-barrier when marking JS Map/Set keys r=sfink
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: