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

Method runtimeMakeOpaque

valdi/src/valdi/runtime/JavaScript/JavaScriptRuntime.cpp:1219–1224  ·  view source on GitHub ↗

NOLINTNEXTLINE(readability-convert-member-functions-to-static)

Source from the content-addressed store, hash-verified

1217JSValueRef JavaScriptRuntime::runtimeStartTraceRecording(JSFunctionNativeCallContext& callContext) {
1218 auto id = Tracer::shared().startRecording();
1219
1220 // Schedule auto stop recording to make sure we are not leaking.
1221 _dispatchQueue->asyncAfter([id]() { Tracer::shared().stopRecording(id); },
1222 std::chrono::seconds(kTraceRecordingTimeoutSeconds));
1223
1224 return callContext.getContext().newNumber(static_cast<int32_t>(id));
1225}
1226
1227static double traceTimePointToEpochMicroseconds(const TraceTimePoint& timePoint) {

Callers

nothing calls this directly

Calls 5

makeOpaqueFunction · 0.85
getParameterMethod · 0.80
withReturnValueMethod · 0.80
getContextMethod · 0.45

Tested by

no test coverage detected