Bug 127123 - IDB: delete object store support
Summary: IDB: delete object store support
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-16 11:02 PST by Brady Eidson
Modified: 2014-01-16 17:16 PST (History)
6 users (show)

See Also:


Attachments
Patch v1 (18.08 KB, patch)
2014-01-16 11:05 PST, Brady Eidson
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2014-01-16 11:02:22 PST
IDB: Support delete object store

In radar <rdar://problem/15779641>
Comment 1 Brady Eidson 2014-01-16 11:05:17 PST
Created attachment 221393 [details]
Patch v1
Comment 2 WebKit Commit Bot 2014-01-16 11:07:35 PST
Attachment 221393 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in', u'Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h', u'Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp', u'Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.h', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in', '--commit-queue']" exit_code: 1
ERROR: Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:381:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alexey Proskuryakov 2014-01-16 15:49:37 PST
Comment on attachment 221393 [details]
Patch v1

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

> Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:365
> +void UniqueIDBDatabase::deleteObjectStore(const IDBTransactionIdentifier& identifier, int64_t objectStoreID, std::function<void(bool)> successCallback)

I'm not quite sure how we can have a success callback, but no failure callback. Isn't it just "callback" then?

> Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:78
>      void changeDatabaseVersion(const IDBTransactionIdentifier&, uint64_t newVersion, std::function<void(bool)> successCallback);
>      void createObjectStore(const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, std::function<void(bool)> successCallback);
> +    void deleteObjectStore(const IDBTransactionIdentifier&, int64_t objectStoreID, std::function<void(bool)> successCallback);

I'm similarly unsure about the existing ones.

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:394
> +        LOG_ERROR("Attempt to change database version with an establish, in-progress transaction");

Should that be "established"?

> Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:412
> +        // FIXME: Execute SQL here to drop all records and indexes related to this object store.

Is there a bug tracking this?
Comment 4 Brady Eidson 2014-01-16 16:50:48 PST
(In reply to comment #3)
> (From update of attachment 221393 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221393&action=review
> 
> > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:365
> > +void UniqueIDBDatabase::deleteObjectStore(const IDBTransactionIdentifier& identifier, int64_t objectStoreID, std::function<void(bool)> successCallback)
> 
> I'm not quite sure how we can have a success callback, but no failure callback. Isn't it just "callback" then?
> 
> > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:78
> >      void changeDatabaseVersion(const IDBTransactionIdentifier&, uint64_t newVersion, std::function<void(bool)> successCallback);
> >      void createObjectStore(const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, std::function<void(bool)> successCallback);
> > +    void deleteObjectStore(const IDBTransactionIdentifier&, int64_t objectStoreID, std::function<void(bool)> successCallback);
> 
> I'm similarly unsure about the existing ones.

Will rename them.

> 
> > Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:394
> > +        LOG_ERROR("Attempt to change database version with an establish, in-progress transaction");
> 
> Should that be "established"?

Yup

> 
> > Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:412
> > +        // FIXME: Execute SQL here to drop all records and indexes related to this object store.
> 
> Is there a bug tracking this?

Radar, yes.  No bugzilla yet.
Comment 5 Brady Eidson 2014-01-16 17:14:23 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 221393 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=221393&action=review
> > 
> > > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:365
> > > +void UniqueIDBDatabase::deleteObjectStore(const IDBTransactionIdentifier& identifier, int64_t objectStoreID, std::function<void(bool)> successCallback)
> > 
> > I'm not quite sure how we can have a success callback, but no failure callback. Isn't it just "callback" then?
> > 
> > > Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:78
> > >      void changeDatabaseVersion(const IDBTransactionIdentifier&, uint64_t newVersion, std::function<void(bool)> successCallback);
> > >      void createObjectStore(const IDBTransactionIdentifier&, const WebCore::IDBObjectStoreMetadata&, std::function<void(bool)> successCallback);
> > > +    void deleteObjectStore(const IDBTransactionIdentifier&, int64_t objectStoreID, std::function<void(bool)> successCallback);
> > 
> > I'm similarly unsure about the existing ones.
> 
> Will rename them.

Actually not in this patch.
Comment 6 Brady Eidson 2014-01-16 17:16:17 PST
http://trac.webkit.org/changeset/162174