| 110 | } |
| 111 | |
| 112 | static 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 | |
| 125 | static bool getAllRefedTimersDebugInfo(JSContext *cx, unsigned argc, JS::Value *vp) { |
| 126 | JS::CallArgs args = JS::CallArgsFromVp(argc, vp); |
nothing calls this directly
no test coverage detected