Bug 488842 - Local Scope Variables are not displayed by default (r=mrbkap).

This commit is contained in:
Brendan Eich 2009-04-22 23:23:32 -07:00
parent 78c48d14b7
commit 1ebc547b81
2 changed files with 3 additions and 5 deletions

View File

@ -1411,9 +1411,7 @@ JS_GetPropertyDescArray(JSContext *cx, JSObject *obj, JSPropertyDescArray *pda)
return JS_TRUE;
}
n = STOBJ_NSLOTS(obj);
if (n > scope->entryCount)
n = scope->entryCount;
n = scope->entryCount;
pd = (JSPropertyDesc *) JS_malloc(cx, (size_t)n * sizeof(JSPropertyDesc));
if (!pd)
return JS_FALSE;

View File

@ -627,7 +627,7 @@ js_GetCallObject(JSContext *cx, JSStackFrame *fp)
JSObject *env = js_NewObjectWithGivenProto(cx, &js_DeclEnvClass, NULL,
fp->scopeChain, 0);
if (!env)
return JS_FALSE;
return NULL;
/* Root env. */
fp->scopeChain = env;
@ -646,7 +646,7 @@ js_GetCallObject(JSContext *cx, JSStackFrame *fp)
OBJECT_TO_JSVAL(fp->callee), NULL, NULL,
JSPROP_PERMANENT | JSPROP_READONLY,
0, 0, NULL)) {
return JS_FALSE;
return NULL;
}
fp->callobj = callobj;