Skip to content

Commit d590528

Browse files
Build fix for Swift 5.9
1 parent 9b7fda0 commit d590528

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Sources/JavaScriptKit/FundamentalObjects/JSObject.swift

-2
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ public class JSObject: Equatable {
206206
/// This allows access to the global properties and global names by accessing the `JSObject` returned.
207207
public static var global: JSObject { return _global }
208208

209-
// `JSObject` storage itself is immutable, and use of `JSObject.global` from other
210-
// threads maintains the same semantics as `globalThis` in JavaScript.
211209
@LazyThreadLocal(initialize: {
212210
return JSObject(id: _JS_Predef_Value_Global)
213211
})

Sources/JavaScriptKit/ThreadLocal.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ final class ThreadLocal<Value>: Sendable {
7878
}
7979
#else
8080
// Fallback implementation for platforms that don't support pthread
81-
81+
#if compiler(>=5.10)
8282
nonisolated(unsafe) var wrappedValue: Value?
83+
#else
84+
var wrappedValue: Value?
85+
#endif
8386

8487
init() where Value: AnyObject {
8588
wrappedValue = nil

0 commit comments

Comments
 (0)