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.
Over in https://github.com/servo/servo/pull/15120, there's an implementation of
WindowProxy
toWindow
bindings, which updates theWindowProxy
when navigation happens. This requires mutating the reflector, which is a lot easier ifHeap
implements interior mutability.Heap
already has anUnsafeCell
internally, so the only change is thatHeap::set
takes a&self
rather than a&mut self
.This change is