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

git-svn-id: svn://10.0.0.236/trunk@177633 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brendan%mozilla.org 2005-08-12 03:32:29 +00:00
parent 59ed7a18cc
commit 21176a96c5

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];