mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Assert that self.has_aux() in rcu before returning aux
This commit is contained in:
parent
48034368b5
commit
4938e1733c
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ impl reader_methods<T:send,A> for handle<T,A> {
|
|||
}
|
||||
|
||||
fn aux<U>(f: fn(A) -> U) -> U unsafe {
|
||||
// warning: do not use if has_aux() is false!
|
||||
assert self.has_aux();
|
||||
f(*self.rd_aux())
|
||||
}
|
||||
}
|
||||
|
@ -240,4 +240,4 @@ mod test {
|
|||
assert ferdinand.rd(read_characteristic) == iter1 * iter2;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue