Skip to content

Commit 3674e57

Browse files
Merge pull request #384 from swiftwasm/yt/inherit-isolation-from-context
Inherit isolation from the closure definition context
2 parents cc62d17 + 9835c1a commit 3674e57

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/JavaScriptKit/FundamentalObjects/JSClosure.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class JSOneshotClosure: JSObject, JSClosureProtocol {
5454
priority: TaskPriority? = nil,
5555
file: String = #fileID,
5656
line: UInt32 = #line,
57-
_ body: sending @escaping (sending [JSValue]) async throws(JSException) -> JSValue
57+
_ body: @escaping (sending [JSValue]) async throws(JSException) -> JSValue
5858
) -> JSOneshotClosure {
5959
JSOneshotClosure(file: file, line: line, makeAsyncClosure(priority: priority, body))
6060
}
@@ -71,7 +71,7 @@ public class JSOneshotClosure: JSObject, JSClosureProtocol {
7171
priority: TaskPriority? = nil,
7272
file: String = #fileID,
7373
line: UInt32 = #line,
74-
_ body: @Sendable @escaping (sending [JSValue]) async throws(JSException) -> JSValue
74+
_ body: @escaping (sending [JSValue]) async throws(JSException) -> JSValue
7575
) -> JSOneshotClosure {
7676
JSOneshotClosure(
7777
file: file,
@@ -176,7 +176,7 @@ public class JSClosure: JSFunction, JSClosureProtocol {
176176
priority: TaskPriority? = nil,
177177
file: String = #fileID,
178178
line: UInt32 = #line,
179-
_ body: sending @escaping @isolated(any) (sending [JSValue]) async throws(JSException) -> JSValue
179+
_ body: @escaping @isolated(any) (sending [JSValue]) async throws(JSException) -> JSValue
180180
) -> JSClosure {
181181
JSClosure(file: file, line: line, makeAsyncClosure(priority: priority, body))
182182
}
@@ -193,7 +193,7 @@ public class JSClosure: JSFunction, JSClosureProtocol {
193193
priority: TaskPriority? = nil,
194194
file: String = #fileID,
195195
line: UInt32 = #line,
196-
_ body: sending @escaping (sending [JSValue]) async throws(JSException) -> JSValue
196+
_ body: @escaping (sending [JSValue]) async throws(JSException) -> JSValue
197197
) -> JSClosure {
198198
JSClosure(file: file, line: line, makeAsyncClosure(executorPreference: taskExecutor, priority: priority, body))
199199
}
@@ -212,7 +212,7 @@ public class JSClosure: JSFunction, JSClosureProtocol {
212212
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
213213
private func makeAsyncClosure(
214214
priority: TaskPriority?,
215-
_ body: sending @escaping @isolated(any) (sending [JSValue]) async throws(JSException) -> JSValue
215+
_ body: @escaping @isolated(any) (sending [JSValue]) async throws(JSException) -> JSValue
216216
) -> ((sending [JSValue]) -> JSValue) {
217217
{ arguments in
218218
JSPromise { resolver in
@@ -241,7 +241,7 @@ private func makeAsyncClosure(
241241
private func makeAsyncClosure(
242242
executorPreference taskExecutor: (any TaskExecutor)?,
243243
priority: TaskPriority?,
244-
_ body: sending @escaping (sending [JSValue]) async throws(JSException) -> JSValue
244+
_ body: @escaping (sending [JSValue]) async throws(JSException) -> JSValue
245245
) -> ((sending [JSValue]) -> JSValue) {
246246
{ arguments in
247247
JSPromise { resolver in

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy