From 423ad7236e99d12713586489fb54a5f71c38893e Mon Sep 17 00:00:00 2001 From: "timeless@mozdev.org" Date: Sun, 6 Apr 2008 02:52:49 -0700 Subject: [PATCH] Bug 426311 report address for live contexts in JS_DestroyRuntime r=brendan a=beltzner --- js/src/jsapi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/src/jsapi.c b/js/src/jsapi.c index df5112eeb3f..7694f126ade 100644 --- a/js/src/jsapi.c +++ b/js/src/jsapi.c @@ -787,11 +787,15 @@ JS_DestroyRuntime(JSRuntime *rt) if (!JS_CLIST_IS_EMPTY(&rt->contextList)) { JSContext *cx, *iter = NULL; uintN cxcount = 0; - while ((cx = js_ContextIterator(rt, JS_TRUE, &iter)) != NULL) + while ((cx = js_ContextIterator(rt, JS_TRUE, &iter)) != NULL) { + fprintf(stderr, +"JS API usage error: found live context at %p\n", + cx); cxcount++; + } fprintf(stderr, -"JS API usage error: %u contexts left in runtime upon JS_DestroyRuntime.\n", - cxcount); +"JS API usage error: %u context%s left in runtime upon JS_DestroyRuntime.\n", + cxcount, (cxcount == 1) ? "" : "s"); } #endif