Closed Bug 1339770 Opened 8 years ago Closed 8 years ago

Add test code for weak map gray marking behaviour

Categories

(Core :: JavaScript: GC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(2 files)

Here's a patch to add test code for weak map gray marking behaviour. The rules are: - a value is marked black if both the map and the key are black - a value is marked gray if both the map and key are marked, but either or both are gray - a key is marked black if it has a black delegate and the map is black - a key is marked gray if both the map and delegate are marked, but either or both are gray
Attachment #8837546 - Flags: review?(sphink)
This is probably a bit paranoid, but check that we unmark gray CCWs when we look them up in different situations.
Attachment #8837564 - Flags: review?(sphink)
One thing that might be nice would be some kind of generic template with the bits of weak map logic that we could reuse rather than having at least 3 copies of the logic scattered around.
Comment on attachment 8837546 [details] [diff] [review] test-weakmap-gray-marking Review of attachment 8837546 [details] [diff] [review]: ----------------------------------------------------------------- That's very straightforward and nice.
Attachment #8837546 - Flags: review?(sphink) → review+
Attachment #8837564 - Flags: review?(sphink) → review+
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/208a7d1895d7 Add jsapi tests for weak map gray marking r=sfink https://hg.mozilla.org/integration/mozilla-inbound/rev/9c921aea9d8e Add tests for gray marking of CCWs r=sfink
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: