Bug 608763 - JSD breakpoint does not work. r=gal

This commit is contained in:
Robert Sayre 2010-11-02 18:52:55 -07:00
Родитель e88571b375
Коммит f9288c4e87
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -2420,6 +2420,8 @@ nsXPConnect::CheckForDebugMode(JSRuntime *rt) {
return; return;
} }
JS_SetRuntimeDebugMode(rt, gDesiredDebugMode);
nsresult rv; nsresult rv;
const char jsdServiceCtrID[] = "@mozilla.org/js/jsd/debugger-service;1"; const char jsdServiceCtrID[] = "@mozilla.org/js/jsd/debugger-service;1";
nsCOMPtr<jsdIDebuggerService> jsds = do_GetService(jsdServiceCtrID, &rv); nsCOMPtr<jsdIDebuggerService> jsds = do_GetService(jsdServiceCtrID, &rv);
@ -2432,11 +2434,11 @@ nsXPConnect::CheckForDebugMode(JSRuntime *rt) {
} }
if (NS_SUCCEEDED(rv)) { if (NS_SUCCEEDED(rv)) {
JS_SetRuntimeDebugMode(rt, gDesiredDebugMode);
gDebugMode = gDesiredDebugMode; gDebugMode = gDesiredDebugMode;
} else { } else {
// if the attempt failed, cancel the debugMode request // if the attempt failed, cancel the debugMode request
gDesiredDebugMode = gDebugMode; gDesiredDebugMode = gDebugMode;
JS_SetRuntimeDebugMode(rt, gDebugMode);
} }
} }
} }