File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Sources/JavaScriptKit/FundamentalObjects Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -206,12 +206,14 @@ public class JSObject: Equatable {
206
206
/// This allows access to the global properties and global names by accessing the `JSObject` returned.
207
207
public static var global : JSObject { return _global }
208
208
209
- // `JSObject` storage itself is immutable, and use of `JSObject.global` from other
210
- // threads maintains the same semantics as `globalThis` in JavaScript.
209
+ #if compiler(>=5.10)
211
210
@LazyThreadLocal ( initialize: {
212
211
return JSObject ( id: _JS_Predef_Value_Global)
213
212
} )
214
213
private static var _global : JSObject
214
+ #else
215
+ private static let _global = JSObject ( id: _JS_Predef_Value_Global)
216
+ #endif
215
217
216
218
deinit {
217
219
assertOnOwnerThread ( hint: " deinitializing " )
You can’t perform that action at this time.
0 commit comments