mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use std::sync::atomic::Ordering explicitly.
This commit is contained in:
parent
524966e3af
commit
faefb27f3e
8 changed files with 22 additions and 22 deletions
|
@ -12,7 +12,7 @@ use flow;
|
|||
use std::mem;
|
||||
use std::ptr;
|
||||
use std::raw;
|
||||
use std::sync::atomic::SeqCst;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
#[unsafe_no_drop_flag]
|
||||
pub struct FlowRef {
|
||||
|
@ -55,7 +55,7 @@ impl Drop for FlowRef {
|
|||
if self.object.vtable.is_null() {
|
||||
return
|
||||
}
|
||||
if flow::base(&**self).ref_count().fetch_sub(1, SeqCst) > 1 {
|
||||
if flow::base(&**self).ref_count().fetch_sub(1, Ordering::SeqCst) > 1 {
|
||||
return
|
||||
}
|
||||
let flow_ref: FlowRef = mem::replace(self, FlowRef {
|
||||
|
@ -75,7 +75,7 @@ impl Drop for FlowRef {
|
|||
impl Clone for FlowRef {
|
||||
fn clone(&self) -> FlowRef {
|
||||
unsafe {
|
||||
drop(flow::base(self.deref()).ref_count().fetch_add(1, SeqCst));
|
||||
drop(flow::base(self.deref()).ref_count().fetch_add(1, Ordering::SeqCst));
|
||||
FlowRef {
|
||||
object: raw::TraitObject {
|
||||
vtable: self.object.vtable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue