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}
77
78constexpr double kMaxStackSizeRatio = 0.75;
79
80static int handleInterrupt(JSRuntime* rt, void* opaque) {
81 auto& jsContext = *reinterpret_cast<QuickJSJavaScriptContext*>(opaque);
82 if (jsContext.interruptRequested()) {
83 return jsContext.onInterrupt() ? 1 : 0;
84 }
85 return 0;
86}
87

Callers

nothing calls this directly

Calls 2

interruptRequestedMethod · 0.80
onInterruptMethod · 0.45

Tested by

no test coverage detected