зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1615710 - Remove the Debugger::lazyScripts weakmap. r=jandem
This can be combined with the Debugger::scripts map since keys will not conflict. This is now all possible since we use js::BaseScript as the root type. Depends on D64123 Differential Revision: https://phabricator.services.mozilla.com/D64124 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5603c8e0b3
Коммит
0ac67e20a4
|
@ -500,7 +500,6 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg)
|
|||
frames(cx->zone()),
|
||||
generatorFrames(cx),
|
||||
scripts(cx),
|
||||
lazyScripts(cx),
|
||||
sources(cx),
|
||||
objects(cx),
|
||||
environments(cx),
|
||||
|
@ -3518,7 +3517,6 @@ inline void Debugger::forEachWeakMap(const F& f) {
|
|||
f(objects);
|
||||
f(environments);
|
||||
f(scripts);
|
||||
f(lazyScripts);
|
||||
f(sources);
|
||||
f(wasmInstanceScripts);
|
||||
f(wasmInstanceSources);
|
||||
|
@ -3616,7 +3614,7 @@ bool DebugAPI::edgeIsInDebuggerWeakmap(JSRuntime* rt, JSObject* src,
|
|||
},
|
||||
[=](LazyScript* lazy) {
|
||||
return dst.is<LazyScript>() && lazy == &dst.as<LazyScript>() &&
|
||||
dbg->lazyScripts.hasEntry(lazy, src);
|
||||
dbg->scripts.hasEntry(lazy, src);
|
||||
},
|
||||
[=](WasmInstanceObject* instance) {
|
||||
return dst.is<JSObject>() && instance == &dst.as<JSObject>() &&
|
||||
|
@ -6156,7 +6154,7 @@ DebuggerScript* Debugger::wrapVariantReferent(
|
|||
// If there is an associated JSScript, this LazyScript is reachable from it,
|
||||
// so this LazyScript is canonical.
|
||||
untaggedReferent->setWrappedByDebugger();
|
||||
obj = wrapVariantReferent<LazyScript>(cx, lazyScripts, referent);
|
||||
obj = wrapVariantReferent<LazyScript>(cx, scripts, referent);
|
||||
} else {
|
||||
referent.template as<WasmInstanceObject*>();
|
||||
obj = wrapVariantReferent<WasmInstanceObject>(cx, wasmInstanceScripts,
|
||||
|
|
|
@ -749,7 +749,6 @@ class Debugger : private mozilla::LinkedListElement<Debugger> {
|
|||
// An ephemeral map from BaseScript* to Debugger.Script instances.
|
||||
using ScriptWeakMap = DebuggerWeakMap<BaseScript, DebuggerScript>;
|
||||
ScriptWeakMap scripts;
|
||||
ScriptWeakMap lazyScripts;
|
||||
|
||||
using BaseScriptVector = JS::GCVector<BaseScript*>;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче