mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
rule tree: Remove unsound transmute()
RuleTreeDeclarationsIterator would yield &PropertyDeclaration with the lifetime of the rule tree, but the reference would only be valid as long as the iterator was holding the corresponding lock. The lock would be released when the iterator’s `.next()` method moves to the next rule tree node, or when the iterator is dropped. Also change apply_declaration to not require a `Clone` iterator (since closures unfortunately don’t implement `Clone`). Instead have it take a callable that returns a fresh iterator.
This commit is contained in:
parent
de4fe6e2b6
commit
98bd99b74c
6 changed files with 58 additions and 176 deletions
|
@ -99,7 +99,6 @@ pub mod cascade_info;
|
|||
pub mod context;
|
||||
pub mod custom_properties;
|
||||
pub mod data;
|
||||
pub mod declarations_iterators;
|
||||
pub mod dom;
|
||||
pub mod element_state;
|
||||
pub mod error_reporting;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue