diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-07-09 16:12:58 +0200 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2018-07-30 14:21:44 +0200 |
commit | 911b8ebd797135a3b06ef58244999f762add2954 (patch) | |
tree | 60dca418951f2046b5595a1acc816b0fa97e7484 /components/script/dom/gainnode.rs | |
parent | b87fc17b4b14898835014a26053fb93f13a47ec9 (diff) | |
download | servo-911b8ebd797135a3b06ef58244999f762add2954.tar.gz servo-911b8ebd797135a3b06ef58244999f762add2954.zip |
Remove unsafe code to create empty AudioNodeOptions
Diffstat (limited to 'components/script/dom/gainnode.rs')
-rw-r--r-- | components/script/dom/gainnode.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/gainnode.rs b/components/script/dom/gainnode.rs index 6b43651231d..3bb2c573233 100644 --- a/components/script/dom/gainnode.rs +++ b/components/script/dom/gainnode.rs @@ -31,14 +31,13 @@ pub struct GainNode { } impl GainNode { - #[allow(unsafe_code)] #[allow(unrooted_must_root)] pub fn new_inherited( window: &Window, context: &BaseAudioContext, gain_options: &GainOptions, ) -> GainNode { - let mut node_options = unsafe { AudioNodeOptions::empty(window.get_cx()) }; + let mut node_options = AudioNodeOptions::empty(); node_options.channelCount = Some(2); node_options.channelCountMode = Some(ChannelCountMode::Max); node_options.channelInterpretation = Some(ChannelInterpretation::Speakers); |