Skip to content

Commit 9161102

Browse files
Fix internal compiler crash on CopyPropagation
1 parent 8b9ed89 commit 9161102

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sources/JavaScriptEventLoop/WebWorkerTaskExecutor.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,9 @@ public final class WebWorkerTaskExecutor: TaskExecutor {
308308
}
309309
}
310310

311-
func enqueue(_ job: consuming ExecutorJob) {
311+
func enqueue(_ job: UnownedJob) {
312312
precondition(!workers.isEmpty, "No worker threads are available")
313313

314-
let job = UnownedJob(job)
315314
// If the current thread is a worker thread, enqueue the job to the current worker.
316315
if let worker = Worker.currentThread {
317316
worker.enqueue(job)
@@ -356,7 +355,7 @@ public final class WebWorkerTaskExecutor: TaskExecutor {
356355
/// Enqueue a job to the executor.
357356
///
358357
/// NOTE: Called from the Swift Concurrency runtime.
359-
public func enqueue(_ job: consuming ExecutorJob) {
358+
public func enqueue(_ job: UnownedJob) {
360359
Self.traceStatsIncrement(\.enqueueExecutor)
361360
executor.enqueue(job)
362361
}

0 commit comments

Comments
 (0)