Closed emilio closed 6 years ago
r? @jdm
@bors-servo r+
:pushpin: Commit fbef376 has been approved by jdm
:hourglass: Testing commit fbef3765199e95e68b92094a20e458ad34d8f479 with merge 8736791cf46cdf07b0c85356b7a66ddde694e4bd...
:sunny: Test successful - status-appveyor, status-travis Approved by: jdm Pushing 8736791cf46cdf07b0c85356b7a66ddde694e4bd to master...
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.This change is