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

Issue 2914293002: [IndexedDB] [DevTools] Right-click 'Refresh' on database now updates object store view, also fixed … (Closed)

Created:
3 years, 6 months ago by kristipark
Modified:
3 years, 6 months ago
Reviewers:
dgozman, dmurph
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Right-click 'Refresh' on database now updates object store view, also fixed IndexedDB view crash. The crash was being caused by a null pointer exception in the view constructor since _database in Resources.IDBDatabaseTreeElement was not loaded/stored before the view was constructed. Adding a null check before constructing the view stops the exception. BUG=727908, 728450 Review-Url: https://codereview.chromium.org/2914293002 Cr-Commit-Position: refs/heads/master@{#478073} Committed: https://chromium.googlesource.com/chromium/src/+/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec

Patch Set 1 #

Total comments: 4

Patch Set 2 : Better handling of null database in view, removed extra lines in test file, moved utility test func… #

Total comments: 10

Patch Set 3 : Changed callbacks to promises, also fixed some tests that broke #

Total comments: 4

Patch Set 4 : Changed to event listener #

Total comments: 6

Patch Set 5 : Rebased here, looks like model has been changed to use promises #

Patch Set 6 : Using await instead #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -135 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-data-expected.txt View 1 2 1 chunk +12 lines, -12 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-names-expected.txt View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html View 1 2 5 chunks +33 lines, -84 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view-expected.txt View 1 chunk +13 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-structure-expected.txt View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js View 1 2 chunks +72 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/resources-panel-expected.txt View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/upgrade-events-expected.txt View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/resources/IndexedDBModel.js View 1 2 3 4 5 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/ReportView.js View 1 1 chunk +11 lines, -1 line 0 comments Download

Messages

Total messages: 24 (9 generated)
kristipark
3 years, 6 months ago (2017-06-01 21:30:02 UTC) #3
dmurph
https://codereview.chromium.org/2914293002/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html File third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html (right): https://codereview.chromium.org/2914293002/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html#newcode186 third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html:186: await InspectorTest.evaluateInPageAsync("addIDBValue('" + databaseName + "', '" + objectStoreName2 ...
3 years, 6 months ago (2017-06-01 22:50:31 UTC) #4
kristipark
Moved null handling into IDBDatabaseView, otherwise user would be presented with a blank view until ...
3 years, 6 months ago (2017-06-02 00:16:56 UTC) #5
dmurph
https://codereview.chromium.org/2914293002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html File third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html (right): https://codereview.chromium.org/2914293002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html#newcode26 third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html:26: function waitRefreshDatabaseRightClick(callback) { You use a lot of these ...
3 years, 6 months ago (2017-06-02 19:22:06 UTC) #6
dgozman
https://codereview.chromium.org/2914293002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js File third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js (right): https://codereview.chromium.org/2914293002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js#newcode318 third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js:318: var promise = new Promise((fulfill) => callback = fulfill); ...
3 years, 6 months ago (2017-06-02 21:48:42 UTC) #7
kristipark
https://codereview.chromium.org/2914293002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html File third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html (right): https://codereview.chromium.org/2914293002/diff/20001/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html#newcode26 third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html:26: function waitRefreshDatabaseRightClick(callback) { On 2017/06/02 19:22:05, dmurph wrote: > ...
3 years, 6 months ago (2017-06-03 01:42:44 UTC) #8
dmurph
non-owners lgtm :)
3 years, 6 months ago (2017-06-05 21:47:39 UTC) #9
dgozman
https://codereview.chromium.org/2914293002/diff/40001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js File third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js (right): https://codereview.chromium.org/2914293002/diff/40001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js#newcode1091 third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js:1091: this._idbDatabaseTreeElements[i]._refreshIndexedDB(); Instead of calling this directly, tree elements should ...
3 years, 6 months ago (2017-06-06 21:32:26 UTC) #10
kristipark
Thanks for the review! https://codereview.chromium.org/2914293002/diff/40001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js File third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js (right): https://codereview.chromium.org/2914293002/diff/40001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js#newcode1091 third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js:1091: this._idbDatabaseTreeElements[i]._refreshIndexedDB(); On 2017/06/06 21:32:26, dgozman ...
3 years, 6 months ago (2017-06-06 22:45:48 UTC) #11
dgozman
https://codereview.chromium.org/2914293002/diff/60001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js File third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js (right): https://codereview.chromium.org/2914293002/diff/60001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js#newcode1089 third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js:1089: indexedDBModel.refreshDatabaseNames(); // Adds IDBDatabaseTreeElements. Remove the comment. https://codereview.chromium.org/2914293002/diff/60001/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js#newcode1179 third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js:1179: ...
3 years, 6 months ago (2017-06-07 21:22:05 UTC) #12
kristipark
Rebased for another CL. Letting you know that it looks like the model has been ...
3 years, 6 months ago (2017-06-08 01:04:10 UTC) #16
kristipark
Actually, the promises I used were incorrect, switched to awaits instead. Sorry about that!
3 years, 6 months ago (2017-06-08 01:24:21 UTC) #17
dgozman
lgtm, thanks!
3 years, 6 months ago (2017-06-08 18:15:22 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2914293002/160001
3 years, 6 months ago (2017-06-08 18:20:08 UTC) #21
commit-bot: I haz the power
3 years, 6 months ago (2017-06-08 20:37:25 UTC) #24
Message was sent while issue was closed.
Committed patchset #6 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/525c53f0d081a4533b6c55d9b2b9...

Powered by Google App Engine
This is Rietveld 408576698