Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(738)

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js

Issue 2914293002: [IndexedDB] [DevTools] Right-click 'Refresh' on database now updates object store view, also fixed … (Closed)
Patch Set: Using await instead Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js b/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
index 7380efe52ac12f14bad8000cc4a5596e93d1e16f..a782dbb2b97947f5592e359004a88382745023d2 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
@@ -34,14 +34,15 @@
Resources.IDBDatabaseView = class extends UI.VBox {
/**
* @param {!Resources.IndexedDBModel} model
- * @param {!Resources.IndexedDBModel.Database} database
+ * @param {?Resources.IndexedDBModel.Database} database
*/
constructor(model, database) {
super();
this._model = model;
+ var databaseName = database ? database.databaseId.name : Common.UIString('Loading\u2026');
- this._reportView = new UI.ReportView(database.databaseId.name);
+ this._reportView = new UI.ReportView(databaseName);
this._reportView.show(this.contentElement);
var bodySection = this._reportView.appendSection('');
@@ -58,7 +59,8 @@ Resources.IDBDatabaseView = class extends UI.VBox {
Common.UIString('Refresh database'));
footer.appendChild(this._refreshButton);
- this.update(database);
+ if (database)
+ this.update(database);
}
_refreshDatabase() {
@@ -75,6 +77,7 @@ Resources.IDBDatabaseView = class extends UI.VBox {
*/
update(database) {
this._database = database;
+ this._reportView.setTitle(this._database.databaseId.name);
this._refreshDatabase();
this._updatedForTests();
}

Powered by Google App Engine
This is Rietveld 408576698