You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/JavaScriptKit/FundamentalObjects/JSClosure.swift
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,10 @@ public class JSClosure: JSObject, JSClosureProtocol {
59
59
60
60
privatevarhostFuncRef:JavaScriptHostFuncRef=0
61
61
62
-
#if JAVASCRIPTKIT_WITHOUT_WEAKREFS
62
+
// Disabling JAVASCRIPTKIT_WITHOUT_WEAKREFS till they fix https://bugs.swift.org/browse/SR-15611
63
+
// #if JAVASCRIPTKIT_WITHOUT_WEAKREFS
63
64
privatevarisReleased:Bool=false
64
-
#endif
65
+
// #endif
65
66
66
67
@available(*, deprecated, message:"This initializer will be removed in the next minor version update. Please use `init(_ body: @escaping ([JSValue]) -> JSValue)` and add `return .undefined` to the end of your closure")
67
68
@_disfavoredOverload
@@ -84,13 +85,14 @@ public class JSClosure: JSObject, JSClosureProtocol {
84
85
Self.sharedClosures[hostFuncRef]=(self, body)
85
86
}
86
87
87
-
#if JAVASCRIPTKIT_WITHOUT_WEAKREFS
88
+
// Disabling JAVASCRIPTKIT_WITHOUT_WEAKREFS till they fix https://bugs.swift.org/browse/SR-15611
89
+
// #if JAVASCRIPTKIT_WITHOUT_WEAKREFS
88
90
deinit{
89
91
guard isReleased else{
90
92
fatalError("release() must be called on JSClosure objects manually before they are deallocated")
0 commit comments