Skip to content

Commit 22ff0d8

Browse files
szuendDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Remove unused hex view function
Now that we use the linear memory inspector in the BinaryResourceView, we no longer need to create a textual hex dump and can remove the corresponding function. [email protected] Bug: 375546679 Change-Id: I5450b11a69526362e573114805d9e4d5e6a12b0f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5979935 Reviewed-by: Eric Leese <[email protected]> Auto-Submit: Simon Zünd <[email protected]> Commit-Queue: Eric Leese <[email protected]>
1 parent 3735fff commit 22ff0d8

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -100,49 +100,4 @@ export class BinaryResourceViewFactory {
100100
}
101101
return hex;
102102
}
103-
104-
static uint8ArrayToHexViewer(array: Uint8Array): string {
105-
let output = '';
106-
let line = 0;
107-
108-
while ((line * 16) < array.length) {
109-
const lineArray = array.slice(line * 16, (line + 1) * 16);
110-
111-
// line number
112-
output += BinaryResourceViewFactory.numberToHex(line, 8) + ':';
113-
114-
// hex
115-
let hexColsPrinted = 0;
116-
for (let i = 0; i < lineArray.length; i++) {
117-
if (i % 2 === 0) {
118-
output += ' ';
119-
hexColsPrinted++;
120-
}
121-
output += BinaryResourceViewFactory.numberToHex(lineArray[i], 2);
122-
hexColsPrinted += 2;
123-
}
124-
125-
// hex-ascii padding
126-
while (hexColsPrinted < 42) {
127-
output += ' ';
128-
hexColsPrinted++;
129-
}
130-
131-
// ascii
132-
for (let i = 0; i < lineArray.length; i++) {
133-
const code = lineArray[i];
134-
if (code >= 32 && code <= 126) {
135-
// printable ascii character
136-
output += String.fromCharCode(code);
137-
} else {
138-
// non-printable
139-
output += '.';
140-
}
141-
}
142-
143-
output += '\n';
144-
line++;
145-
}
146-
return output;
147-
}
148103
}

0 commit comments

Comments
 (0)