Bug 123775

Summary: IDB: Make opening/establishing a database asynchronous
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, commit-queue, jsbell
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1 kling: review+

Description Brady Eidson 2013-11-04 19:22:22 PST
IDB: Make opening/establishing a database asynchronous

Currently opening a database involves main thread I/O.

Let's make it asynchronous instead.

The LevelDB implementation will still be main thread synchronous.
Comment 1 Brady Eidson 2013-11-04 20:03:12 PST
Created attachment 215987 [details]
Patch v1
Comment 2 WebKit Commit Bot 2013-11-04 20:04:09 PST
Attachment 215987 [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/IDBBackingStoreInterface.h', u'Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp', u'Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h', u'Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp', u'Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h']" exit_code: 1
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:183:  The parameter name "metadata" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brady Eidson 2013-11-04 20:06:10 PST
(In reply to comment #2)
> Attachment 215987 [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/IDBBackingStoreInterface.h', u'Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp', u'Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h', u'Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp', u'Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h']" exit_code: 1
> Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:183:  The parameter name "metadata" adds no information, so it should be removed.  [readability/parameter_name] [5]
> Total errors found: 1 in 6 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.

Fixed locally.
Comment 4 Andreas Kling 2013-11-04 21:01:56 PST
Comment on attachment 215987 [details]
Patch v1 

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

r=me

> Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp:450
> +            RefPtr<IDBDatabaseError> error;

This looks unused.
Comment 5 Brady Eidson 2013-11-04 21:04:30 PST
(In reply to comment #4)
> (From update of attachment 215987 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215987&action=review
> 
> r=me
> 
> > Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp:450
> > +            RefPtr<IDBDatabaseError> error;
> 
> This looks unused.

INDEED!
Comment 6 Brady Eidson 2013-11-04 21:06:37 PST
http://trac.webkit.org/changeset/158641
Comment 7 Brady Eidson 2013-11-04 21:18:33 PST
And that additional review feedback in http://trac.webkit.org/changeset/158642