WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 124385
Move execution of IDBTransactionBackendOperations to the IDBServerConnection
https://bugs.webkit.org/show_bug.cgi?id=124385
Summary
Move execution of IDBTransactionBackendOperations to the IDBServerConnection
Brady Eidson
Reported
2013-11-14 16:01:04 PST
Move execution of IDBTransactionBackendOperations to the IDBServerConnection This almost removes all knowledge of the backing stores from the front end.
Attachments
Patch v1
(89.24 KB, patch)
2013-11-14 21:07 PST
,
Brady Eidson
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Patch v2 - Less macros, more variadic templates...?
(98.87 KB, patch)
2013-11-14 22:57 PST
,
Brady Eidson
eflews.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch v3 - Macros, and hopefully a successful build
(92.02 KB, patch)
2013-11-15 09:40 PST
,
Brady Eidson
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Patch v4 - All the WebCore.xcodeproj changes needed...
(93.25 KB, patch)
2013-11-15 10:19 PST
,
Brady Eidson
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2013-11-14 21:07:04 PST
Created
attachment 217010
[details]
Patch v1
Build Bot
Comment 2
2013-11-14 21:40:26 PST
Comment on
attachment 217010
[details]
Patch v1
Attachment 217010
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/23778008
Build Bot
Comment 3
2013-11-14 21:56:42 PST
Comment on
attachment 217010
[details]
Patch v1
Attachment 217010
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/23718007
Brady Eidson
Comment 4
2013-11-14 22:01:13 PST
(In reply to
comment #3
)
> (From update of
attachment 217010
[details]
) >
Attachment 217010
[details]
did not pass mac-ews (mac): > Output:
http://webkit-queues.appspot.com/results/23718007
Whoops, forgot to include .xcodeproj changes to export 2 more headers. I'm reworking part of the patch right now anyways, will fix in the next version.
Brady Eidson
Comment 5
2013-11-14 22:57:09 PST
Created
attachment 217016
[details]
Patch v2 - Less macros, more variadic templates...? check-webkit-style will complain: indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:60: Place brace on its own line for function definitions. [whitespace/braces] [4] But I think it needs updates for C++ lambdas.
WebKit Commit Bot
Comment 6
2013-11-14 22:59:20 PST
Attachment 217016
[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/IDBDatabaseBackend.cpp', u'Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h', u'Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp', u'Source/WebCore/Modules/indexeddb/IDBServerConnection.h', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp', u'Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h', u'Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp', u'Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h', u'Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp', u'Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h', u'Source/WebCore/WebCore.xcodeproj/project.pbxproj', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h']" exit_code: 1 Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:60: 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.
EFL EWS Bot
Comment 7
2013-11-14 23:01:09 PST
Comment on
attachment 217016
[details]
Patch v2 - Less macros, more variadic templates...?
Attachment 217016
[details]
did not pass efl-ews (efl): Output:
http://webkit-queues.appspot.com/results/23778026
EFL EWS Bot
Comment 8
2013-11-14 23:02:29 PST
Comment on
attachment 217016
[details]
Patch v2 - Less macros, more variadic templates...?
Attachment 217016
[details]
did not pass efl-wk2-ews (efl-wk2): Output:
http://webkit-queues.appspot.com/results/23738028
kov's GTK+ EWS bot
Comment 9
2013-11-14 23:03:13 PST
Comment on
attachment 217016
[details]
Patch v2 - Less macros, more variadic templates...?
Attachment 217016
[details]
did not pass gtk-ews (gtk): Output:
http://webkit-queues.appspot.com/results/23708023
Brady Eidson
Comment 10
2013-11-14 23:10:47 PST
Hmmm the EFL/GTK errors seem to be deficiencies in their respective compilers parameter packs and lamdbas. That's too bad...
Anders Carlsson
Comment 11
2013-11-15 06:45:58 PST
Comment on
attachment 217016
[details]
Patch v2 - Less macros, more variadic templates...? View in context:
https://bugs.webkit.org/attachment.cgi?id=217016&action=review
> Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:68 > +template <typename FunctionType, typename... Arguments> > +class CallOnDestruct { > +public: > + CallOnDestruct(FunctionType callback, Arguments... arguments) > + : m_originalCallback(callback) > + { > + setArguments(arguments...); > + } > + > + ~CallOnDestruct() > + { > + auto callback = m_callbackToPerform; > + callOnMainThread([callback]() { > + callback(); > + }); > + } > + > + void setArguments(Arguments... arguments) > + { > + auto callback = m_originalCallback; > + m_callbackToPerform = [callback, arguments...]() { > + callback(arguments...); > + }; > + } > + > +private: > + FunctionType m_originalCallback; > + std::function<void()> m_callbackToPerform; > +};
I think this is more confusing than what you had earlier.
Brady Eidson
Comment 12
2013-11-15 07:41:55 PST
(In reply to
comment #11
)
> (From update of
attachment 217016
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=217016&action=review
> > > Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:68 > > +template <typename FunctionType, typename... Arguments> > > +class CallOnDestruct { > > +public: > > + CallOnDestruct(FunctionType callback, Arguments... arguments) > > + : m_originalCallback(callback) > > + { > > + setArguments(arguments...); > > + } > > + > > + ~CallOnDestruct() > > + { > > + auto callback = m_callbackToPerform; > > + callOnMainThread([callback]() { > > + callback(); > > + }); > > + } > > + > > + void setArguments(Arguments... arguments) > > + { > > + auto callback = m_originalCallback; > > + m_callbackToPerform = [callback, arguments...]() { > > + callback(arguments...); > > + }; > > + } > > + > > +private: > > + FunctionType m_originalCallback; > > + std::function<void()> m_callbackToPerform; > > +}; > > I think this is more confusing than what you had earlier.
I know we're still looking for the right idiom here, and I definitely don't think the macros are it. But since the EFL/GTK compilers can't handle the variadic class anyways, and this code is only for them for now, I'll go back to the macros + fixing the mac build.
Brady Eidson
Comment 13
2013-11-15 09:40:05 PST
Created
attachment 217058
[details]
Patch v3 - Macros, and hopefully a successful build
Build Bot
Comment 14
2013-11-15 10:12:31 PST
Comment on
attachment 217058
[details]
Patch v3 - Macros, and hopefully a successful build
Attachment 217058
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/23658197
Brady Eidson
Comment 15
2013-11-15 10:19:26 PST
Created
attachment 217061
[details]
Patch v4 - All the WebCore.xcodeproj changes needed...
Brady Eidson
Comment 16
2013-11-15 12:55:56 PST
http://trac.webkit.org/changeset/159353
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