зеркало из https://github.com/mozilla/pjs.git
Comment tweak, still avoids subjunctive but qualifies the crash case as fixed.
This commit is contained in:
Родитель
b1c77d0bf2
Коммит
f058fc4319
|
@ -420,16 +420,19 @@ MarkSharpObjects(JSContext *cx, JSObject *obj, JSIdArray **idap)
|
||||||
JS_ReportOutOfMemory(cx);
|
JS_ReportOutOfMemory(cx);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Increment map->depth to protect js_EnterSharpObject from reentering
|
* Increment map->depth to protect js_EnterSharpObject from reentering
|
||||||
* itself. If it does, then because it hasn't yet incremented
|
* itself badly. Without this fix, if we reenter the basis case where
|
||||||
* map->depth, we'll destroy the newly-created hash table and crash.
|
* map->depth == 0, when unwinding the inner call we will destroy the
|
||||||
|
* newly-created hash table and crash.
|
||||||
*/
|
*/
|
||||||
++map->depth;
|
++map->depth;
|
||||||
ida = JS_Enumerate(cx, obj);
|
ida = JS_Enumerate(cx, obj);
|
||||||
--map->depth;
|
--map->depth;
|
||||||
if (!ida)
|
if (!ida)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
ok = JS_TRUE;
|
ok = JS_TRUE;
|
||||||
for (i = 0, length = ida->length; i < length; i++) {
|
for (i = 0, length = ida->length; i < length; i++) {
|
||||||
id = ida->vector[i];
|
id = ida->vector[i];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче