Move mutation observers list to NodeRareData

This commit is contained in:
Fernando Jiménez Moreno 2019-03-06 16:05:59 +01:00
parent 6af4729f42
commit a9019da39d
2 changed files with 7 additions and 8 deletions

View file

@ -2,7 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::root::MutNullableDom;
use crate::dom::mutationobserver::RegisteredObserver;
use crate::dom::shadowroot::ShadowRoot;
#[derive(Default, JSTraceable, MallocSizeOf)]
@ -12,6 +14,8 @@ pub struct NodeRareData {
/// This is None if the node is not in a shadow tree or
/// if it is a ShadowRoot.
pub owner_shadow_root: MutNullableDom<ShadowRoot>,
/// Registered observers for this node.
pub mutation_observers: DomRefCell<Vec<RegisteredObserver>>,
}
#[derive(Default, JSTraceable, MallocSizeOf)]