Weaken the assertion in JS_ShutDown into a stderr printf, and hope (ha, ha, ha) that people will pay attention to it at all. Followup to bug 896124, rs=luke over IRC

--HG--
extra : rebase_source : 4665a8596682aefefb5d3535d692b86178931a41
This commit is contained in:
Jeff Walden 2013-08-02 14:00:35 -07:00
parent 7de7d90131
commit bdad3f198c

View File

@ -706,8 +706,15 @@ JS_ShutDown(void)
{
MOZ_ASSERT(jsInitState == Running,
"JS_ShutDown must only be called after JS_Init and can't race with it");
MOZ_ASSERT(!JSRuntime::hasLiveRuntimes(),
"forgot to destroy a runtime before shutting down");
#ifdef DEBUG
if (JSRuntime::hasLiveRuntimes()) {
// Gecko is too buggy to assert this just yet.
fprintf(stderr,
"WARNING: YOU ARE LEAKING THE WORLD (at least one JSRuntime "
"and everything alive inside it, that is) AT JS_ShutDown "
"TIME. FIX THIS!\n");
}
#endif
PRMJ_NowShutdown();