Bug 75386

Summary: Web Inspector: Enable IndexedDB support in resources panel.
Product: WebKit Reporter: Vsevolod Vlasov <vsevik>
Component: Web Inspector (Deprecated)Assignee: Vsevolod Vlasov <vsevik>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, hans, joepeck, jorlow, jsbell, keishi, loislo, paulirish, peter, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 76264, 76705, 76711, 77002, 77439, 78503, 78609, 79098, 79691, 79695, 80022, 82635    
Bug Blocks:    
Attachments:
Description Flags
Patch (first draft) none

Vsevolod Vlasov
Reported 2011-12-30 06:56:21 PST
Enable IndexedDB support in resources panel.
Attachments
Patch (first draft) (26.29 KB, patch)
2011-12-30 06:58 PST, Vsevolod Vlasov
no flags
Vsevolod Vlasov
Comment 1 2011-12-30 06:58:47 PST
Created attachment 120799 [details] Patch (first draft)
Vsevolod Vlasov
Comment 2 2011-12-30 07:01:07 PST
Here is the first draft for IndexedDB support in inspector. This patch contains - new InspectorIndexedDBAgent backend boilerplate - new IndexedDBModel front-end boilerplate - proposed implementation of getDatabaseNames for all frames.
Timothy Hatcher
Comment 3 2011-12-30 09:18:05 PST
Comment on attachment 120799 [details] Patch (first draft) View in context: https://bugs.webkit.org/attachment.cgi?id=120799&action=review > Source/WebCore/inspector/Inspector.json:928 > + "name": "requestDatabaseNamesForFrame", Are the databases shared between frames if they have the same origin? If so shouldn't this be origin based not frame based? (I know nothing about IndexedDB…) > Source/WebCore/inspector/Inspector.json:937 > + "name": "databaseNamesForFrameLoaded", "databaseNamesForFrameLoaded" is too verbose. I think "databaseNamesLoaded" is enough or even better "databasesAvailable".
Joshua Bell
Comment 4 2012-01-05 15:12:24 PST
Comment on attachment 120799 [details] Patch (first draft) View in context: https://bugs.webkit.org/attachment.cgi?id=120799&action=review >> Source/WebCore/inspector/Inspector.json:928 >> + "name": "requestDatabaseNamesForFrame", > > Are the databases shared between frames if they have the same origin? If so shouldn't this be origin based not frame based? (I know nothing about IndexedDB…) And I know nothing about the inspector... On the IDB side, a database is owned by an origin. The backend (browser process) IDBDatabaseBackend would be per-origin. On the renderer side, each IDBDatabase is actually a "connection" to a backend, these are never shared and there may be multiple per process that are connections to the same browser-side IDBDatabaseBackend. Agreed that "Origin" might be a better term here; obviously if the inspector is coded to refer to Frames then at some point between Inspector-centric code and IDB-centric code the terminology would switch. > Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:185 > + IDBFactoryBackendInterface* idbBackend = document->page()->group().idbFactory(); Talking to the BackendInterfaces is necessary right now, as most of the IDB logic is implemented in the "backend" (e.g. in Chrome this is a proxy to the browser process where the backing store lives). If we change things to pull the logic to the "frontend" the API would remain fairly similar although the objects would change (e.g. this could could interact directly with an IDBFactory instance). So: looks good so far.
Timothy Hatcher
Comment 5 2012-01-05 17:05:38 PST
My main point was the Inspector UI should not show the same database multiple times if the page has multiple frames with connections to the same database. The connection has nothing inseresting (that I know of) to show.
Vsevolod Vlasov
Comment 6 2012-01-11 07:09:42 PST
(In reply to comment #3) > (From update of attachment 120799 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120799&action=review > > > Source/WebCore/inspector/Inspector.json:928 > > + "name": "requestDatabaseNamesForFrame", > > Are the databases shared between frames if they have the same origin? If so shouldn't this be origin based not frame based? (I know nothing about IndexedDB…) Indeed, as jsbell@ mentioned databases are owned by origin. But IDBFactoryBackendInterface::getDatabaseNames accepts frame and SecurityOrigin objects as parameters, so frameId is a natural way for front-end to access IDB. This implementation creates some overhead when there are several frames with the same origin though. We can pass security origins for each frame to front-end to make sure we don't do extra requests from front-end.
Vsevolod Vlasov
Comment 7 2012-01-13 03:45:41 PST
I filed https://bugs.webkit.org/show_bug.cgi?id=76264 for boilerplate and getDatabaseNames support. I'll use this issue as meta-bug for all inspector IndexedDB support.
Vsevolod Vlasov
Comment 8 2012-02-29 01:47:06 PST
*** Bug 46270 has been marked as a duplicate of this bug. ***
Vsevolod Vlasov
Comment 9 2012-04-17 06:36:24 PDT
Now that IndexedDB is out from experiments this bug could be closed as fixed.
Note You need to log in before you can comment on or make changes to this bug.