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

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: Better handling of null database in view, removed extra lines in test file, moved utility test func… 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..bbffbe971cfdf5967d7cc990a7f7ef12a7bb0379 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js
@@ -41,7 +41,11 @@ Resources.IDBDatabaseView = class extends UI.VBox {
this._model = model;
- this._reportView = new UI.ReportView(database.databaseId.name);
+ var databaseName = 'Loading...'; // If database was not loaded yet when view was created
dgozman 2017/06/02 21:48:41 We wrap any user-readable strings with Common.UISt
kristipark 2017/06/03 01:42:44 Done.
+ if (database)
+ databaseName = database.databaseId.name;
+
+ this._reportView = new UI.ReportView(databaseName);
this._reportView.show(this.contentElement);
var bodySection = this._reportView.appendSection('');
@@ -74,8 +78,11 @@ Resources.IDBDatabaseView = class extends UI.VBox {
* @param {!Resources.IndexedDBModel.Database} database
*/
update(database) {
- this._database = database;
- this._refreshDatabase();
+ if (database) {
dgozman 2017/06/02 21:48:41 The database is marked as non-null in line 78. How
kristipark 2017/06/03 01:42:44 The constructor calls update with a null database
+ this._database = database;
+ this._reportView.setTitle(this._database.databaseId.name);
+ this._refreshDatabase();
+ }
this._updatedForTests();
}

Powered by Google App Engine
This is Rietveld 408576698