> Or probably asserting that we're not in a Servo Layout thread when we > `borrow_mut`? Not perfect, but...
Extra runtime check and I'm not fond of this solution in general, since it's runtime. The token thing is a pure compile time option. Making it !Send+!Sync means that it's hard to make it accidentally end up in the layout thread. > Can you move the same CSSRuleList to a different owner? If you can, this > wouldn't work, right? I don't think you can. e this will also need it's own RwLock in order to mutate the > list, right? If that's the case, probably something like > Arc<RwLock<CSSRuleList>>, where CSSRuleList(Vec<CSSRule>) is probably > nicer. Yep. I'm implementing an immutable cssom first, and will revisit the exact positions of the rwlocks later. _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo