Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)

This commit is contained in:
Simon Sapin 2017-08-11 16:24:21 +02:00
parent 41fb10c589
commit b5a4b8d6a0
40 changed files with 73 additions and 79 deletions

View file

@ -469,7 +469,7 @@ impl RootCollection {
/// Start tracking a stack-based root
unsafe fn root(&self, untracked_reflector: *const Reflector) {
debug_assert!(thread_state::get().is_script());
let mut roots = &mut *self.roots.get();
let roots = &mut *self.roots.get();
roots.push(untracked_reflector);
assert!(!(*untracked_reflector).get_jsobject().is_null())
}
@ -479,7 +479,7 @@ impl RootCollection {
assert!(!tracked_reflector.is_null());
assert!(!(*tracked_reflector).get_jsobject().is_null());
debug_assert!(thread_state::get().is_script());
let mut roots = &mut *self.roots.get();
let roots = &mut *self.roots.get();
match roots.iter().rposition(|r| *r == tracked_reflector) {
Some(idx) => {
roots.remove(idx);