@@ -16,31 +16,18 @@ let JavaScriptCore: JavaScriptCoreLibrary = JavaScriptCoreLibrary.instance
16
16
17
17
public typealias ExceptionPtr = UnsafeMutablePointer < JSValueRef ? >
18
18
19
- /// JIT needs to be disabled on Android to avoid random crashes in `JSValueUnprotect`
20
- /// See: https://github.com/WebKit/WebKit/blob/main/Tools/Scripts/run-jsc-benchmarks
21
- private func disableJIT( ) {
22
- // JSC_useWasmIPInt=0 JSC_useWasmLLInt=1 JSC_useWebAssembly=1 JSC_useJIT=0
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
28
- }
29
-
30
19
/// A context for evaluating JavaScipt.
31
20
public class JSContext {
32
21
public let context : JSContextRef
33
22
public private( set) var exception : JSValue ? = nil
34
23
private var tryingRecursionGuard = false
35
24
36
25
public init ( jsGlobalContextRef context: JSContextRef ) {
37
- disableJIT ( )
38
26
self . context = context
39
27
JavaScriptCore . JSGlobalContextRetain ( context)
40
28
}
41
29
42
30
public init ( ) {
43
- disableJIT ( )
44
31
self . context = JavaScriptCore . JSGlobalContextCreate ( nil )
45
32
}
46
33
@@ -575,7 +562,7 @@ public class JSValue {
575
562
02-06 14:33:12.997 2016 2016 F DEBUG : #11 pc 0000000000185e6b /apex/com.android.art/lib64/libart.so (art_quick_osr_stub+27) (BuildId: 1dfb27162fe62a7ac7a10ea361233369)
576
563
02-06 14:33:12.997 2016 2016 F DEBUG : #12 pc 00000000003d27ba /apex/com.android.art/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+410) (BuildId: 1dfb27162fe62a7ac7a10ea361233369)
577
564
*/
578
- JavaScriptCore . JSValueUnprotect ( context. context, value)
565
+ // JavaScriptCore.JSValueUnprotect(context.context, value)
579
566
}
580
567
}
581
568
0 commit comments