From ef563f04c4a014f519b0292ffe0e0212b3bfdd8b Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 28 Dec 2007 22:04:56 +0000 Subject: [PATCH] fix spidermonkey issue git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7007 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/js/src/jsexn.c | 1 + src/mod/languages/mod_spidermonkey/mod_spidermonkey.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/js/src/jsexn.c b/libs/js/src/jsexn.c index 74030db63a..a550e1fcd7 100644 --- a/libs/js/src/jsexn.c +++ b/libs/js/src/jsexn.c @@ -425,6 +425,7 @@ InitExceptionObject(JSContext *cx, JSObject *obj, JSString *message, APPEND_CHAR_TO_STACK('('); for (i = 0; i < fp->argc; i++) { + /* Avoid toSource bloat and fallibility for object types. */ v = fp->argv[i]; if (JSVAL_IS_PRIMITIVE(v)) { diff --git a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c index 2cb1d3ecd6..76dbef44f0 100644 --- a/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c +++ b/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c @@ -1120,13 +1120,12 @@ static switch_status_t js_common_callback(switch_core_session_t *session, void * jss->stack_depth++; - if (cb_state->jss_a && cb_state->jss_a->session && cb_state->jss_a->session == session) { argv[argc++] = OBJECT_TO_JSVAL(cb_state->session_obj_a); } else if (cb_state->jss_b && cb_state->jss_b->session && cb_state->jss_b->session == session) { argv[argc++] = OBJECT_TO_JSVAL(cb_state->session_obj_b); } else { - argv[argc++] = OBJECT_TO_JSVAL(cb_state->session_state); + argv[argc++] = OBJECT_TO_JSVAL(cb_state->session_state->obj); } switch (itype) {