rust-mozjs
8736791c - Auto merge of #408 - servo:cells, r=jdm

Commit
8 years ago
Auto merge of #408 - servo:cells, r=jdm typedarray: Use a Cell for handling interior mutability. The typed array wrapper has a "computed" option that uses to cache its data. That means that you need a mutable reference to the typed array in order to read it, which is not great. In particular, it's plain impossible when the typed array is provided as a member of a struct via WebIDL. Use a `Cell` and expose to_vec and as_slice in non-mutable references. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/408) <!-- Reviewable:end -->
Author
bors-servo
Loading