mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Multiple CanGc fixes in components/script/dom (#33924)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
ee9e1fbbd6
commit
65c866285f
26 changed files with 77 additions and 37 deletions
|
@ -443,6 +443,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
number_of_channels: u32,
|
||||
length: u32,
|
||||
sample_rate: Finite<f32>,
|
||||
can_gc: CanGc,
|
||||
) -> Fallible<DomRoot<AudioBuffer>> {
|
||||
if number_of_channels == 0 ||
|
||||
number_of_channels > MAX_CHANNEL_COUNT ||
|
||||
|
@ -457,6 +458,7 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
length,
|
||||
*sample_rate,
|
||||
None,
|
||||
can_gc,
|
||||
))
|
||||
}
|
||||
|
||||
|
@ -547,7 +549,8 @@ impl BaseAudioContextMethods for BaseAudioContext {
|
|||
decoded_audio.len() as u32 /* number of channels */,
|
||||
length as u32,
|
||||
this.sample_rate,
|
||||
Some(decoded_audio.as_slice()));
|
||||
Some(decoded_audio.as_slice()),
|
||||
CanGc::note());
|
||||
let mut resolvers = this.decode_resolvers.borrow_mut();
|
||||
assert!(resolvers.contains_key(&uuid_));
|
||||
let resolver = resolvers.remove(&uuid_).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue