Closed Bug 1577744 Opened 5 years ago Closed 5 years ago

WeakMapBase::getDelegate returns the original key if there is no delegate

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

I think getDelegate should return nullptr if there is no delegate, but it returns the original key at the moment. This means we may be doing more work than necessary. Most callers check for a null return value.

Oh right, I think I did this better in the still-unlanded stack for incremental weak marking. Thanks.

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/445b8539779a
Make getDelegate() return null for WeakMap keys that are not cross compartment wrappers r=sfink
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: