WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135346
Make WKOriginDataManager actually operate on IndexedDatabases
https://bugs.webkit.org/show_bug.cgi?id=135346
Summary
Make WKOriginDataManager actually operate on IndexedDatabases
Brady Eidson
Reported
2014-07-28 12:56:44 PDT
Make WKOriginDataManager correctly operate on IndexedDatabases This patch will get the list of origins with databases by checking for their entries in the directory structure on disk. It will also delete the database files (and any resulting empty directories) when requested. <
rdar://problem/15917314
>
Attachments
Patch v1
(21.36 KB, patch)
2014-07-28 13:17 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch v2 - Also added a new API we'll need very soon anyways
(24.95 KB, patch)
2014-07-28 17:12 PDT
,
Brady Eidson
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2014-07-28 12:59:55 PDT
In this patch, open handles to the database files on disk will not be notified and invalidated. This is probably quite an acceptable situation for now. because: - For read-only operations, they will continue functioning as normal on the unlinked file. - For write operations, they will start producing errors as SQLite notices the missing backing store. But it should still be fixed, and I filed
https://bugs.webkit.org/show_bug.cgi?id=135347
to track that in a followup
Brady Eidson
Comment 2
2014-07-28 13:17:08 PDT
Created
attachment 235611
[details]
Patch v1
Sam Weinig
Comment 3
2014-07-28 16:03:06 PDT
Comment on
attachment 235611
[details]
Patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=235611&action=review
> Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:60 > + // FIXME (<
rdar://problem/9127819
>): Is there a more explicit way of doing this besides accessing the UTF8Encoding?
This should probably be a bugzilla bug.
> Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:116 > + if (!callback) { > + LOG_ERROR("WebOriginDataManagerProxy::didGetOrigins - Invalid callback ID"); > + return; > + } > +
When can this happen? Should this be a MESSAGE_CHECK()?
> Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:131 > + if (!(types & kWKIndexedDatabaseData)) { > + callbackFunction(CallbackBase::Error::None); > return; > + }
This should probably have the same comment as above (or just move the one from below).
> Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:160 > + if (!(types & kWKIndexedDatabaseData)) { > + callbackFunction(CallbackBase::Error::None); > return; > + }
This should probably have the same comment as above (or just move the one from below).
> Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:190 > + if (!(types & kWKIndexedDatabaseData)) { > + callbackFunction(CallbackBase::Error::None); > return; > + }
This should probably have the same comment as above (or just move the one from below).
Brady Eidson
Comment 4
2014-07-28 16:07:27 PDT
(In reply to
comment #3
)
> (From update of
attachment 235611
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=235611&action=review
> > > Source/WebKit2/DatabaseProcess/DatabaseProcess.cpp:60 > > + // FIXME (<
rdar://problem/9127819
>): Is there a more explicit way of doing this besides accessing the UTF8Encoding? > > This should probably be a bugzilla bug.
Yah, probably!
> > Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:116 > > + if (!callback) { > > + LOG_ERROR("WebOriginDataManagerProxy::didGetOrigins - Invalid callback ID"); > > + return; > > + } > > + > > When can this happen? Should this be a MESSAGE_CHECK()?
Shouldn't happen. Should probably be a MESSAGE_CHECK.
> This should probably have the same comment as above (or just move the one from below).
...
> This should probably have the same comment as above (or just move the one from below).
...
> This should probably have the same comment as above (or just move the one from below).
Willdo
Brady Eidson
Comment 5
2014-07-28 16:12:37 PDT
Filed
https://bugs.webkit.org/show_bug.cgi?id=135365
for that radar. Will update the comment in the patch (as well as the comment in LocalStorageDatabaseTracker.cpp) before landing.
Brady Eidson
Comment 6
2014-07-28 16:26:58 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > > > Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:116 > > > + if (!callback) { > > > + LOG_ERROR("WebOriginDataManagerProxy::didGetOrigins - Invalid callback ID"); > > > + return; > > > + } > > > + > > > > When can this happen? Should this be a MESSAGE_CHECK()? > > Shouldn't happen. Should probably be a MESSAGE_CHECK.
MESSAGE_CHECK requires you know what Connection the current dispatched message came from. Right now, that can only be the DatabaseProcess, so I can do it. In the future, WebOriginDataManagerProxy will *not* know what Connection this message is coming from, so we'll have to deal with that later.
Brady Eidson
Comment 7
2014-07-28 16:40:50 PDT
(In reply to
comment #6
)
> (In reply to
comment #4
) > > (In reply to
comment #3
) > > > > > > Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp:116 > > > > + if (!callback) { > > > > + LOG_ERROR("WebOriginDataManagerProxy::didGetOrigins - Invalid callback ID"); > > > > + return; > > > > + } > > > > + > > > > > > When can this happen? Should this be a MESSAGE_CHECK()? > > > > Shouldn't happen. Should probably be a MESSAGE_CHECK. > > MESSAGE_CHECK requires you know what Connection the current dispatched message came from. > > Right now, that can only be the DatabaseProcess, so I can do it. > > In the future, WebOriginDataManagerProxy will *not* know what Connection this message is coming from, so we'll have to deal with that later.
Actually with the magic of WantsConnection, we can do this. New patch forthcoming.
Brady Eidson
Comment 8
2014-07-28 17:12:49 PDT
Created
attachment 235647
[details]
Patch v2 - Also added a new API we'll need very soon anyways
Brady Eidson
Comment 9
2014-07-28 21:57:47 PDT
Sorry about the "Also added a new API we'll need very soon anyways" - That got in there from autocomplete history. This V2 is basically V1 with review feedback addressed.
David Kilzer (:ddkilzer)
Comment 10
2014-07-29 09:42:37 PDT
Comment on
attachment 235647
[details]
Patch v2 - Also added a new API we'll need very soon anyways r=me on the parts of the patch that touch the filesystem.
Alex Christensen
Comment 11
2014-07-29 10:29:40 PDT
(In reply to
comment #10
)
> (From update of
attachment 235647
[details]
) > r=me on the parts of the patch that touch the filesystem.
me, too!
Brady Eidson
Comment 12
2014-07-29 10:38:30 PDT
http://trac.webkit.org/changeset/171749
Csaba Osztrogonác
Comment 13
2014-07-29 13:15:57 PDT
(In reply to
comment #12
)
>
http://trac.webkit.org/changeset/171749
and the buildfix landed in
http://trac.webkit.org/changeset/171753
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug