aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gainnode.rs
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2018-07-09 16:12:58 +0200
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2018-07-30 14:21:44 +0200
commit911b8ebd797135a3b06ef58244999f762add2954 (patch)
tree60dca418951f2046b5595a1acc816b0fa97e7484 /components/script/dom/gainnode.rs
parentb87fc17b4b14898835014a26053fb93f13a47ec9 (diff)
downloadservo-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.rs3
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);