From 1e09f02ed4968ca17b2517cd22e1d261a94a8d84 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 28 Oct 2019 18:45:31 +0000 Subject: [PATCH] Bug 1590589: Remove stray references to 'enabled' debuggers. r=jlast The Debugger.prototype.enabled accessor was removed in bug 1564168, but there are still a few stray references to 'enabled' or 'disabled' debuggers in the docs and the code. These should be cleaned up. Differential Revision: https://phabricator.services.mozilla.com/D48465 --HG-- extra : moz-landing-system : lando --- js/src/debugger/DebugAPI.h | 4 ++-- js/src/debugger/Debugger.cpp | 2 +- js/src/doc/Debugger/Debugger.Script.md | 3 +-- js/src/doc/Debugger/Debugger.md | 18 +++--------------- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/js/src/debugger/DebugAPI.h b/js/src/debugger/DebugAPI.h index 6aed2780de7b..0f5c458f614c 100644 --- a/js/src/debugger/DebugAPI.h +++ b/js/src/debugger/DebugAPI.h @@ -98,8 +98,8 @@ class DebugAPI { * * the Debugger JSObject is live (Debugger::trace handles this case); OR * * it is in the middle of dispatching an event (the event dispatching * code roots it in this case); OR - * * it is enabled, and it is debugging at least one live compartment, - * and at least one of the following is true: + * * it is debugging at least one live compartment, and at least one of the + * following is true: * - it has a debugger hook installed * - it has a breakpoint set on a live script * - it has a watchpoint set on a live object. diff --git a/js/src/debugger/Debugger.cpp b/js/src/debugger/Debugger.cpp index 565c179a4c72..e1f3ba3d8403 100644 --- a/js/src/debugger/Debugger.cpp +++ b/js/src/debugger/Debugger.cpp @@ -3736,7 +3736,7 @@ bool DebugAPI::markIteratively(GCMarker* marker) { if (!dbgMarked && dbg->hasAnyLiveHooks(rt)) { // obj could be reachable only via its live, enabled // debugger hooks, which may yet be called. - TraceEdge(marker, &dbgobj, "enabled Debugger"); + TraceEdge(marker, &dbgobj, "Debugger with live hooks"); markedAny = true; dbgMarked = true; } diff --git a/js/src/doc/Debugger/Debugger.Script.md b/js/src/doc/Debugger/Debugger.Script.md index 828b5ace0a4f..48e29c2d4f81 100644 --- a/js/src/doc/Debugger/Debugger.Script.md +++ b/js/src/doc/Debugger/Debugger.Script.md @@ -305,8 +305,7 @@ methods of other kinds of objects. debugger's compartment). The new breakpoint belongs to the [`Debugger`][debugger-object] instance to - which this script belongs. Disabling the [`Debugger`][debugger-object] - instance disables this breakpoint; and removing a global from the + which this script belongs. Removing a global from the [`Debugger`][debugger-object] instance's set of debuggees clears all the breakpoints belonging to that [`Debugger`][debugger-object] instance in that global's scripts. diff --git a/js/src/doc/Debugger/Debugger.md b/js/src/doc/Debugger/Debugger.md index af0b319b05d0..8446b8c0af1f 100644 --- a/js/src/doc/Debugger/Debugger.md +++ b/js/src/doc/Debugger/Debugger.md @@ -13,18 +13,6 @@ When called as a constructor, the `Debugger` object creates a new A `Debugger` instance inherits the following accessor properties from its prototype: -`enabled` -: A boolean value indicating whether this `Debugger` instance's handlers, - breakpoints, and the like are currently enabled. It is an - accessor property with a getter and setter: assigning to it enables or - disables this `Debugger` instance; reading it produces true if the - instance is enabled, or false otherwise. This property is initially - `true` in a freshly created `Debugger` instance. - - This property gives debugger code a single point of control for - disentangling itself from the debuggee, regardless of what sort of - events or handlers or "points" we add to the interface. - `allowUnobservedAsmJS` : A boolean value indicating whether asm.js code running inside this `Debugger` instance's debuggee globals is invisible to Debugger API @@ -48,7 +36,7 @@ its prototype: accessed via the [`Debugger.Script`][script] `getOffsetsCoverage` function. In some cases, the code coverage might expose information which pre-date the modification of this flag. Code coverage reports are monotone, - thus one can take a snapshot when the Debugger is enabled, and output the + thus one can take a snapshot when coverage first is enabled, and output the difference. Setting this to `false` prevents this `Debugger` instance from requiring any @@ -263,8 +251,8 @@ compartment. Note that, even though the presence of a `Debugger`'s `onNewGlobalObject` hook can have arbitrary side effects, the garbage collector does not consider the presence of the hook sufficient reason to keep the `Debugger` - alive. Thus, the behavior of code that uses `onNewGlobalObject` on unrooted, - enabled `Debugger`s may be affected by the garbage collector's activity, and + alive. Thus, the behavior of code that uses `onNewGlobalObject` on unrooted + `Debugger`s may be affected by the garbage collector's activity, and is not entirely deterministic.