| 1869 | }; |
| 1870 | |
| 1871 | static bool ListIteratorConstructor(JSContext *cx, unsigned argc, JS::Value *vp) { |
| 1872 | JS::CallArgs args = JS::CallArgsFromVp(argc, vp); |
| 1873 | |
| 1874 | if (!args.isConstructing()) { |
| 1875 | JS_ReportErrorASCII(cx, "You must call this constructor with 'new'"); |
| 1876 | return false; |
| 1877 | } |
| 1878 | |
| 1879 | JS::RootedObject thisObj(cx, JS_NewObjectForConstructor(cx, &listIteratorClass, args)); |
| 1880 | if (!thisObj) { |
| 1881 | return false; |
| 1882 | } |
| 1883 | |
| 1884 | args.rval().setObject(*thisObj); |
| 1885 | return true; |
| 1886 | } |
| 1887 | |
| 1888 | static bool DefineListIterator(JSContext *cx, JS::HandleObject global) { |
| 1889 | JS::RootedObject iteratorPrototype(cx); |
nothing calls this directly
no outgoing calls
no test coverage detected