Bug 619777 obj_toSource guard of IS_SHARP instead of !ida confuses coverity

r=jorendorff
This commit is contained in:
timeless@mozdev.org 2011-05-03 12:31:20 -04:00
parent 39b2d9f4b9
commit 42dc21cbe6

View File

@ -505,13 +505,13 @@ obj_toSource(JSContext *cx, uintN argc, Value *vp)
ok = JS_FALSE;
goto out;
}
if (IS_SHARP(he)) {
if (!ida) {
/*
* We didn't enter -- obj is already "sharp", meaning we've visited it
* already in our depth first search, and therefore chars contains a
* string of the form "#n#".
*/
JS_ASSERT(!ida);
JS_ASSERT(IS_SHARP(he));
#if JS_HAS_SHARP_VARS
nchars = js_strlen(chars);
#else
@ -522,7 +522,7 @@ obj_toSource(JSContext *cx, uintN argc, Value *vp)
#endif
goto make_string;
}
JS_ASSERT(ida);
JS_ASSERT(!IS_SHARP(he));
ok = JS_TRUE;
if (!chars) {