Skip to content

Commit 0c2169b

Browse files
committed
Fix call to android.system.Os.setenv for JSC_useJIT
1 parent 684ecd4 commit 0c2169b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/SkipScript/JSContext.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ public typealias ExceptionPtr = UnsafeMutablePointer<JSValueRef?>
2020
/// See: https://github.com/WebKit/WebKit/blob/main/Tools/Scripts/run-jsc-benchmarks
2121
private func disableJIT() {
2222
// JSC_useWasmIPInt=0 JSC_useWasmLLInt=1 JSC_useWebAssembly=1 JSC_useJIT=0
23-
setenv("JSC_useJIT", "false", 1)
23+
#if SKIP
24+
android.system.Os.setenv("JSC_useJIT", "false", true)
25+
#else
26+
//setenv("JSC_useJIT", "false", 1) // no need: iOS doesn't support JIT anyway :)
27+
#endif
2428
}
2529

2630
/// A context for evaluating JavaScipt.

0 commit comments

Comments
 (0)