Fix from wtc/kai for unsafe macro parameter (366869, r=me).

This commit is contained in:
brendan%mozilla.org 2007-01-13 00:41:19 +00:00
parent 216e1db43f
commit 50babdd79e

View File

@ -78,8 +78,12 @@ js_ThreadDestructorCB(void *ptr)
if (!thread)
return;
while (!JS_CLIST_IS_EMPTY(&thread->contextList))
JS_REMOVE_AND_INIT_LINK(thread->contextList.next);
while (!JS_CLIST_IS_EMPTY(&thread->contextList)) {
/* NB: must use a temporary, as the macro evaluates its actual twice. */
JSCList *link = thread->contextList.next;
JS_REMOVE_AND_INIT_LINK(link);
}
GSN_CACHE_CLEAR(&thread->gsnCache);
free(thread);
}