зеркало из https://github.com/mozilla/gecko-dev.git
Bug 952873 part 1. Rename the cx member of ForOfIterator to cx_ instead. r=jorendorff
This commit is contained in:
Родитель
b93b85ae62
Коммит
d024735dbc
|
@ -1271,6 +1271,7 @@ const Class StopIterationObject::class_ = {
|
|||
bool
|
||||
ForOfIterator::init(HandleValue iterable)
|
||||
{
|
||||
JSContext *cx = cx_;
|
||||
RootedObject iterableObj(cx, ToObject(cx, iterable));
|
||||
if (!iterableObj)
|
||||
return false;
|
||||
|
@ -1313,6 +1314,7 @@ ForOfIterator::next(MutableHandleValue vp, bool *done)
|
|||
{
|
||||
JS_ASSERT(iterator);
|
||||
|
||||
JSContext *cx = cx_;
|
||||
RootedValue method(cx);
|
||||
if (!JSObject::getProperty(cx, iterator, iterator, cx->names().next, &method))
|
||||
return false;
|
||||
|
|
|
@ -239,14 +239,14 @@ namespace js {
|
|||
class ForOfIterator
|
||||
{
|
||||
private:
|
||||
JSContext *cx;
|
||||
JSContext *cx_;
|
||||
RootedObject iterator;
|
||||
|
||||
ForOfIterator(const ForOfIterator &) MOZ_DELETE;
|
||||
ForOfIterator &operator=(const ForOfIterator &) MOZ_DELETE;
|
||||
|
||||
public:
|
||||
ForOfIterator(JSContext *cx) : cx(cx), iterator(cx) { }
|
||||
ForOfIterator(JSContext *cx) : cx_(cx), iterator(cx) { }
|
||||
|
||||
bool init(HandleValue iterable);
|
||||
bool next(MutableHandleValue val, bool *done);
|
||||
|
|
Загрузка…
Ссылка в новой задаче