зеркало из https://github.com/mozilla/gecko-dev.git
Bug 779196 - Fix some initializing pointer as bool warnings r=luke
This commit is contained in:
Родитель
82b0886e37
Коммит
cde59970f9
|
@ -20,7 +20,7 @@
|
|||
|
||||
using namespace js;
|
||||
|
||||
|
||||
|
||||
/*** OrderedHashTable ****************************************************************************/
|
||||
|
||||
/*
|
||||
|
@ -794,16 +794,16 @@ MapIteratorObject::create(JSContext *cx, HandleObject mapobj, ValueMap *data)
|
|||
Rooted<GlobalObject *> global(cx, &mapobj->global());
|
||||
Rooted<JSObject*> proto(cx, global->getOrCreateMapIteratorPrototype(cx));
|
||||
if (!proto)
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
ValueMap::Range *range = cx->new_<ValueMap::Range>(data->all());
|
||||
if (!range)
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
JSObject *iterobj = NewObjectWithGivenProto(cx, &MapIteratorClass, proto, global);
|
||||
if (!iterobj) {
|
||||
cx->delete_(range);
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
iterobj->setSlot(TargetSlot, ObjectValue(*mapobj));
|
||||
iterobj->setSlot(RangeSlot, PrivateValue(range));
|
||||
|
@ -1239,16 +1239,16 @@ SetIteratorObject::create(JSContext *cx, HandleObject setobj, ValueSet *data)
|
|||
Rooted<GlobalObject *> global(cx, &setobj->global());
|
||||
Rooted<JSObject*> proto(cx, global->getOrCreateSetIteratorPrototype(cx));
|
||||
if (!proto)
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
ValueSet::Range *range = cx->new_<ValueSet::Range>(data->all());
|
||||
if (!range)
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
JSObject *iterobj = NewObjectWithGivenProto(cx, &SetIteratorClass, proto, global);
|
||||
if (!iterobj) {
|
||||
cx->delete_(range);
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
iterobj->setSlot(TargetSlot, ObjectValue(*setobj));
|
||||
iterobj->setSlot(RangeSlot, PrivateValue(range));
|
||||
|
|
Загрузка…
Ссылка в новой задаче