Comment tweak, still avoids subjunctive but qualifies the crash case as fixed.

This commit is contained in:
brendan%mozilla.org 2005-08-12 03:32:29 +00:00
parent 0b1d3380cd
commit 8a7b609c4e

View File

@ -420,16 +420,19 @@ MarkSharpObjects(JSContext *cx, JSObject *obj, JSIdArray **idap)
JS_ReportOutOfMemory(cx);
return NULL;
}
/*
* Increment map->depth to protect js_EnterSharpObject from reentering
* itself. If it does, then because it hasn't yet incremented
* map->depth, we'll destroy the newly-created hash table and crash.
* itself badly. Without this fix, if we reenter the basis case where
* map->depth == 0, when unwinding the inner call we will destroy the
* newly-created hash table and crash.
*/
++map->depth;
ida = JS_Enumerate(cx, obj);
--map->depth;
if (!ida)
return NULL;
ok = JS_TRUE;
for (i = 0, length = ida->length; i < length; i++) {
id = ida->vector[i];