зеркало из https://github.com/mozilla/gecko-dev.git
Bug 700915: Diagnostic for GC helper thread crashes. (r=billm)
This commit is contained in:
Родитель
e7b0cd4468
Коммит
04fb32706e
|
@ -1492,6 +1492,10 @@ class GCHelperThread {
|
|||
backgroundAllocation = false;
|
||||
}
|
||||
|
||||
PRThread *getThread() const {
|
||||
return thread;
|
||||
}
|
||||
|
||||
/*
|
||||
* Outside the GC lock may give true answer when in fact the sweeping has
|
||||
* been done.
|
||||
|
|
|
@ -359,6 +359,11 @@ RegExpPrivate::incref(JSContext *cx)
|
|||
inline void
|
||||
RegExpPrivate::decref(JSContext *cx)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
JS_OPT_ASSERT_IF(cx->runtime->gcHelperThread.getThread(),
|
||||
PR_GetCurrentThread() != cx->runtime->gcHelperThread.getThread());
|
||||
#endif
|
||||
|
||||
if (--refCount != 0)
|
||||
return;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче