servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Add safe Heap::boxed constructor #395

Closed Xanewok closed 6 years ago

Xanewok commented 6 years ago

While this doesn't remove old Heap constructor (#343), it adds a new boxed function along with some additional explanation while this may be preferred until a better/different solution comes up to construct a Heap value directly with an appropriate value set, in a safe manner.

This made my work (which I'll upload later) on typed arrays, and also indirectly for objects, in webidl unions safer and more convenient, so I think it's a good addition.

r? @jdm


This change is Reviewable

jdm commented 6 years ago

I agree. This is a useful API to provide. @bors-servo r+

bors-servo commented 6 years ago

:pushpin: Commit 540cb09 has been approved by jdm

bors-servo commented 6 years ago

:hourglass: Testing commit 540cb09578fb0b8bb1ffffa61101dec8149692ba with merge d72d7d20eaea6346bd2e5e57bfdea64c36e6d102...

bors-servo commented 6 years ago

:sunny: Test successful - status-appveyor, status-travis Approved by: jdm Pushing d72d7d20eaea6346bd2e5e57bfdea64c36e6d102 to master...