From f9288c4e87e8fbcc87e4ef8f4f960b03e8fbca05 Mon Sep 17 00:00:00 2001 From: Robert Sayre Date: Tue, 2 Nov 2010 18:52:55 -0700 Subject: [PATCH] Bug 608763 - JSD breakpoint does not work. r=gal --- js/src/xpconnect/src/nsXPConnect.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/xpconnect/src/nsXPConnect.cpp b/js/src/xpconnect/src/nsXPConnect.cpp index 744805d670d..829a1e5081b 100644 --- a/js/src/xpconnect/src/nsXPConnect.cpp +++ b/js/src/xpconnect/src/nsXPConnect.cpp @@ -2420,6 +2420,8 @@ nsXPConnect::CheckForDebugMode(JSRuntime *rt) { return; } + JS_SetRuntimeDebugMode(rt, gDesiredDebugMode); + nsresult rv; const char jsdServiceCtrID[] = "@mozilla.org/js/jsd/debugger-service;1"; nsCOMPtr jsds = do_GetService(jsdServiceCtrID, &rv); @@ -2432,11 +2434,11 @@ nsXPConnect::CheckForDebugMode(JSRuntime *rt) { } if (NS_SUCCEEDED(rv)) { - JS_SetRuntimeDebugMode(rt, gDesiredDebugMode); gDebugMode = gDesiredDebugMode; } else { // if the attempt failed, cancel the debugMode request gDesiredDebugMode = gDebugMode; + JS_SetRuntimeDebugMode(rt, gDebugMode); } } }