Bug 566651 - Actually store the result in vp. r=jorendorff
This commit is contained in:
@@ -225,6 +225,10 @@ ValueIsLength(JSContext *cx, jsval* vp)
|
||||
length = (jsuint) d;
|
||||
if (d != (jsdouble) length)
|
||||
goto error;
|
||||
if (!js_NewNumberInRootedValue(cx, d, vp)) {
|
||||
*vp = JSVAL_NULL;
|
||||
return 0;
|
||||
}
|
||||
return length;
|
||||
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user