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

Function timerRemoveRef

src/internalBinding/timers.cc:98–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98static bool timerRemoveRef(JSContext *cx, unsigned argc, JS::Value *vp) {
99 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
100 double timeoutID = args.get(0).toNumber();
101
102 // Retrieve the AsyncHandle by `timeoutID`
103 AsyncHandle *handle = AsyncHandle::fromId((uint32_t)timeoutID);
104 if (!handle) return false; // error no such timeoutID
105
106 handle->removeRef();
107
108 args.rval().setUndefined();
109 return true;
110}
111
112static bool getDebugInfo(JSContext *cx, unsigned argc, JS::Value *vp) {
113 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);

Callers 1

unrefMethod · 0.85

Calls 2

getMethod · 0.80
removeRefMethod · 0.80

Tested by

no test coverage detected