0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-08 07:16:56 -05:00

fix(runtime): fix for panic in classic workers (#21300)

Fixes #21299
This commit is contained in:
Matt Mastracci 2023-11-22 10:02:13 -07:00 committed by Bartek Iwańczuk
parent ff8739d05f
commit ffa7cf54d8
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -756,9 +756,16 @@ impl WebWorker {
return Poll::Ready(Err(e)); return Poll::Ready(Err(e));
} }
panic!( // TODO(mmastrac): we don't want to test this w/classic workers because
"coding error: either js is polling or the worker is terminated" // WPT triggers a failure here. This is only exposed via --enable-testing-features-do-not-use.
); if self.worker_type == WebWorkerType::Module {
panic!(
"coding error: either js is polling or the worker is terminated"
);
} else {
eprintln!("classic worker terminated unexpectedly");
Poll::Ready(Ok(()))
}
} }
Poll::Pending => Poll::Pending, Poll::Pending => Poll::Pending,
} }