Fix a JSBool-returning function to return false rather than NULL in one place, and use the func-to-pointer macro to avoid two further warnings. r+a=warning-fix

--HG--
extra : rebase_source : 8d7ff178c8e6c25c68dd26e1124b66dcbd333627
This commit is contained in:
Jeff Walden 2011-02-17 14:21:52 -08:00
Родитель e85d4b4d51
Коммит 10125fb5cf
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -4772,7 +4772,7 @@ js_DefineNativeProperty(JSContext *cx, JSObject *obj, jsid id, const Value &valu
JS_ASSERT(existingShape->getter() != getter);
if (!obj->methodReadBarrier(cx, *existingShape, &valueCopy))
return NULL;
return false;
}
} else {
adding = true;
@ -6810,14 +6810,14 @@ DumpProperty(JSObject *obj, const Shape &shape)
if (shape.hasGetterValue())
fprintf(stderr, "getterValue=%p ", (void *) shape.getterObject());
else if (!shape.hasDefaultGetter())
fprintf(stderr, "getterOp=%p ", (void *) shape.getterOp());
fprintf(stderr, "getterOp=%p ", JS_FUNC_TO_DATA_PTR(void *, shape.getterOp()));
if (shape.hasSetterValue())
fprintf(stderr, "setterValue=%p ", (void *) shape.setterObject());
else if (shape.setterOp() == js_watch_set)
fprintf(stderr, "setterOp=js_watch_set ");
else if (!shape.hasDefaultSetter())
fprintf(stderr, "setterOp=%p ", (void *) shape.setterOp());
fprintf(stderr, "setterOp=%p ", JS_FUNC_TO_DATA_PTR(void *, shape.setterOp()));
if (JSID_IS_ATOM(id))
dumpString(JSID_TO_STRING(id));