Closed Bug 938211 Opened 6 years ago Closed 6 years ago

GenerationalGC: Heap<T> does not supply copy assignment operator

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: jonco, Assigned: jonco)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

There's no copy assignment operator defined for Heap<T>, so the compiler generates a default.  The result is that assignment between Heap<T>s doesn't call postbarriers.

Here's a patch to add this.  While I as at it, I added explicit copy assignment operators for TenuredHeap<T> and FakeRooted<T>, disallowed copy assignment of InternalHandle<T> and FakeMutableHandle<T>, and added an explicit copy constructor for InternalHandle<T>.
OS: Mac OS X → All
Hardware: x86 → All
Attachment #831608 - Flags: review?(sphink)
Comment on attachment 831608 [details] [diff] [review]
fix-heap-assignment

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

If it all still compiles, looks good to me!
Attachment #831608 - Flags: review?(sphink) → review+
https://hg.mozilla.org/mozilla-central/rev/4c64028c5ff7
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.