mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove unsound Root::deref() call in Attr::set_value.
This changes those calls whose unsoundness was not picked up by the type system because of a lifetime constraint that cannot be expressed at this time.
This commit is contained in:
parent
1dad710063
commit
a094c0a7f3
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
|||
use dom::bindings::codegen::InheritTypes::NodeCast;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{JS, JSRef, Temporary};
|
||||
use dom::bindings::js::{OptionalRootedRootable, RootedReference};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::element::{Element, AttributeHandlers};
|
||||
use dom::node::Node;
|
||||
|
@ -207,7 +208,7 @@ pub trait AttrHelpers<'a> {
|
|||
|
||||
impl<'a> AttrHelpers<'a> for JSRef<'a, Attr> {
|
||||
fn set_value(self, set_type: AttrSettingType, value: AttrValue, owner: JSRef<Element>) {
|
||||
assert!(Some(owner) == self.owner.map(|o| *o.root()));
|
||||
assert!(Some(owner) == self.owner.root().r());
|
||||
|
||||
let node: JSRef<Node> = NodeCast::from_ref(owner);
|
||||
let namespace_is_null = self.namespace == ns!("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue