New issue
Advanced search Search tips

Issue 728450 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug


Participants' hotlists:
OWP-Storage-DevTools


Sign in to add a comment

[IndexedDB] [Devtools] IndexedDB view crashes if a deleted database is recreated

Project Member Reported by kristip...@chromium.org, Jun 1 2017

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.

 
devtools-1496277139425.log
2.1 KB View Download
Status: Available (was: Unconfirmed)
Labels: -OS-Linux -Pri-3 OS-All Pri-2
Description: Show this description
Owner: kristip...@chromium.org
Status: Assigned (was: Available)
Components: -Platform>Apps>DevTools Platform>DevTools
Project Member

Comment 7 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)

Sign in to add a comment