Bug 152933
Summary: | Web Inspector: Modern IDB: Backend should send events when DBs are created/deleted/updated | ||
---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> |
Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | beidson, graouts, inspector-bugzilla-changes, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 149117 | ||
Bug Blocks: | 165889 |
Joseph Pecoraro
* SUMMARY
Modern IDB: Backend should send events when DBs / ObjectStores are created/deleted
This serves multiple purposes:
(1) under modern IDB there doesn't exist a way to get a list of all the IDB names (we could create one for Inspector eventually)
(2) currently when a page opens an IDB, it should show up in the tools but doesn't. An event would solve that.
This primarily solves (2) which is a better user experience (dynamically updating available IDB databases/stores). (1) Should be solved eventually but can be done separately.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/24115467>
Joseph Pecoraro
A basic set of events could include:
"events": [
{
"name": "databaseOpened",
"parameters": [
{ "name": "databaseWithObjectStores", "$ref": "DatabaseWithObjectStores", "description": "Database with an array of object stores." }
]
},
{
"name": "databaseDeleted",
"parameters": [
{ "name": "securityOrigin", "type": "string", "description": "Security origin." },
{ "name": "databaseName", "type": "string", "description": "Database name." }
]
},
{
"name": "objectStoreCreated",
"parameters": [
{ "name": "securityOrigin", "type": "string", "description": "Security origin." },
{ "name": "databaseName", "type": "string", "description": "Database name." }
{ "name": "name", "type": "string", "description": "Object store name." },
]
},
{
"name": "objectStoreDeleted",
"parameters": [
{ "name": "securityOrigin", "type": "string", "description": "Security origin." },
{ "name": "databaseName", "type": "string", "description": "Database name." }
{ "name": "name", "type": "string", "description": "Object store name." },
]
},
]
But it might also be worthwhile now to introduce a "databaseId" for securityOrigin/databaseName pairs.
Other possible improvements:
- Send update event when a Database changes version?
- Send update event when an ObjectStore is modified?
Joseph Pecoraro
Since object stores can only be created/deleted/modified in upgrades that simplifies things.
We would not need objectStoreCreated/Delete events, just a databaseOpened (which could also double for updated) and databaseDeleted, at that point the object stores should be solid.
Joseph Pecoraro
Even if we did this, we would still want a way for the inspector to get a list of all the open IndexedDBs when the inspector opens... So I think it would still make sense for WebCore provide a way to do that in some way.
Brady Eidson
Reversing the blocking relationship here - We don't need this to consider Modern IDB to be complete.