Skip to content

Commit e67b03e

Browse files
kateinoigakukunMaxDesiatov
andauthoredJan 2, 2021
Apply suggestions from code review
Co-authored-by: Max Desiatov <max@desiatov.com>
1 parent df7ff62 commit e67b03e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

Diff for: ‎IntegrationTests/TestSuites/Sources/PrimaryTests/main.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ try test("Closure Lifetime") {
216216
return .boolean(true)
217217
}
218218
try expectEqual(c1(), .boolean(true))
219-
// second call will cause fatalError that can be catched as a JavaScript exception
219+
// second call will cause `fatalError` that can be caught as a JavaScript exception
220220
_ = try expectThrow(try c1.throws())
221221
// OneshotClosure won't call fatalError even if it's deallocated before `release`
222222
}

Diff for: ‎Sources/JavaScriptKit/FundamentalObjects/JSClosure.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _CJavaScriptKit
22

33
fileprivate var sharedFunctions: [JavaScriptHostFuncRef: ([JSValue]) -> JSValue] = [:]
44

5-
/// `JSOneshotClosure` is a JavaScript function that can be called at once.
5+
/// `JSOneshotClosure` is a JavaScript function that can be called only once.
66
public class JSOneshotClosure: JSFunction {
77
private var hostFuncRef: JavaScriptHostFuncRef = 0
88

0 commit comments

Comments
 (0)
Please sign in to comment.