Bug 449152 - js_CheckAccess should init out params on failure, r=brendan

This commit is contained in:
Blake Kaplan 2008-08-05 14:49:50 -07:00
parent 0055cc6179
commit 40e2a77e0b

View File

@ -4352,8 +4352,10 @@ js_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode,
/* Avoid diverging for non-natives that reuse js_CheckAccess. */
if (pobj->map->ops->checkAccess == js_CheckAccess) {
if (!writing)
if (!writing) {
*vp = JSVAL_VOID;
*attrsp = 0;
}
break;
}
return OBJ_CHECK_ACCESS(cx, pobj, id, mode, vp, attrsp);