fire_timer moved due timers into an unrooted Vec; a GC inside one callback swept the functions of the timers still waiting. Heavy-web reruns and cargo test still pending. Co-Authored-By: Claude Opus 5.5 <[email protected]>
54 lines
1.6 KiB
Rust
54 lines
1.6 KiB
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* 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 dom_struct::dom_struct;
|
|
use html5ever::{LocalName, Prefix};
|
|
use js::rust::HandleObject;
|
|
|
|
use crate::dom::bindings::inheritance::Castable;
|
|
use crate::dom::bindings::root::DomRoot;
|
|
use crate::dom::document::Document;
|
|
use crate::dom::node::Node;
|
|
use crate::dom::node::virtualmethods::VirtualMethods;
|
|
use crate::dom::svg::svggradientelement::SVGGradientElement;
|
|
|
|
#[dom_struct]
|
|
pub(crate) struct SVGLinearGradientElement {
|
|
svggradientelement: SVGGradientElement,
|
|
}
|
|
|
|
impl SVGLinearGradientElement {
|
|
fn new_inherited(
|
|
local_name: LocalName,
|
|
prefix: Option<Prefix>,
|
|
document: &Document,
|
|
) -> SVGLinearGradientElement {
|
|
SVGLinearGradientElement {
|
|
svggradientelement: SVGGradientElement::new_inherited(local_name, prefix, document),
|
|
}
|
|
}
|
|
|
|
pub(crate) fn new(
|
|
cx: &mut js::context::JSContext,
|
|
local_name: LocalName,
|
|
prefix: Option<Prefix>,
|
|
document: &Document,
|
|
proto: Option<HandleObject>,
|
|
) -> DomRoot<SVGLinearGradientElement> {
|
|
Node::reflect_node_with_proto(
|
|
cx,
|
|
Box::new(SVGLinearGradientElement::new_inherited(
|
|
local_name, prefix, document,
|
|
)),
|
|
document,
|
|
proto,
|
|
)
|
|
}
|
|
}
|
|
|
|
impl VirtualMethods for SVGLinearGradientElement {
|
|
fn super_type(&self) -> Option<&dyn VirtualMethods> {
|
|
Some(self.upcast::<SVGGradientElement>() as &dyn VirtualMethods)
|
|
}
|
|
}
|