[gjs/mozjs78: 45/50] debugger: Remove Debugger.enabled property
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/mozjs78: 45/50] debugger: Remove Debugger.enabled property
- Date: Tue, 4 Aug 2020 06:31:40 +0000 (UTC)
commit f429838bea64f9086553de75e54440ff92e27db8
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Jul 27 22:43:53 2020 -0700
debugger: Remove Debugger.enabled property
This was removed in https://bugzilla.mozilla.org/show_bug.cgi?id=1564168
and is no longer needed. Switching off the debugger is replaced by
Debugger.removeAllDebuggees(), other uses can just be dropped.
See: GNOME/gjs#329
modules/script/_bootstrap/debugger.js | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/modules/script/_bootstrap/debugger.js b/modules/script/_bootstrap/debugger.js
index 8013055e..a48d3975 100644
--- a/modules/script/_bootstrap/debugger.js
+++ b/modules/script/_bootstrap/debugger.js
@@ -182,7 +182,7 @@ function evalCommand(expr) {
}
function quitCommand() {
- dbg.enabled = false;
+ dbg.removeAllDebuggees();
quit(0);
}
quitCommand.summary = 'Quit the debugger';
@@ -245,16 +245,10 @@ function doPrint(expr, style) {
? debuggeeGlobalWrapper.executeInGlobalWithBindings(expr, debuggeeValues)
: focusedFrame.evalWithBindings(expr, debuggeeValues));
if (cv === null) {
- if (!dbg.enabled)
- return [cv];
print('Debuggee died.');
} else if ('return' in cv) {
- if (!dbg.enabled)
- return [undefined];
showDebuggeeValue(cv['return'], style);
} else {
- if (!dbg.enabled)
- return [cv];
print("Exception caught. (To rethrow it, type 'throw'.)");
lastExc = cv.throw;
showDebuggeeValue(lastExc, style);
@@ -285,7 +279,7 @@ PARAMETER
ยท obj: object to get keys of`;
function detachCommand() {
- dbg.enabled = false;
+ dbg.removeAllDebuggees();
return [undefined];
}
detachCommand.summary = 'Detach debugger from the script';
@@ -317,15 +311,11 @@ function throwOrReturn(rest, action, defaultCompletion) {
const cv = saveExcursion(() => focusedFrame.eval(rest));
if (cv === null) {
- if (!dbg.enabled)
- return [cv];
print(`Debuggee died while determining what to ${action}. Stopped.`);
return;
}
if ('return' in cv)
return [{[action]: cv['return']}];
- if (!dbg.enabled)
- return [cv];
print(`Exception determining what to ${action}. Stopped.`);
showDebuggeeValue(cv.throw);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]