| 156 | }; |
| 157 | |
| 158 | static bool BytesIteratorConstructor(JSContext *cx, unsigned argc, JS::Value *vp) { |
| 159 | JS::CallArgs args = JS::CallArgsFromVp(argc, vp); |
| 160 | |
| 161 | if (!args.isConstructing()) { |
| 162 | JS_ReportErrorASCII(cx, "You must call this constructor with 'new'"); |
| 163 | return false; |
| 164 | } |
| 165 | |
| 166 | JS::RootedObject thisObj(cx, JS_NewObjectForConstructor(cx, &bytesIteratorClass, args)); |
| 167 | if (!thisObj) { |
| 168 | return false; |
| 169 | } |
| 170 | |
| 171 | args.rval().setObject(*thisObj); |
| 172 | return true; |
| 173 | } |
| 174 | |
| 175 | static bool DefineBytesIterator(JSContext *cx, JS::HandleObject global) { |
| 176 | JS::RootedObject iteratorPrototype(cx); |
nothing calls this directly
no outgoing calls
no test coverage detected