| 122 | static JSClass iterableIteratorClass = {"IterableIterator", JSCLASS_HAS_RESERVED_SLOTS(IterableIteratorSlotCount)}; |
| 123 | |
| 124 | static bool iterator_next(JSContext *cx, unsigned argc, JS::Value *vp) { |
| 125 | JS::CallArgs args = JS::CallArgsFromVp(argc, vp); |
| 126 | JS::RootedObject thisObj(cx); |
| 127 | if (!args.computeThis(cx, &thisObj)) return false; |
| 128 | |
| 129 | PyObject *it = JS::GetMaybePtrFromReservedSlot<PyObject>(thisObj, IterableIteratorSlotIterableObject); |
| 130 | |
| 131 | return iter_next(cx, args, it); |
| 132 | } |
| 133 | |
| 134 | static JSFunctionSpec iterable_iterator_methods[] = { |
| 135 | JS_FN("next", iterator_next, 0, JSPROP_ENUMERATE), |
nothing calls this directly
no test coverage detected