Bug 884065 - Assert if JS_DestroyContext is called with active exact rooters; r=sfink

--HG--
extra : rebase_source : 52f7c9f90075b69f3c40bf7c7e9df0e1b2e25c05
This commit is contained in:
Terrence Cole 2013-06-17 16:20:25 -07:00
parent 870a22f5ff
commit 3f8d6ad74f

View File

@ -348,6 +348,11 @@ js::DestroyContext(JSContext *cx, DestroyContextMode mode)
MOZ_CRASH();
#endif
#if (defined(JSGC_ROOT_ANALYSIS) || defined(JSGC_USE_EXACT_ROOTING)) && defined(DEBUG)
for (int i = 0; i < THING_ROOT_LIMIT; ++i)
JS_ASSERT(cx->thingGCRooters[i] == NULL);
#endif
if (mode != DCM_NEW_FAILED) {
if (JSContextCallback cxCallback = rt->cxCallback) {
/*