MCPcopy Index your code
hub / github.com/nodejs/node / loadSymbolsRemote

Method loadSymbolsRemote

deps/v8/tools/tickprocessor.mjs:136–161  ·  view source on GitHub ↗
(platform, libName)

Source from the content-addressed store, hash-verified

134 async loadSymbols(libName) {}
135
136 async loadSymbolsRemote(platform, libName) {
137 this.parsePos = 0;
138 const url = new URL("http://localhost:8000/v8/loadVMSymbols");
139 url.searchParams.set('libName', libName);
140 url.searchParams.set('platform', platform);
141 this._setRemoteQueryParams(url.searchParams);
142 let response;
143 let json;
144 try {
145 response = await fetch(url, { timeout: 20 });
146 if (response.status == 404) {
147 throw new Error(
148 `Local symbol server returned 404: ${await response.text()}`);
149 }
150 json = await response.json();
151 if (json.error) console.warn(json.error);
152 } catch (e) {
153 if (!response || response.status == 404) {
154 // Assume that the local symbol server is not reachable.
155 console.warn("Disabling remote symbol loading:", e);
156 this._isEnabled = false;
157 return;
158 }
159 }
160 this._handleRemoteSymbolsResult(json);
161 }
162
163 _setRemoteQueryParams(searchParams) {
164 // Subclass responsibility.

Callers 2

loadSymbolsMethod · 0.80
loadSymbolsMethod · 0.80

Calls 7

_setRemoteQueryParamsMethod · 0.95
fetchFunction · 0.85
warnMethod · 0.80
textMethod · 0.65
jsonMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected