[gjs] Fix previous commit
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gjs] Fix previous commit
- Date: Wed, 15 Dec 2010 23:54:57 +0000 (UTC)
commit 8c9b27fdae70dfc285db12b929c66f78722b5f1a
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date:   Thu Dec 16 00:36:36 2010 +0100
    Fix previous commit
    
    Don"t append 2 times the frame number and the function name
 gjs/stack.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gjs/stack.c b/gjs/stack.c
index 6c852c1..92b589d 100644
--- a/gjs/stack.c
+++ b/gjs/stack.c
@@ -120,6 +120,8 @@ format_frame(JSContext* cx, JSStackFrame* fp,
             funname_str = JS_GetFunctionName(fun);
 #else
             funname = JS_GetFunctionId(fun);
+            if (funname)
+                funname_str = gjs_string_get_ascii(cx, STRING_TO_JSVAL(funname));
 #endif
 
         call_obj = JS_GetFrameCallObject(cx, fp);
@@ -145,12 +147,6 @@ format_frame(JSContext* cx, JSStackFrame* fp,
 
     /* print the frame number and function name */
 
-#ifndef HAVE_JS_GETFUNCTIONNAME
-    if (funname) {
-        funname_str = gjs_string_get_ascii(cx, STRING_TO_JSVAL(funname));
-        g_string_append_printf(buf, "%d %s(", num, funname_str);
-    }
-#endif
     if (funname_str) {
         g_string_append_printf(buf, "%d %s(", num, funname_str);
 #ifndef HAVE_JS_GETFUNCTIONNAME
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]