Bug 46090

Summary: [chromium] expose the filename used for a given indexed DB
Product: WebKit Reporter: jochen
Component: New BugsAssignee: jochen
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue, dglazkov, eric, jorlow, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

jochen
Reported 2010-09-20 07:52:01 PDT
[chromium] expose the filename used for a given indexed DB
Attachments
Patch (6.63 KB, patch)
2010-09-20 07:53 PDT, jochen
no flags
Patch (7.46 KB, patch)
2010-09-20 08:12 PDT, jochen
no flags
Patch (6.83 KB, patch)
2010-09-20 08:22 PDT, jochen
no flags
Patch (6.81 KB, patch)
2010-09-20 23:49 PDT, jochen
no flags
Patch (6.81 KB, patch)
2010-09-21 01:08 PDT, jochen
no flags
Patch (6.89 KB, patch)
2010-09-21 02:22 PDT, jochen
no flags
Patch (6.93 KB, patch)
2010-09-21 02:53 PDT, jochen
no flags
jochen
Comment 1 2010-09-20 07:53:27 PDT
Jeremy Orlow
Comment 2 2010-09-20 08:00:06 PDT
Comment on attachment 68082 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68082&action=review > WebCore/storage/IDBFactoryBackendInterface.cpp:48 > +String IDBFactoryBackendInterface::fileNameForIDB(const String& name, SecurityOrigin* securityOrigin) Let's not duplicate code. See below comment. > WebCore/storage/IDBFactoryBackendInterface.h:57 > + static String fileNameForIDB(const String& name, SecurityOrigin*); Put this on the Impl.h/cpp since the interface.cpp has a chromium and a non-chromium version. It's fine to leave the WebKit side of things as is tho. > WebCore/storage/chromium/IDBFactoryBackendInterface.cpp:32 > +#include "FileSystem.h" remove (per my above comment) > WebCore/storage/chromium/IDBFactoryBackendInterface.cpp:44 > +String IDBFactoryBackendInterface::fileNameForIDB(const String& name, SecurityOrigin* securityOrigin) remove (per my above comment)
WebKit Review Bot
Comment 3 2010-09-20 08:06:48 PDT
jochen
Comment 4 2010-09-20 08:12:29 PDT
Jeremy Orlow
Comment 5 2010-09-20 08:16:56 PDT
Comment on attachment 68086 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68086&action=review > WebCore/storage/IDBFactoryBackendInterface.cpp:31 > +#include "FileSystem.h" revert this file > WebKit/chromium/public/WebIDBFactory.h:68 > + WEBKIT_API static WebString fileNameForIDB(const WebString& name, const WebSecurityOrigin& origin); databaseFileName seems more clear. Also use that name in WebCore? > WebKit/chromium/src/WebIDBFactory.cpp:36 > +#if ENABLE(INDEXED_DATABASE) move this above the #include (the latest style these days) > WebKit/chromium/src/WebIDBFactory.cpp:42 > +// static remove comment Looks close.
WebKit Review Bot
Comment 6 2010-09-20 08:20:03 PDT
jochen
Comment 7 2010-09-20 08:22:50 PDT
Jeremy Orlow
Comment 8 2010-09-20 08:23:42 PDT
Comment on attachment 68087 [details] Patch r=me
Darin Fisher (:fishd, Google)
Comment 9 2010-09-20 09:04:21 PDT
Comment on attachment 68087 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68087&action=review > WebKit/chromium/public/WebIDBFactory.h:68 > + WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin& origin); nit: no need for the "origin" parameter name since it doesn't add any information. > WebKit/chromium/src/WebIDBFactory.cpp:44 > + return WebString(IDBFactoryBackendImpl::databaseFileName(name, origin)); nit: you should not need to call the WebString constructor explicitly here.
Jeremy Orlow
Comment 10 2010-09-20 09:08:21 PDT
(In reply to comment #9) > (From update of attachment 68087 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=68087&action=review > > > WebKit/chromium/public/WebIDBFactory.h:68 > > + WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin& origin); > > nit: no need for the "origin" parameter name since it doesn't add any information. > > > WebKit/chromium/src/WebIDBFactory.cpp:44 > > + return WebString(IDBFactoryBackendImpl::databaseFileName(name, origin)); > > nit: you should not need to call the WebString constructor explicitly here. Ugh. Stupid me on both counts. Sorry.
WebKit Commit Bot
Comment 11 2010-09-20 09:12:40 PDT
Comment on attachment 68087 [details] Patch Rejecting patch 68087 from commit-queue. Unexpected failure when processing patch! Please file a bug against webkit-patch. Failed to run "['./WebKitTools/Scripts/webkit-patch', '--status-host=queues.webkit.org', 'land-attachment', '--force-clean', '--non-interactive', '--ignore-builders', '--quiet', '--parent-command=commit-queue', 68087]" exit_code: 1 Last 500 characters of output: .cgi?id=68087&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=46090&ctype=xml Processing 1 patch from 1 bug. Cleaning working directory Updating working directory Processing patch 68087 from bug 46090. NOBODY (OOPS!) found in /Projects/CommitQueue/WebCore/ChangeLog does not appear to be a valid reviewer according to committers.py. ERROR: /Projects/CommitQueue/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).
Adam Barth
Comment 12 2010-09-20 10:49:07 PDT
> Rejecting patch 68087 from commit-queue. Sorry, this is a new bug in the commit-queue now that it's using multiple bots. Will fix soon.
Jeremy Orlow
Comment 13 2010-09-20 10:52:25 PDT
(In reply to comment #12) > > Rejecting patch 68087 from commit-queue. > > Sorry, this is a new bug in the commit-queue now that it's using multiple bots. Will fix soon. Well, the fact that it didn't still go ahead and commit it after cq- seems to be an improvement from before! (In which case it could commit a patch 10+ minutes after it was cq-ed.) Anyway, Jochen, can you roll another patch? Thanks!
Eric Seidel (no email)
Comment 14 2010-09-20 12:56:25 PDT
This should be fixed by bug 32679.
jochen
Comment 15 2010-09-20 23:49:55 PDT
WebKit Review Bot
Comment 16 2010-09-21 01:02:40 PDT
jochen
Comment 17 2010-09-21 01:08:37 PDT
WebKit Review Bot
Comment 18 2010-09-21 01:19:08 PDT
Jeremy Orlow
Comment 19 2010-09-21 02:18:35 PDT
Comment on attachment 68200 [details] Patch r=me
jochen
Comment 20 2010-09-21 02:22:07 PDT
Jeremy Orlow
Comment 21 2010-09-21 02:24:00 PDT
Comment on attachment 68202 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68202&action=review > WebKit/chromium/src/WebIDBFactory.cpp:45 > + return IDBFactoryBackendImpl::databaseFileName(name, static_cast<PassRefPtr<SecurityOrigin> >(origin).get()); noooooo You probably just need to include WebSecurityOrigin at the top.
jochen
Comment 22 2010-09-21 02:27:00 PDT
(In reply to comment #21) > (From update of attachment 68202 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=68202&action=review > > > WebKit/chromium/src/WebIDBFactory.cpp:45 > > + return IDBFactoryBackendImpl::databaseFileName(name, static_cast<PassRefPtr<SecurityOrigin> >(origin).get()); > > noooooo > > You probably just need to include WebSecurityOrigin at the top. that header is already included from WebIDBFactory.h WebSecurityOrigin defines an PassRefPtr<SecurityOrigin> operator(), the method databaseFileName wants to have a SecurityOrigin* an alternative would be to change IDBFactoryBackendImpl.cpp:openSqliteDatabase to take a PassRefPtr instead of a SecurityOrigin*, then databaseFileName could also take a PassRefPtr?
jochen
Comment 23 2010-09-21 02:53:06 PDT
Jeremy Orlow
Comment 24 2010-09-21 02:57:37 PDT
Comment on attachment 68203 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68203&action=review please change....but looks good :-) > WebKit/chromium/src/WebIDBFactory.cpp:46 > + securityOrigin = origin; just combine these two lines?
jochen
Comment 25 2010-09-21 03:14:56 PDT
(In reply to comment #24) > (From update of attachment 68203 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=68203&action=review > > please change....but looks good :-) > > > WebKit/chromium/src/WebIDBFactory.cpp:46 > > + securityOrigin = origin; > > just combine these two lines? That would require an explicit static_cast to PassRefPtr<SecurityOrigin>: when the compiler tries to figure out which RefPtr template to use, it doesn't take into account implicit conversion operators
WebKit Commit Bot
Comment 26 2010-09-21 04:15:54 PDT
Comment on attachment 68203 [details] Patch Clearing flags on attachment: 68203 Committed r67941: <http://trac.webkit.org/changeset/67941>
WebKit Commit Bot
Comment 27 2010-09-21 04:16:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.