diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-28 15:57:59 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-28 16:04:49 -0700 |
| commit | 3dd522b6b78fe32c44af571098d0ff4d1dcc9398 (patch) | |
| tree | 5de0b77161bbdb180a50663c226e71da10048ee6 /src/rt | |
| parent | d0cb62ac90fb38a87b78691bf1436f6a14a67d71 (diff) | |
| download | rust-3dd522b6b78fe32c44af571098d0ff4d1dcc9398.tar.gz rust-3dd522b6b78fe32c44af571098d0ff4d1dcc9398.zip | |
Add an assertion about the lock in rust_chan::disassociate
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_chan.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rt/rust_chan.cpp b/src/rt/rust_chan.cpp index e32c4214afc..9017e9a2bc1 100644 --- a/src/rt/rust_chan.cpp +++ b/src/rt/rust_chan.cpp @@ -51,7 +51,9 @@ bool rust_chan::is_associated() { * Unlink this channel from its associated port. */ void rust_chan::disassociate() { - // Precondition: port->referent()->lock must be held + A(kernel, + port->referent()->lock.lock_held_by_current_thread(), + "Port referent lock must be held to call rust_chan::disassociate"); A(kernel, is_associated(), "Channel must be associated with a port."); if (port->is_proxy() == false) { |
