Skip to content

Commit 2804274

Browse files
Remove metadata fields from non-tracing builds
1 parent c3825bf commit 2804274

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/JavaScriptKit/FundamentalObjects/JSClosure.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,19 @@ public class JSClosure: JSObject, JSClosureProtocol {
122122
struct Entry {
123123
let object: JSObject
124124
let body: (sending [JSValue]) -> JSValue
125+
#if Tracing
125126
let fileID: String
126127
let line: UInt32
128+
#endif
129+
130+
init(object: JSObject, body: @escaping (sending [JSValue]) -> JSValue, fileID: String, line: UInt32) {
131+
self.object = object
132+
self.body = body
133+
#if Tracing
134+
self.fileID = fileID
135+
self.line = line
136+
#endif
137+
}
127138
}
128139
private var storage: [JavaScriptHostFuncRef: Entry] = [:]
129140
init() {}

0 commit comments

Comments
 (0)