Bug 76711 - Web Inspector: [InspectorIndexedDB] Pass Database, object stores and indexes meta information to frontend.
Summary: Web Inspector: [InspectorIndexedDB] Pass Database, object stores and indexes ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks: 75386
  Show dependency treegraph
 
Reported: 2012-01-20 09:31 PST by Vsevolod Vlasov
Modified: 2012-01-25 04:02 PST (History)
10 users (show)

See Also:


Attachments
Patch (28.37 KB, patch)
2012-01-23 11:05 PST, Vsevolod Vlasov
yurys: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Vlasov 2012-01-20 09:31:44 PST
[IndexedDB] Pass Database, object stores and indexes meta information to frontend.
Comment 1 Vsevolod Vlasov 2012-01-23 11:05:59 PST
Created attachment 123577 [details]
Patch
Comment 2 Yury Semikhatsky 2012-01-24 11:08:26 PST
Comment on attachment 123577 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=123577&action=review

> Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:149
> +    static PassRefPtr<OpenDatabaseCallback> create(PassRefPtr<ExecutableWithDatabase> executableWithDatabase)

Here and in other places please use raw pointer instead of PassRefPtr if you are not passing ownership.

> Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:204
> +public:
> +    static PassRefPtr<DatabaseLoaderCallback> create(PassRefPtr<InspectorIndexedDBAgent::FrontendProvider> frontendProvider, int requestId)

Raw pointer should be used for frontendProvider parameter here since you don't pass ownership.

> Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:232
> +                if (!idbIndex)

We may want to report about such failures to the front-end.

> Source/WebCore/inspector/front-end/IndexedDBModel.js:390
> +        if (!request.callback)

Should be "if (!request)" ?
Comment 3 Yury Semikhatsky 2012-01-24 11:09:08 PST
(In reply to comment #2)
> (From update of attachment 123577 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=123577&action=review
> 
Could we have a test at least for the protocol changes?
Comment 4 Vsevolod Vlasov 2012-01-25 03:46:42 PST
(In reply to comment #2)
> (From update of attachment 123577 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=123577&action=review
> 
> > Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:149
> > +    static PassRefPtr<OpenDatabaseCallback> create(PassRefPtr<ExecutableWithDatabase> executableWithDatabase)
> 
> Here and in other places please use raw pointer instead of PassRefPtr if you are not passing ownership.
Done.

> > Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:204
> > +public:
> > +    static PassRefPtr<DatabaseLoaderCallback> create(PassRefPtr<InspectorIndexedDBAgent::FrontendProvider> frontendProvider, int requestId)
> 
> Raw pointer should be used for frontendProvider parameter here since you don't pass ownership.
Done.
 
> > Source/WebCore/inspector/InspectorIndexedDBAgent.cpp:232
> > +                if (!idbIndex)
> 
> We may want to report about such failures to the front-end.
I am not sure if such failures can actually happen at all.
Besides that we can not report them directly, as the result of the front-end request is sent as a separate event, not a command response. I am going to address that separately.

> > Source/WebCore/inspector/front-end/IndexedDBModel.js:390
> > +        if (!request.callback)
> 
> Should be "if (!request)" ?
Done.

(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 123577 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=123577&action=review
> > 
> Could we have a test at least for the protocol changes?

Yes, I'll add them in a separate patch. I filed https://bugs.webkit.org/show_bug.cgi?id=77002 and I am going to fix it next thing.
Comment 5 Vsevolod Vlasov 2012-01-25 04:02:11 PST
Committed r105864: <http://trac.webkit.org/changeset/105864>