mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add disconnect methods; cleanup DOM stuff (#2)
* Add disconnect methods * Use Dom, not DomRoot DomRoot will keep it permanently rooted, it should only be used in values not on the JS heap
This commit is contained in:
parent
23f7a73622
commit
f3bc183dba
4 changed files with 34 additions and 29 deletions
|
@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, Chann
|
|||
use dom::bindings::codegen::Bindings::GainNodeBinding::{self, GainNodeMethods, GainOptions};
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::bindings::root::{Dom, DomRoot};
|
||||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use servo_media::audio::context::AudioContext;
|
||||
|
@ -27,7 +27,7 @@ audio_param_impl!(Gain, GainNode, GainNodeMessage, SetGain);
|
|||
#[dom_struct]
|
||||
pub struct GainNode {
|
||||
node: AudioNode,
|
||||
gain: DomRoot<AudioParam>,
|
||||
gain: Dom<AudioParam>,
|
||||
}
|
||||
|
||||
impl GainNode {
|
||||
|
@ -60,7 +60,7 @@ impl GainNode {
|
|||
);
|
||||
GainNode {
|
||||
node,
|
||||
gain
|
||||
gain: Dom::from_ref(&gain),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue