[gjs/wip/xulrunner-1.9.3-rebase2] [SQUASH] fix up rooting of debugger



commit bd8023346a158f11aa1a8620ae63eb8ec08a06bc
Author: Colin Walters <walters verbum org>
Date:   Mon Sep 20 11:40:10 2010 -0400

    [SQUASH] fix up rooting of debugger

 modules/debugger.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/modules/debugger.c b/modules/debugger.c
index 592978e..b7dc6a6 100644
--- a/modules/debugger.c
+++ b/modules/debugger.c
@@ -75,6 +75,12 @@ gjs_debugger_debug_error_hook(JSContext     *context,
         exc = JSVAL_NULL;
     }
 
+    for (i = 0; i < 7; i++) {
+        argv[i] = JSVAL_NULL;
+        JS_AddValueRoot(context, &argv[i]);
+    }
+    JS_AddValueRoot(context, &retval);
+
     str = JS_NewStringCopyZ(context, message);
     if (!str)
         goto out;
@@ -93,10 +99,6 @@ gjs_debugger_debug_error_hook(JSContext     *context,
         goto out;
     argv[6] = exc;
 
-    for (i = 0; i < 7; i++)
-        JS_AddValueRoot(context, &argv[i]);
-    JS_AddValueRoot(context, &retval);
-
     gjs_closure_invoke(closure, 7, argv, &retval);
 
  out:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]