Commit c658c05
committed
[webview_flutter_lwe] Fix raster thread crash on WebView disposal
Disposing a WebView unregistered the texture and then immediately destroyed the
web engine and its TBM surfaces on the same call. The Flutter raster thread
could still be compositing the last frame that referenced a TBM surface, so the
surfaces were freed out from under the GPU (tbm_bo_free with a non-zero lock
count), crashing the raster thread.
Dispose now stops the web engine first, unregisters the texture, and blocks the
raster thread from obtaining or touching buffers via a disposing flag. Because
the Tizen embedder does not invoke the UnregisterTexture completion callback,
the TBM surfaces are released on a later main-loop turn (ownership is moved out
of the WebView) so any in-flight composite finishes first.
This eliminates the raster-thread crash seen when running the integration test
suite, where each test disposes a WebView.1 parent a190365 commit c658c05
3 files changed
Lines changed: 47 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
| 264 | + | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
270 | 304 | | |
271 | 305 | | |
272 | 306 | | |
| |||
806 | 840 | | |
807 | 841 | | |
808 | 842 | | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
809 | 846 | | |
810 | 847 | | |
811 | 848 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
0 commit comments