script: Pass &mut JSContext to Location (#43481)

Part of #42638

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe
2026-03-20 13:54:38 +01:00
committed by GitHub
parent ffae45327c
commit dc9e442b17
9 changed files with 151 additions and 164 deletions

View File

@@ -6,6 +6,7 @@ use std::rc::Rc;
use data_url::mime::Mime;
use dom_struct::dom_struct;
use js::context::JSContext;
use net_traits::request::InsecureRequestsPolicy;
use script_bindings::codegen::GenericBindings::WindowBinding::WindowMethods;
use script_traits::DocumentActivity;
@@ -122,8 +123,8 @@ impl XMLDocument {
impl XMLDocumentMethods<crate::DomTypeHolder> for XMLDocument {
/// <https://html.spec.whatwg.org/multipage/#dom-document-location>
fn GetLocation(&self) -> Option<DomRoot<Location>> {
self.upcast::<Document>().GetLocation()
fn GetLocation(&self, cx: &mut JSContext) -> Option<DomRoot<Location>> {
self.upcast::<Document>().GetLocation(cx)
}
/// <https://html.spec.whatwg.org/multipage/#dom-tree-accessors:supported-property-names>