From 4780c89ee1a4371f12bd535c820875acffd47739 Mon Sep 17 00:00:00 2001 From: "brendan%mozilla.org" Date: Sun, 8 Sep 2002 21:46:13 +0000 Subject: [PATCH] Fix old bogus error reporting suppression around shell's implicit ToString on command result values, and clean up related #if 0 cruft after it (167325, not part of default build). --- js/src/js.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/js/src/js.c b/js/src/js.c index e6ca33a09ab..897f647c5f9 100644 --- a/js/src/js.c +++ b/js/src/js.c @@ -370,31 +370,12 @@ Process(JSContext *cx, JSObject *obj, char *filename) ok = JS_ExecuteScript(cx, obj, script, &result); if (ok && result != JSVAL_VOID) { - /* Suppress error reports from JS_ValueToString(). */ - older = JS_SetErrorReporter(cx, NULL); str = JS_ValueToString(cx, result); - JS_SetErrorReporter(cx, older); - if (str) fprintf(gOutFile, "%s\n", JS_GetStringBytes(str)); else ok = JS_FALSE; } -#if 0 -#if JS_HAS_ERROR_EXCEPTIONS - /* - * Require that any time we return failure, an exception has - * been set. - */ - JS_ASSERT(ok || JS_IsExceptionPending(cx)); - - /* - * Also that any time an exception has been set, we've - * returned failure. - */ - JS_ASSERT(!JS_IsExceptionPending(cx) || !ok); -#endif /* JS_HAS_ERROR_EXCEPTIONS */ -#endif JS_DestroyScript(cx, script); } } while (!hitEOF);