mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
servo: Merge #2252 - Make ContainerLayer::first_child borrow temporary (from mbrubeck:1778-borrow-layer); r=larsbergstrom
Fixes a crash in ContainerLayer::remove_child (#1778). r? @larsbergstrom Source-Repo: https://github.com/servo/servo Source-Revision: afae6a3c71a722258e204ba51551a2a6143920d5
This commit is contained in:
parent
4c28ea9b9e
commit
0ba8cd6356
@ -376,10 +376,11 @@ impl IOCompositor {
|
||||
self.opts.tile_size,
|
||||
self.opts.cpu_painting);
|
||||
|
||||
match *self.root_layer.first_child.borrow() {
|
||||
let first_child = self.root_layer.first_child.borrow().clone();
|
||||
match first_child {
|
||||
None => {}
|
||||
Some(ref old_layer) => {
|
||||
ContainerLayer::remove_child(self.root_layer.clone(), old_layer.clone())
|
||||
Some(old_layer) => {
|
||||
ContainerLayer::remove_child(self.root_layer.clone(), old_layer)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user