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

Method getJSRuntime

valdi/src/valdi/android/NativeBridge.cpp:1810–1822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1808}
1809
1810jobject ValdiAndroid::NativeBridge::getJSRuntime( // NOLINT
1811 fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT
1812 jlong runtimeHandle) {
1813 auto* env = fbjni::Environment::current();
1814 auto* runtime = getRuntime(runtimeHandle);
1815 if (runtime == nullptr) {
1816 return nullptr;
1817 }
1818
1819 return djinni_generated_client::valdi_core::NativeJSRuntime::fromCpp(
1820 env, Valdi::strongRef(runtime->getJavaScriptRuntime()))
1821 .release();
1822}
1823
1824void ValdiAndroid::NativeBridge::performGcNow( // NOLINT
1825 fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT

Callers

nothing calls this directly

Calls 5

getRuntimeFunction · 0.85
strongRefFunction · 0.85
getJavaScriptRuntimeMethod · 0.80
fromCppFunction · 0.50
releaseMethod · 0.45

Tested by

no test coverage detected