Defend against null acx->thread in js_GC, in case JS_ClearContextThread is used for context-pooling (345365, r=feng).

This commit is contained in:
brendan%mozilla.org 2006-07-21 19:09:36 +00:00
Родитель ca475e47fe
Коммит 154cd0d3ae
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -2511,7 +2511,7 @@ js_GC(JSContext *cx, uintN gcflags)
memset(cx->thread->gcFreeLists, 0, sizeof cx->thread->gcFreeLists);
iter = NULL;
while ((acx = js_ContextIterator(rt, JS_FALSE, &iter)) != NULL) {
if (acx->thread == cx->thread)
if (!acx->thread || acx->thread == cx->thread)
continue;
memset(acx->thread->gcFreeLists, 0, sizeof acx->thread->gcFreeLists);
}