MCPcopy Create free account
hub / github.com/nodejs/node / dumpAllLocations

Function dumpAllLocations

deps/v8/test/inspector/debugger/break-locations-await.js:106–119  ·  view source on GitHub ↗
(locations)

Source from the content-addressed store, hash-verified

104]);
105
106function dumpAllLocations(locations) {
107 var lines = source.split('\n');
108 var locations = locations.sort((loc1, loc2) => {
109 if (loc2.lineNumber !== loc1.lineNumber) return loc2.lineNumber - loc1.lineNumber;
110 return loc2.columnNumber - loc1.columnNumber;
111 });
112 for (var location of locations) {
113 var line = lines[location.lineNumber];
114 line = line.slice(0, location.columnNumber) + locationMark(location.type) + line.slice(location.columnNumber);
115 lines[location.lineNumber] = line;
116 }
117 lines = lines.filter(line => line.indexOf('//# sourceURL=') === -1);
118 InspectorTest.log(lines.join('\n') + '\n');
119}
120
121function locationMark(type) {
122 if (type === 'return') return '|R|';

Callers 1

Calls 8

locationMarkFunction · 0.85
sortMethod · 0.80
sliceMethod · 0.65
filterMethod · 0.65
splitMethod · 0.45
indexOfMethod · 0.45
logMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected