S031: root due timers in vendored servo-script (R5-01 SIGSEGV), crash-adblock regression smoke
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]>
This commit is contained in:
parent
c4022648b0
commit
911c5ab2ce
1 changed files with 306721 additions and 10 deletions
40
vendor/servo-script/dom/html/document_structure/htmldocument.rs
vendored
Normal file
40
vendor/servo-script/dom/html/document_structure/htmldocument.rs
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/* 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 js::context::{JSContext, NoGC};
|
||||
use script_bindings::codegen::GenericBindings::DocumentBinding::DocumentMethods;
|
||||
use script_bindings::codegen::GenericBindings::HTMLDocumentBinding::HTMLDocumentMethods;
|
||||
use script_bindings::root::DomRoot;
|
||||
use script_bindings::str::DOMString;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::NamedPropertyValue;
|
||||
use crate::dom::types::{Document, Location};
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#htmldocument>
|
||||
#[dom_struct]
|
||||
pub(crate) struct HTMLDocument {
|
||||
document: Document,
|
||||
}
|
||||
|
||||
impl HTMLDocumentMethods<crate::DomTypeHolder> for HTMLDocument {
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-document-location>
|
||||
fn GetLocation(&self, cx: &mut JSContext) -> Option<DomRoot<Location>> {
|
||||
self.document.GetLocation(cx)
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-tree-accessors:supported-property-names>
|
||||
fn SupportedPropertyNames(&self, no_gc: &NoGC) -> Vec<DOMString> {
|
||||
self.document.SupportedPropertyNames(no_gc)
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter>
|
||||
fn NamedGetter(
|
||||
&self,
|
||||
cx: &mut js::context::JSContext,
|
||||
name: DOMString,
|
||||
) -> Option<NamedPropertyValue> {
|
||||
self.document.NamedGetter(cx, name)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue