1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sts=4 et sw=4 tw=99:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #include "js/TypeDecls.h"
14 // https://tc39.es/ecma262/#sec-getiterator
16 JSObject
* GetIteratorObject(JSContext
* cx
, Handle
<Value
> obj
, bool isAsync
);
18 // https://tc39.es/ecma262/#sec-iteratornext
19 bool IteratorNext(JSContext
* cx
, Handle
<JSObject
*> iteratorRecord
,
20 MutableHandle
<Value
> result
);
22 // https://tc39.es/ecma262/#sec-iteratorcomplete
23 bool IteratorComplete(JSContext
* cx
, Handle
<JSObject
*> iterResult
, bool* done
);
25 // https://tc39.es/ecma262/#sec-iteratorvalue
26 bool IteratorValue(JSContext
* cx
, Handle
<JSObject
*> iterResult
,
27 MutableHandle
<Value
> value
);
29 // Implements iteratorRecord.[[Iterator]]
30 bool GetIteratorRecordIterator(JSContext
* cx
, Handle
<JSObject
*> iteratorRecord
,
31 MutableHandle
<Value
> iterator
);
33 // Implements GetMethod(iterator, "return").
34 bool GetReturnMethod(JSContext
* cx
, Handle
<Value
> iterator
,
35 MutableHandle
<Value
> result
);
39 #endif /* js_Iterator_h */