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

Function contentLoaded

deps/v8/tools/sourcemap.mjs:107–125  ·  view source on GitHub ↗

* @param {?Protocol.Error} error * @param {number} statusCode * @param {NetworkAgent.Headers} headers * @param {string} content

(error, statusCode, headers, content)

Source from the content-addressed store, hash-verified

105 * @param {string} content
106 */
107 function contentLoaded(error, statusCode, headers, content)
108 {
109 if (error || !content || statusCode >= 400) {
110 console.error(`Could not load content for ${sourceMapURL} : ${error || (`HTTP status code: ${statusCode}`)}`);
111 callback(null);
112 return;
113 }
114
115 if (content.slice(0, 3) === ")]}")
116 content = content.substring(content.indexOf('\n'));
117 try {
118 const payload = /** @type {SourceMapV3} */ (JSON.parse(content));
119 const baseURL = sourceMapURL.startsWith("data:") ? compiledURL : sourceMapURL;
120 callback(new WebInspector.SourceMap(baseURL, payload));
121 } catch(e) {
122 console.error(e.message);
123 callback(null);
124 }
125 }
126}
127
128WebInspector.SourceMap.prototype = {

Callers

nothing calls this directly

Calls 5

sliceMethod · 0.65
parseMethod · 0.65
callbackFunction · 0.50
errorMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…