MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / getDebugInfo

Function getDebugInfo

src/internalBinding/timers.cc:112–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112static bool getDebugInfo(JSContext *cx, unsigned argc, JS::Value *vp) {
113 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
114 double timeoutID = args.get(0).toNumber();
115
116 // Retrieve the AsyncHandle by `timeoutID`
117 AsyncHandle *handle = AsyncHandle::fromId((uint32_t)timeoutID);
118 if (!handle) return false; // error no such timeoutID
119
120 JS::Value debugInfo = jsTypeFactory(cx, handle->getDebugInfo());
121 args.rval().set(debugInfo);
122 return true;
123}
124
125static bool getAllRefedTimersDebugInfo(JSContext *cx, unsigned argc, JS::Value *vp) {
126 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);

Callers

nothing calls this directly

Calls 4

jsTypeFactoryFunction · 0.85
getMethod · 0.80
getDebugInfoMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected