mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)
This commit is contained in:
parent
27031b996b
commit
a205c82264
20 changed files with 34 additions and 34 deletions
|
@ -58,7 +58,7 @@ pub trait WeakReferenceable: DomObject + Sized {
|
|||
trace!("Creating new WeakBox holder for {:p}.", self);
|
||||
ptr = Box::into_raw(box WeakBox {
|
||||
count: Cell::new(1),
|
||||
value: Cell::new(Some(NonZero::new(self))),
|
||||
value: Cell::new(Some(NonZero::new_unchecked(self))),
|
||||
});
|
||||
JS_SetReservedSlot(object, DOM_WEAK_SLOT, PrivateValue(ptr as *const c_void));
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ pub trait WeakReferenceable: DomObject + Sized {
|
|||
new_count);
|
||||
box_.count.set(new_count);
|
||||
WeakRef {
|
||||
ptr: NonZero::new(ptr),
|
||||
ptr: NonZero::new_unchecked(ptr),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue