Closed Bug 1216744 Opened 4 years ago Closed 4 years ago

Move weakKeys table to the zone

Categories

(Core :: JavaScript: GC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44

People

(Reporter: sfink, Assigned: sfink)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The weak keys table (the table mapping all not-yet-live weakmap keys to their entries) should really be on the zone. Filing this as a separate bug without the patch first, because I'm also working on bzexport.
Moves GCMarker.weakKeys -> Zone.gcWeakkeys.

I'm going to take a look at changing the way GCMarker clears the weak keys tables before requesting review. I may or may not change anything.
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Attachment #8676523 - Flags: review?(terrence)
Comment on attachment 8676523 [details] [diff] [review]
Move weakKeys to the zone

Review of attachment 8676523 [details] [diff] [review]:
-----------------------------------------------------------------

That is indeed surprisingly clean!

::: js/src/gc/Marking.h
@@ -136,5 @@
>  
>      size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const;
>  };
>  
> -class WeakMapBase;

Thanks, I've boggled at this more than once!

::: js/src/jsgc.cpp
@@ -4995,5 @@
> -            bool found;
> -            marker.weakKeys.remove(key, &found);
> -            MOZ_ASSERT(found);
> -        }
> -    }

Nice!
Attachment #8676523 - Flags: review?(terrence) → review+
This landed yesterday - https://hg.mozilla.org/mozilla-central/rev/b3a42d2881e5
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.