MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getAuto

Function getAuto

valdi/src/valdi/jsbridge/JavaScriptBridge.cpp:65–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static Valdi::IJavaScriptBridge* getAuto() {
66#if VALDI_JS_ENGINE_DEFAULT_HERMES && VALDI_HAS_HERMES
67 return getHermes();
68#elif VALDI_JS_ENGINE_DEFAULT_QUICKJS && VALDI_HAS_QUICKJS
69 return getQuickJS();
70#elif VALDI_JS_ENGINE_DEFAULT_JSCORE && VALDI_HAS_JSCORE
71 return getJSCore();
72#elif VALDI_HAS_JSCORE
73 return getJSCore();
74#elif VALDI_HAS_QUICKJS
75 return getQuickJS();
76#elif VALDI_HAS_HERMES
77 return getHermes();
78#else
79#error "No vm is available for the build."
80#endif
81}
82
83bool JavaScriptBridge::isAvailable(JavaScriptEngineType type) {
84 switch (type) {

Callers 1

getMethod · 0.85

Calls 3

getHermesFunction · 0.85
getQuickJSFunction · 0.85
getJSCoreFunction · 0.85

Tested by

no test coverage detected