Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed May 8, 2024
1 parent 9b395ad commit 36be2c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runtime/web_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,12 +805,13 @@ impl WebWorker {

// TODO(mmastrac): we don't want to test this w/classic workers because
// WPT triggers a failure here. This is only exposed via --enable-testing-features-do-not-use.
#[allow(clippy::print_stderr)]
if self.worker_type == WebWorkerType::Module {
panic!(
"coding error: either js is polling or the worker is terminated"
);
} else {
log::error!("classic worker terminated unexpectedly");
eprintln!("classic worker terminated unexpectedly");
Poll::Ready(Ok(()))
}
}
Expand Down Expand Up @@ -878,6 +879,7 @@ impl WebWorker {
}
}

#[allow(clippy::print_stderr)]
fn print_worker_error(
error: &AnyError,
name: &str,
Expand All @@ -890,7 +892,7 @@ fn print_worker_error(
},
None => error.to_string(),
};
log::error!(
eprintln!(
"{}: Uncaught (in worker \"{}\") {}",
colors::red_bold("error"),
name,
Expand Down

0 comments on commit 36be2c2

Please sign in to comment.