[IndexedDB] [Devtools] IndexedDB view crashes if a deleted database is recreated |
|||||||
Issue description
Chrome Version : 58.0.3029.110
What steps will reproduce the problem?
1. Run a snippet to create a database.
2. Right-click refresh IndexedDB.
3. Delete the created database using the "Delete database" button in devtools.
4. Re-run the snippet (creates another database with the same name).
5. Right-click refresh IndexedDB.
Expected result:
The created database is shown in the sidebar.
What happens instead of that?
The IndexedDB view crashes.
Snippet used:
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
var open = indexedDB.open("MyDatabase", 1);
This occurs if another database with the same name as the deleted one is created. The error persists until Cache Storage is refreshed and both the tab and devtools are reloaded.
If another database with a different name is created after deleting the initial database, recreating the initial database does not cause the error.
Error log is attached.
,
Jun 1 2017
,
Jun 1 2017
,
Jun 1 2017
,
Jun 1 2017
,
Jun 2 2017
,
Jun 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec commit 525c53f0d081a4533b6c55d9b2b991ecfc9d2bec Author: kristipark <kristipark@chromium.org> Date: Thu Jun 08 20:37:06 2017 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} [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-data-expected.txt [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-names-expected.txt [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view-expected.txt [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-refresh-view.html [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/database-structure-expected.txt [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/resources-panel-expected.txt [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/upgrade-events-expected.txt [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/Source/devtools/front_end/resources/ApplicationPanelSidebar.js [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBModel.js [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/Source/devtools/front_end/resources/IndexedDBViews.js [modify] https://crrev.com/525c53f0d081a4533b6c55d9b2b991ecfc9d2bec/third_party/WebKit/Source/devtools/front_end/ui/ReportView.js
,
Jun 8 2017
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by dmu...@chromium.org
, Jun 1 2017