servo / rust-mozjs

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

Allow interior mutability of Heap objects. #328

Closed asajeffrey closed 7 years ago

asajeffrey commented 7 years ago

Over in https://github.com/servo/servo/pull/15120, there's an implementation of WindowProxy to Window bindings, which updates the WindowProxy when navigation happens. This requires mutating the reflector, which is a lot easier if Heap implements interior mutability. Heap already has an UnsafeCell internally, so the only change is that Heap::set takes a &self rather than a &mut self.


This change is Reviewable

asajeffrey commented 7 years ago

r? @jdm

jdm commented 7 years ago

@bors-servo: r+

bors-servo commented 7 years ago

:pushpin: Commit 00956df has been approved by jdm

bors-servo commented 7 years ago

:hourglass: Testing commit 00956df with merge eec73ea...

bors-servo commented 7 years ago

:sunny: Test successful - status-appveyor, status-travis