mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Stop DedicatedWorker from handling remaining messages after closed (#37471)
Stop DedicatedWorker from handling remaining messages after closed Testing: WPT workers/WorkerGlobalScope-close.html Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
This commit is contained in:
parent
9352a9db7c
commit
f09042340c
2 changed files with 3 additions and 3 deletions
|
@ -618,6 +618,9 @@ impl DedicatedWorkerGlobalScope {
|
|||
}
|
||||
|
||||
fn handle_mixed_message(&self, msg: MixedMessage, can_gc: CanGc) -> bool {
|
||||
if self.upcast::<WorkerGlobalScope>().is_closing() {
|
||||
return false;
|
||||
}
|
||||
// FIXME(#26324): `self.worker` is None in devtools messages.
|
||||
match msg {
|
||||
MixedMessage::Devtools(msg) => match msg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue