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

Function handleInterrupt

valdi/src/valdi/quickjs/QuickJSJavaScriptContext.cpp:78–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77constexpr double kMaxStackSizeRatio = 0.75;
78
79static int handleInterrupt(JSRuntime* rt, void* opaque) {
80 auto& jsContext = *reinterpret_cast<QuickJSJavaScriptContext*>(opaque);
81 if (jsContext.interruptRequested()) {
82 jsContext.onInterrupt();
83 }
84 return 0;
85}
86
87QuickJSJavaScriptContext::QuickJSJavaScriptContext(Valdi::JavaScriptTaskScheduler* taskScheduler)

Callers

nothing calls this directly

Calls 2

interruptRequestedMethod · 0.80
onInterruptMethod · 0.45

Tested by

no test coverage detected