Commit 8848619
[GStreamer] Fix delayed dispatch of async task post MediaPlayer destruction
https://bugs.webkit.org/show_bug.cgi?id=266715
Reviewed by Xabier Rodriguez-Calvar.
When the media player is destroyed, there can still be async tasks (from AbortableTaskQueue)
ongoing, some of them related to tracks. Those tasks should be aborted, because they depend
on objects that are no longer there.
This patch aborts all pending tasks on AbortableTaskQueue destruction and also unregisters
all pending callbacks from TrackPrivateBaseGStreamer (and asserts that they're no longer
there).
See: #1231
Original author: "Vivek.A" <Vivek_Arumugam@comcast.com>
* Source/WebCore/platform/AbortableTaskQueue.h: Abort tasks on destruction.
* Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::disconnect): Disconnect handlers and assert.
Canonical link: https://commits.webkit.org/272410@main1 parent b56a9c7 commit 8848619
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
158 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
159 | 163 | | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
0 commit comments