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

Method startProfiling

valdi/src/valdi/hermes/HermesJavaScriptContext.cpp:1217–1228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1215static bool hasNativeState(hermes::vm::Runtime& runtime, const hermes::vm::Handle<hermes::vm::JSObject>& jsObject) {
1216 if (!canReceiveNativeState(jsObject.get())) {
1217 return false;
1218 }
1219
1220 auto callResult = hermes::vm::JSObject::hasNamed(
1221 jsObject, runtime, hermes::vm::Predefined::getSymbolID(hermes::vm::Predefined::InternalPropertyNativeState));
1222 if (callResult.getStatus() == hermes::vm::ExecutionStatus::EXCEPTION) {
1223 runtime.clearThrownValue();
1224 return false;
1225 }
1226
1227 return callResult.getValue();
1228}
1229
1230static bool isInstanceOf(hermes::vm::Runtime& runtime,
1231 const hermes::vm::Handle<hermes::vm::JSObject>& jsObject,

Callers

nothing calls this directly

Calls 2

handleCDPMessageMethod · 0.80
getDebuggerConnectionMethod · 0.80

Tested by

no test coverage detected