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

Issue 1411633005: Indexed DB: Prevent inspector from re-creating deleted databases (Closed)

Created:
5 years, 2 months ago by jsbell
Modified:
5 years, 2 months ago
Reviewers:
cmumford
CC:
chromium-reviews, blink-reviews, jsbell+idb_chromium.org, dgrogan, cmumford
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Indexed DB: Prevent inspector from re-creating deleted databases The dev tools resources panel maintains some state (e.g. selected database/store names) to support actions like paging through data, but doesn't keep connections open as that would block script actions (like upgrades). If a database is deleted by script and the UI is poked the inspector will attempt to re-open the database by name. But with the Indexed DB API this will implicitly re-create it (at version 1, no stores). Fix this by handling the "upgradeneeded" event and aborting the upgrade transaction, which is the same way that script would avoid implicitly recreating a database. BUG=539931 R=cmumford@chromium.org Committed: https://crrev.com/223dd6ea885c085cf5a600345dd164c3e03a0ca3 Cr-Commit-Position: refs/heads/master@{#355651}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Added tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/upgrade-events.html View 1 1 chunk +146 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/upgrade-events-expected.txt View 1 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp View 1 1 chunk +41 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
jsbell
Needs tests.
5 years, 2 months ago (2015-10-21 22:31:36 UTC) #1
cmumford
lgtm https://codereview.chromium.org/1411633005/diff/1/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp File third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp (right): https://codereview.chromium.org/1411633005/diff/1/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp#newcode213 third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp:213: if (event->type() != EventTypeNames::upgradeneeded) { Why not just ...
5 years, 2 months ago (2015-10-22 16:10:43 UTC) #2
jsbell
Added tests; please take another look? https://codereview.chromium.org/1411633005/diff/1/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp File third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp (right): https://codereview.chromium.org/1411633005/diff/1/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp#newcode213 third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp:213: if (event->type() != ...
5 years, 2 months ago (2015-10-22 19:57:31 UTC) #3
cmumford
slgtm
5 years, 2 months ago (2015-10-22 20:30:08 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1411633005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1411633005/20001
5 years, 2 months ago (2015-10-22 21:47:51 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 2 months ago (2015-10-22 21:52:57 UTC) #8
commit-bot: I haz the power
5 years, 2 months ago (2015-10-22 21:53:41 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/223dd6ea885c085cf5a600345dd164c3e03a0ca3
Cr-Commit-Position: refs/heads/master@{#355651}

Powered by Google App Engine
This is Rietveld 408576698