Bug 627758 - Detect forced GC end case to fix jsd.off() giving NS_ERROR_NOT_AVAILABLE, r=dmandelin

--HG--
extra : rebase_source : 6525e0b9abca2b0096d3fe0d5b8248dcfaebe7ba
This commit is contained in:
Steve Fink 2011-01-20 22:10:54 -08:00
Родитель 27b68d0c1e
Коммит 3d8f4dd57d
1 изменённых файлов: 10 добавлений и 3 удалений

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

@ -523,8 +523,14 @@ jsds_GCCallbackProc (JSContext *cx, JSGCStatus status)
}
gGCStatus = status;
if (gLastGCProc)
return gLastGCProc (cx, status);
if (gLastGCProc && !gLastGCProc (cx, status)) {
/*
* If gLastGCProc returns false, then we're going to abort out
* of this GC pass without a JSGC_END callback.
*/
gGCStatus = JSGC_END;
return JS_FALSE;
}
return JS_TRUE;
}
@ -2595,7 +2601,8 @@ jsdService::Off (void)
return NS_ERROR_NOT_AVAILABLE;
JSContext *cx = JSD_GetDefaultJSContext(mCx);
jsds_NotifyPendingDeadScripts(cx);
while (gDeadScripts)
jsds_NotifyPendingDeadScripts (cx);
}
/*