MCPcopy Create free account
hub / github.com/Snapchat/Valdi / _removeAllScripts

Method _removeAllScripts

valdi/vscode_debugger/src/adapter/threads.ts:1129–1144  ·  view source on GitHub ↗
(silent = false)

Source from the content-addressed store, hash-verified

1127 }
1128
1129 private _removeAllScripts(silent = false) {
1130 const scripts = Array.from(this._sourceContainer.scriptsById.values());
1131 this._sourceContainer.scriptsById.clear();
1132 this._scriptSources.clear();
1133 Promise.all(
1134 scripts.map(script =>
1135 script.source.then(source => {
1136 const set = this.scriptsFromSource(source);
1137 set.delete(script);
1138 if (!set.size) {
1139 this._sourceContainer.removeSource(source, silent);
1140 }
1141 }),
1142 ),
1143 );
1144 }
1145
1146 private _onScriptParsed(event: Cdp.Debugger.ScriptParsedEvent) {
1147 if (this._sourceContainer.scriptsById.has(event.scriptId)) {

Callers 2

disposeMethod · 0.95

Calls 9

scriptsFromSourceMethod · 0.95
valuesMethod · 0.80
removeSourceMethod · 0.80
clearMethod · 0.65
allMethod · 0.65
thenMethod · 0.65
deleteMethod · 0.65
fromMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected