mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
auto merge of #2068 : mbrubeck/servo/1187-buffer-destroy, r=larsbergstrom
This fixes a potential pixmap leak and task failure when the LayerBuffer is dropped (#1187). I wasn't able to reproduce the failure using the steps from #1187, but based on the stack trace I think this is the correct fix. Alternately, would it make sense to `impl Drop for LayerBuffer`?
This commit is contained in:
commit
08f53acd09
1 changed files with 1 additions and 0 deletions
|
@ -83,6 +83,7 @@ impl<T: Tile> BufferMap<T> {
|
|||
// memory limit, no need to store this new buffer; just let it drop.
|
||||
if self.mem + new_buffer.get_mem() > self.max_mem && self.map.len() == 1 &&
|
||||
self.map.contains_key(&new_key) {
|
||||
new_buffer.destroy(graphics_context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue