servo/components/util
bors-servo 318b23ed00 Auto merge of #13472 - asajeffrey:util-remutex-dont-log-while-mutating-lock, r=jdm
Don't log in the middle of mutating a reentrant lock

<!-- Please describe your changes on the following line: -->

Moved assertion that we are the lock owner to after the lock release. The problem is that Servo uses a reentrant lock for logging, so logging in the middle of mutating the lock is A Bad Idea.

While I was at it, I tidied up the reentrant lock code.

cc @jdm

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13463.
- [X] These changes do not require tests because they fix an existing intermittent.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13472)
<!-- Reviewable:end -->
2016-10-04 16:01:40 -05:00
..
basedir.rs
Cargo.toml Update euclid to 0.10.1 2016-08-21 03:03:45 +02:00
geometry.rs
ipc.rs
lib.rs Add assertion that this is not a flex item 2016-09-29 10:29:35 -07:00
opts.rs profile: Integrate the time profiler with the macOS signpost 2016-10-01 00:12:49 -07:00
prefs.rs
remutex.rs Moved assertion to after lock release; tidied up code. 2016-10-04 15:50:38 -05:00
resource_files.rs
thread.rs