Repository navigation
WebIDL: use FLoat32Array - #30990
WebIDL: use FLoat32Array #30990
Conversation
d9cdf47 to
24b18d1
Compare
|
@jdm Here is a prototype(that compiles), could you please tell me what you think? |
jdm
left a comment
There was a problem hiding this comment.
The actual AudioBuffer code feels more clear with these changes, so I'm a fan!
277f577 to
62a51ef
Compare
| IDLType.Tags.unrestricted_double: 'f64', | ||
| IDLType.Tags.double: 'Finite<f64>' | ||
| IDLType.Tags.double: 'Finite<f64>', | ||
| IDLBuiltinType.Tags.float32array: 'Float32Array' |
There was a problem hiding this comment.
fixed this to use IDLType
|
@jdm Could you please review 5716fbf? I realized the dom matrix used the array without a backing heap, so added a util func and also used it iniside By the way I am aware of servo/components/script/dom/bindings/utils.rs Line 137 in 3555671 HeapFloat32Array is used everywhere else.
|
6e25d20 to
fbda518
Compare
jdm
left a comment
There was a problem hiding this comment.
Makes sense and should be safely rooted!
|
|
||
| #[derive(Default, JSTraceable)] | ||
| pub struct HeapFloat32Array { | ||
| internal: Heap<*mut JSObject>, |
There was a problem hiding this comment.
I just noticed that the existing audio buffer code is unsafe, because storing Heapin a Vec means the values can be moved in memory when the vec resizes. Let's make this a Box<Heap<...>> instead so it's impossible to misuse?
There was a problem hiding this comment.
First part of #30889: applying to
Float32Array../mach build -ddoes not report any errors./mach test-tidydoes not report any errors