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

Method dumpHeap

valdi/src/valdi/hermes/HermesJavaScriptContext.cpp:1164–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162 return nullptr;
1163 }
1164
1165 auto* nativeState = hermes::vm::vmcast<hermes::vm::NativeState>(result.getValue().get());
1166
1167 return unwrapNativeClassInstanceData(unsafeBridge<RefCountable>(nativeState->context()));
1168}
1169
1170Ref<JSFunction> HermesJavaScriptContext::valueToFunction(const JSValue& value, JSExceptionTracker& exceptionTracker) {
1171 hermes::vm::GCScope gcScope(*_runtime);
1172 auto* hermesValue = toPinnedHermesValue(value);
1173 if (!hermes::vm::vmisa<hermes::vm::FinalizableNativeFunction>(*hermesValue)) {
1174 return nullptr;
1175 }
1176
1177 auto* functionContext = unsafeBridgeUnretained<RefCountable>(
1178 hermes::vm::vmcast<hermes::vm::FinalizableNativeFunction>(*hermesValue)->getContext());

Callers

nothing calls this directly

Calls 4

createSnapshotMethod · 0.80
onErrorMethod · 0.65
BytesViewClass · 0.50
toBytesViewMethod · 0.45

Tested by

no test coverage detected