File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ public final class JSPromise: JSBridgedClass {
9696 let body : ( ) async throws ( JSException) -> JSValue
9797 }
9898 let context = Context ( resolver: resolver, body: body)
99- // Detach the task so the JS bridge does not inherit an arbitrary caller executor.
100- Task . detached {
99+ Task {
101100 do throws ( JSException) {
102101 let result = try await context. body ( )
103102 context. resolver ( . success( result) )
Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ private func makeAsyncClosure(
353353 let body : ( sending [ JSValue ] ) async throws ( JSException) -> JSValue
354354 }
355355 let context = Context ( resolver: resolver, arguments: arguments, body: body)
356- Task . detached ( priority: priority) {
356+ Task ( priority: priority) {
357357 do throws ( JSException) {
358358 let result = try await context. body ( context. arguments)
359359 context. resolver ( . success( result) )
You can’t perform that action at this time.
0 commit comments