Commit 13d08bc3 authored by cbruni's avatar cbruni Committed by Commit bot

[tools] make ic-explorer deal with empty map records from --trace-ic

BUG=

Review-Url: https://codereview.chromium.org/2062323003
Cr-Commit-Position: refs/heads/master@{#37025}
parent a49c4b0a
......@@ -71,7 +71,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
if (offset == -1) return
this.state = parts[++offset];
this.map = parts[offset + 1];
if (this.map.startsWith("map=")) {
if (this.map !== undefined && this.map.startsWith("map=")) {
this.map = this.map.substring(4);
offset++;
} else {
......@@ -217,6 +217,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
function escapeHtml(unsafe) {
if (!unsafe) return "";
return unsafe.toString()
.replace(/&/g, "&")
.replace(/</g, "&lt;")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment