Bug 46270 - Web Inspector: IndexedDB interface
Summary: Web Inspector: IndexedDB interface
Status: RESOLVED DUPLICATE of bug 75386
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 09:48 PDT by Jeremy Orlow
Modified: 2012-02-29 01:47 PST (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2010-09-22 09:48:22 PDT
The inspector should be able to inspect IndexedDB.

IndexedDB consists of a series of object stores which map keys (strings, ints, nulls, dates, and maybe arrays of these in the future) to serialized script values + indexes which map a key to an object store entry.  For each index/object store, there's a bit of meta-data (like name, key path, etc).

I'd anticipate the IndexedDB entry on the left side of the storage bar expanding to show all databases in that origin, those expanding to show all object stores, and those expanding to show all indexes associated with them.  And then when you click on an object store, it'd show you the mapping from key to value.  The values, since they can be arbitrary javascript, would probably reuse some of the code the inspector already has to inspect values.  After a user changes a value, we'd need to verify it is still serializable via the structured clone algorithm.  (This is easy: just see if SerializedScriptValue can still serialize it.)  All keys would be read-only since they're extracted from the actual value via the "key path".

If someone has some spare cycles to look at this, it'd be really great!
Comment 1 Pavel Feldman 2011-03-19 12:55:31 PDT
Here is what needs to be done in order to implement IDB in inspector:

1) Implement InspectorIDBAgent (look at InspectorDatabaseAgent or InspectorDOMStorageAgent):

http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/InspectorDatabaseAgent.h
http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/InspectorDOMStorageAgent.h

2) WebCore should notify this agent about DB open / close operations using InspectorInstrumentation:

http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/InspectorDatabaseInstrumentation.h

3) Introduce new debugging domain "IDB" and declare requests and events for this domain. These requests should be handled by the agent above, events should be issued by the agent above. See DOMStorage domain as an example.

http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/Inspector.json

4) Implement front-end classes such as below for visualization

http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/front-end/DOMStorage.js and
http://trac.webkit.org/browser/trunk/Source/WebCore/inspector/front-end/DOMStorageItemsView.js
Comment 2 Vsevolod Vlasov 2012-02-29 01:47:06 PST

*** This bug has been marked as a duplicate of bug 75386 ***