Commit 37973d9
committed
Fix ownership for RenderArea in screenshots.
RenderArea was previously owned by captureScreenshot(), and was borrowed by renderScreenImpl(). But renderScreenImpl asynchronously executes screenshot rendering which relies on the render area, which causes a use-after-free. Instead, pass ownership to renderScreenImpl.
Bug: 389887557
Change-Id: I37035b34d55f4847db9722371ea492364f7706fe
Flag: EXEMPT bug fix
Test: courage1 parent 1da7821 commit 37973d9
3 files changed
Lines changed: 7 additions & 5 deletions
File tree
- services/surfaceflinger
- tests/unittests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7575 | 7575 | | |
7576 | 7576 | | |
7577 | 7577 | | |
7578 | | - | |
| 7578 | + | |
7579 | 7579 | | |
7580 | 7580 | | |
7581 | 7581 | | |
| |||
7599 | 7599 | | |
7600 | 7600 | | |
7601 | 7601 | | |
7602 | | - | |
| 7602 | + | |
7603 | 7603 | | |
7604 | 7604 | | |
7605 | 7605 | | |
| |||
7620 | 7620 | | |
7621 | 7621 | | |
7622 | 7622 | | |
7623 | | - | |
| 7623 | + | |
| 7624 | + | |
7624 | 7625 | | |
7625 | 7626 | | |
7626 | 7627 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
| 897 | + | |
| 898 | + | |
898 | 899 | | |
899 | 900 | | |
900 | 901 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
0 commit comments