Closed Bug 1531035 Opened 8 months ago Closed 8 months ago

Null weakmap keys should not be allowed

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

We currently assume weakmap keys are non-null pointers, but we don't check this anywhere.

Patch to make the HashMap base class of WeakMap private and add versions of put() and relookupOrAdd() that check the key is not null.

Attachment #9047067 - Flags: review?(sphink)
Attachment #9047067 - Flags: review?(sphink) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1edf55d690f2
Assert that weak map keys are not null r=sfink
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.