diff --git a/devtools/client/storage/panel.js b/devtools/client/storage/panel.js index 8187e3f1c98..149e4adc093 100644 --- a/devtools/client/storage/panel.js +++ b/devtools/client/storage/panel.js @@ -57,7 +57,10 @@ StoragePanel.prototype = { this.emit("ready"); return this; - }).catch(this.destroy); + }).catch(e => { + console.log("error while opening storage panel", e); + this.destroy(); + }); }, /** diff --git a/devtools/client/storage/test/head.js b/devtools/client/storage/test/head.js index af918583746..b5a11da9f9a 100644 --- a/devtools/client/storage/test/head.js +++ b/devtools/client/storage/test/head.js @@ -490,6 +490,7 @@ function* selectTreeItem(ids) { let selector = "[data-id='" + JSON.stringify(ids) + "'] > .tree-widget-item"; let target = gPanelWindow.document.querySelector(selector); + ok(target, "tree item found with ids " + JSON.stringify(ids)); let updated = gUI.once("store-objects-updated"); @@ -506,6 +507,7 @@ function* selectTreeItem(ids) { function* selectTableItem(id) { let selector = ".table-widget-cell[data-id='" + id + "']"; let target = gPanelWindow.document.querySelector(selector); + ok(target, "table item found with ids " + id); yield click(target); yield gUI.once("sidebar-updated"); diff --git a/devtools/client/storage/ui.js b/devtools/client/storage/ui.js index 797bfd477a8..3b625f65ef6 100644 --- a/devtools/client/storage/ui.js +++ b/devtools/client/storage/ui.js @@ -341,11 +341,16 @@ StorageUI.prototype = { populateStorageTree: function(storageTypes) { this.storageTypes = {}; for (let type in storageTypes) { + // Ignore `from` field, which is just a protocol.js implementation artifact if (type === "from") { continue; } - - let typeLabel = L10N.getStr("tree.labels." + type); + let typeLabel = type; + try { + typeLabel = L10N.getStr("tree.labels." + type); + } catch(e) { + console.error("Unable to localize tree label type:" + type); + } this.tree.add([{id: type, label: typeLabel, type: "store"}]); if (!storageTypes[type].hosts) { continue; @@ -568,7 +573,12 @@ StorageUI.prototype = { if (!uniqueKey) { this.table.uniqueId = uniqueKey = key; } - columns[key] = L10N.getStr("table.headers." + type + "." + key); + columns[key] = key; + try { + columns[key] = L10N.getStr("table.headers." + type + "." + key); + } catch(e) { + console.error("Unable to localize table header type:" + type + " key:" + key); + } } this.table.setColumns(columns, null, HIDDEN_COLUMNS); this.shouldResetColumns = false;