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

Method captureJavaScriptStackTraces

valdi/src/valdi/android/NativeBridge.cpp:1651–1673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1649 if (static_cast<bool>(hasTransform)) {
1650 viewNode->setAttribute(
1651 viewTransactionScope, translationYId, attributeOwner, Valdi::Value(translationY), nullptr);
1652 viewNode->setAttribute(viewTransactionScope, scaleXId, attributeOwner, Valdi::Value(scale), nullptr);
1653 viewNode->setAttribute(viewTransactionScope, scaleYId, attributeOwner, Valdi::Value(scale), nullptr);
1654 } else {
1655 viewNode->setAttribute(
1656 viewTransactionScope, translationYId, attributeOwner, Valdi::Value::undefined(), nullptr);
1657 viewNode->setAttribute(viewTransactionScope, scaleXId, attributeOwner, Valdi::Value::undefined(), nullptr);
1658 viewNode->setAttribute(viewTransactionScope, scaleYId, attributeOwner, Valdi::Value::undefined(), nullptr);
1659 }
1660
1661 viewNode->getAttributesApplier().flush(viewTransactionScope);
1662 viewTransactionScope.flushNow(/* sync */ true);
1663 });
1664}
1665
1666void ValdiAndroid::NativeBridge::notifyApplyAttributeFailed(fbjni::alias_ref<fbjni::JClass> clazz, // NOLINT
1667 jlong viewNodeHandle,
1668 jint attributeId,
1669 jstring errorMessage) {
1670 auto viewNode = getViewNode(viewNodeHandle);
1671 if (viewNode == nullptr) {
1672 return;
1673 }
1674
1675 // Failures can be reported asynchronously (e.g. font load completions posted to the main
1676 // thread). By then the node may be detached and its tree/logger already destroyed, so

Callers

nothing calls this directly

Calls 12

getRuntimeFunction · 0.85
durationFunction · 0.85
toJavaObjectFunction · 0.85
getJavaScriptRuntimeMethod · 0.80
getStatusMethod · 0.80
getStackTraceMethod · 0.65
releaseObjectMethod · 0.65
ValueClass · 0.50
JavaEnvClass · 0.50
captureStackTracesMethod · 0.45
sizeMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected