diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-03-02 17:10:14 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-03-02 17:10:14 -0800 |
| commit | ed7d25bb6d9955a867b2c2467a44c9e69bbc7f2e (patch) | |
| tree | af5d971ea87272dcec263ca536290b33786210c5 /src/rt/rust_task.cpp | |
| parent | 04d9cc18a569f5d8a8b7c2c07a42259af41d7cb3 (diff) | |
| download | rust-ed7d25bb6d9955a867b2c2467a44c9e69bbc7f2e.tar.gz rust-ed7d25bb6d9955a867b2c2467a44c9e69bbc7f2e.zip | |
rt: Checking port_table.is_empty() requires a lock
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 756dc0fbc4d..952e5c8c47d 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -108,7 +108,12 @@ void rust_task::delete_this() { I(thread, !thread->lock.lock_held_by_current_thread()); - I(thread, port_table.is_empty()); + + { + scoped_lock with (lock); + I(thread, port_table.is_empty()); + } + DLOG(thread, task, "~rust_task %s @0x%" PRIxPTR ", refcnt=%d", name, (uintptr_t)this, ref_count); |
