mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #8545 - Ms2ger:AutoJoinScriptTask, r=pcwalton
Remove AutoJoinScriptTask. I don't believe there is a case where it would make sense to drop the ScriptReflow struct without joining the script thread. This approach should be somewhat more robust, and avoids the code smell of a RAII guard in an otherwise unused variable. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8545) <!-- Reviewable:end -->
This commit is contained in:
commit
db94fda10e
2 changed files with 7 additions and 11 deletions
|
@ -179,6 +179,12 @@ pub struct ScriptReflow {
|
|||
pub query_type: ReflowQueryType,
|
||||
}
|
||||
|
||||
impl Drop for ScriptReflow {
|
||||
fn drop(&mut self) {
|
||||
self.script_join_chan.send(()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
/// Encapsulates a channel to the layout task.
|
||||
#[derive(Clone)]
|
||||
pub struct LayoutChan(pub Sender<Msg>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue