Adding another possible case for addThread to expect. One common case that triggers is is when both arguments to addThread are the same thread (such as the call from attachThread). SWT on darwin seems to do this for dialog boxes.

This commit is contained in:
Mike Keesey 2013-07-14 15:59:43 -06:00
parent ccebdb2107
commit aab1b6e087

View File

@ -1995,7 +1995,7 @@ addThread(Thread* t, Thread* p)
ACQUIRE_RAW(t, t->m->stateLock);
assert(t, p->state == Thread::NoState);
expect(t, t->state == Thread::ActiveState || t->state == Thread::ExclusiveState);
expect(t, t->state == Thread::ActiveState || t->state == Thread::ExclusiveState || t->state == Thread::NoState);
p->state = Thread::IdleState;
++ t->m->threadCount;