Skip to content

Commit c60288e

Browse files
authored
[browser][MT] fix rooting JSWebWorkerInstance (#108475)
1 parent 2358c59 commit c60288e

File tree

1 file changed

+1
-1
lines changed
  • src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript

1 file changed

+1
-1
lines changed

src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSWebWorker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public JSWebWorkerInstance(Func<Task<T>> body, CancellationToken cancellationTok
6464
// We don't want the continuations of that task to run on JSWebWorker
6565
// only the tasks created inside of the callback should run in JSWebWorker
6666
// TODO TaskCreationOptions.HideScheduler ?
67-
_taskCompletionSource = new TaskCompletionSource<T>(TaskCreationOptions.RunContinuationsAsynchronously);
67+
_taskCompletionSource = new TaskCompletionSource<T>(this, TaskCreationOptions.RunContinuationsAsynchronously);
6868
_thread = new Thread(ThreadMain);
6969
_thread.Name = "JSWebWorker";
7070
_resultTask = null;

0 commit comments

Comments
 (0)