| 81 | } |
| 82 | |
| 83 | bool JavaScriptBridge::isAvailable(JavaScriptEngineType type) { |
| 84 | switch (type) { |
| 85 | case JavaScriptEngineType::Auto: |
| 86 | return true; |
| 87 | case JavaScriptEngineType::JSCore: |
| 88 | #if VALDI_HAS_JSCORE |
| 89 | return true; |
| 90 | #else |
| 91 | return false; |
| 92 | #endif |
| 93 | case JavaScriptEngineType::QuickJS: |
| 94 | #if VALDI_HAS_QUICKJS |
| 95 | return true; |
| 96 | #else |
| 97 | return false; |
| 98 | #endif |
| 99 | case JavaScriptEngineType::V8: |
| 100 | #if VALDI_HAS_V8 |
| 101 | return true; |
| 102 | #else |
| 103 | return false; |
| 104 | #endif |
| 105 | case JavaScriptEngineType::Hermes: |
| 106 | #if VALDI_HAS_HERMES |
| 107 | return true; |
| 108 | #else |
nothing calls this directly
no test coverage detected