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

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: Changed callbacks to promises, also fixed some tests that broke Created 3 years, 7 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 a421227f6948604a8c6629d045db4d983e8d2fbe..fa1f29e714fd6390b4dbc01b0ebfd1f52ac3dd18 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,18 @@
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;
- this._reportView = new UI.ReportView(database.databaseId.name);
+ var databaseName = Common.UIString('Loading\u2026'); // If database was not loaded yet when view was created
dgozman 2017/06/06 21:32:26 - we usually avoid comments like this which repeat
kristipark 2017/06/06 22:45:47 Done.
+ if (database)
+ databaseName = database.databaseId.name;
+
+ this._reportView = new UI.ReportView(databaseName);
this._reportView.show(this.contentElement);
var bodySection = this._reportView.appendSection('');
@@ -58,7 +62,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 +80,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