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

Method performGcNow

valdi/src/valdi/android/NativeBridge.cpp:1824–1833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1822 fbjni::alias_ref<fbjni::JClass> /* clazz */, // NOLINT
1823 jlong runtimeHandle) {
1824 Valdi::Ref<Valdi::ValueArray> retval;
1825
1826 auto runtime = getRuntime(runtimeHandle);
1827 if (runtime != nullptr) {
1828 auto bundles = runtime->getResourceManager().getAllInitializedBundles();
1829 Valdi::ValueArrayBuilder builder;
1830 for (const auto& [bundleName, bundle] : bundles) {
1831 auto hash = bundle->getHash();
1832 if (hash) {
1833 auto bundleNameAndHash = Valdi::ValueArray::make(2);
1834 bundleNameAndHash->emplace(0, Valdi::Value(bundleName));
1835 bundleNameAndHash->emplace(1, Valdi::Value(hash.moveValue()));
1836 builder.append(Valdi::Value(bundleNameAndHash));

Callers

nothing calls this directly

Calls 3

getRuntimeFunction · 0.85
performGcMethod · 0.80
getJavaScriptRuntimeMethod · 0.80

Tested by

no test coverage detected