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

Method onInterrupt

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

Source from the content-addressed store, hash-verified

3624 jsContext.newNumber(static_cast<int32_t>(eventType)),
3625 JSValueRef::makeUnretained(jsContext, daemonClient),
3626 JSValueRef::makeUnretained(jsContext, payload),
3627 };
3628
3629 JSFunctionCallContext callContext(jsContext, params.begin(), params.size(), exceptionTracker);
3630
3631 jsContext.callObjectAsFunction(onDaemonClientEventFunction, callContext);
3632 if (!exceptionTracker) {
3633 onRecoverableError("notifyDaemonClientEvent", exceptionTracker);
3634 }
3635}
3636
3637void JavaScriptRuntime::setDefaultViewManagerContext(const Ref<ViewManagerContext>& viewManagerContext) {
3638 dispatchOnJsThreadUnattributed([=](auto& /*entry*/) { _defaultViewManagerContext = viewManagerContext; });
3639}
3640
3641std::future<Result<DumpedLogs>> JavaScriptRuntime::dumpLogs(bool includeMetadata, bool includeVerbose) {
3642 auto promise = Valdi::makeShared<std::promise<Result<DumpedLogs>>>();
3643 auto future = promise->get_future();
3644
3645 dispatchOnJsThreadUnattributed([promise, this, includeMetadata, includeVerbose](
3646 JavaScriptEntryParameters& jsEntry) {

Callers 5

callAsFunctionFunction · 0.45
handleInterruptFunction · 0.45
jsCallFunction · 0.45
InvokeCallableFunction · 0.45
callTrampolineFunction · 0.45

Calls 5

setCapturedStacktraceMethod · 0.80
getStackTraceMethod · 0.65
emptyMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected