Fix script->owner maintenance; also fix warning.

This commit is contained in:
Brendan Eich 2008-08-21 05:04:20 -07:00
parent 3bfbf75525
commit 65cd117dea

View File

@ -1342,6 +1342,9 @@ js_obj_eval(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
script->u.nextToGC = JS_SCRIPTS_TO_GC(cx);
JS_SCRIPTS_TO_GC(cx) = script;
#ifdef CHECK_SCRIPT_OWNER
script->owner = NULL;
#endif
out:
#if JS_HAS_EVAL_THIS_SCOPE
@ -4358,7 +4361,7 @@ js_Enumerate(JSContext *cx, JSObject *obj, JSIterateOp enum_op,
*statep = JSVAL_ZERO;
} else {
JS_ASSERT(length != 0);
JS_ASSERT(ne->cursor == length);
JS_ASSERT(ne->cursor == (jsword) length);
if (allocated != 0) {
JS_LOCK_GC(cx->runtime);
if (!js_AddAsGCBytes(cx, allocated)) {