mirror of
https://github.com/servo/servo.git
synced 2025-10-04 10:39:16 +01:00
Make `FlowRef` a newtype This creates a sharp distinction between `Arc<Flow>`s, which may be owned by anyone, and `FlowRef`s, which may only be owned by the traversal code. By checking the reference count, we ensure that a `Flow` cannot be pointed to by `Arc`s and `FlowRef`s simultaneously. This is not a complete fix for #6503, though it is a necessary start (enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far more work). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14014 (github issue number if applicable). - [X] These changes do not require tests because the existing tests, plus the added assertions, should be sufficient <!-- 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/14053) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
Cargo.toml | ||
lib.rs |