Bug 1647342 - Part 3: Remove unused detachAllDebuggersFromGlobal Debugger method. r=arai!
Summary:
I have no idea how long this has been stale.
Differential Revision:
https://phabricator.services.mozilla.com/D80736
Depends on D80735
Test Plan:
Reviewers:
Subscribers:
Bug #: 1647342
Differential Diff: PHID-DIFF-pm56s2opuy672eaeawhj
--- a/js/src/debugger/Debugger.cpp
+++ b/js/src/debugger/Debugger.cpp
@@ -3834,27 +3834,16 @@ void DebugAPI::sweepAll(JSFreeOp* fop) {
if (debuggerDying) {
fop->delete_(dbg->object, dbg, MemoryUse::Debugger);
}
dbg = next;
}
}
-/* static */
-void Debugger::detachAllDebuggersFromGlobal(JSFreeOp* fop,
- GlobalObject* global) {
- const Realm::DebuggerVector& debuggers = global->getDebuggers();
- MOZ_ASSERT(!debuggers.empty());
- while (!debuggers.empty()) {
- debuggers.back().dbg->removeDebuggeeGlobal(fop, global, nullptr,
- Debugger::FromSweep::No);
- }
-}
-
static inline bool SweepZonesInSameGroup(Zone* a, Zone* b) {
// Ensure two zones are swept in the same sweep group by adding an edge
// between them in each direction.
return a->addSweepGroupEdgeTo(b) && b->addSweepGroupEdgeTo(a);
}
/* static */
bool DebugAPI::findSweepGroupEdges(JSRuntime* rt) {
--- a/js/src/debugger/Debugger.h
+++ b/js/src/debugger/Debugger.h
@@ -1084,17 +1084,16 @@ class Debugger : private mozilla::Linked
Zone* zone() const { return toJSObject()->zone(); }
bool hasMemory() const;
DebuggerMemory& memory() const;
WeakGlobalObjectSet::Range allDebuggees() const { return debuggees.all(); }
- static void detachAllDebuggersFromGlobal(JSFreeOp* fop, GlobalObject* global);
#ifdef DEBUG
static bool isDebuggerCrossCompartmentEdge(JSObject* obj,
const js::gc::Cell* cell);
#endif
static bool hasLiveHook(GlobalObject* global, Hook which);
/*** Functions for use by Debugger.cpp. *********************************/