RESOLVED FIXED 59452
IndexedDB: Move LevelDB key coding routines to separate file
https://bugs.webkit.org/show_bug.cgi?id=59452
Summary IndexedDB: Move LevelDB key coding routines to separate file
Hans Wennborg
Reported 2011-04-26 07:15:56 PDT
IndexedDB: Move LevelDB key coding routines to separate file
Attachments
Patch (139.44 KB, patch)
2011-04-26 07:22 PDT, Hans Wennborg
no flags
Patch (100.75 KB, patch)
2011-04-27 02:31 PDT, Hans Wennborg
tonyg: review+
Hans Wennborg
Comment 1 2011-04-26 07:22:48 PDT
Hans Wennborg
Comment 2 2011-04-26 07:25:36 PDT
It's a large patch, but it's really just moving a large chunk of code from one file to another, and making the functions and classes members of IDBLevelDBCoding. I'm not sure about the use of namespaces within WebKit, but if a reviewer agrees, maybe it would be nicer to have the IDBLevelDBCoding class be a namespace instead, and just do "using namespace IDBLevelDBCoding;" where it's used.
Tony Gentilcore
Comment 3 2011-04-26 10:16:08 PDT
Comment on attachment 91100 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=91100&action=review > I'm not sure about the use of namespaces within WebKit, but if a reviewer agrees, maybe it would be nicer to have the IDBLevelDBCoding class be a namespace instead, and just do "using namespace IDBLevelDBCoding;" where it's used. Namespaces are used very conservatively in WebKit, but there are some in inspector, graphics, audio, xpath. There's even one for leveldb already. This code is already using the class as a namespace (it has lots of classes, static methods, no members and can't be instantiated). So I agree that it would be a lot cleaner to make a namespace. Would you mind making the change? > Source/WebCore/WebCore.gypi:5526 > + 'storage/IDBLevelDBCoding.h', Should these also be added to WebCore/GNUMakefile.list.am? > Source/WebCore/storage/IDBLevelDBCoding.cpp:154 > +#endif These macros are still in IDBLevelDBBackingStore.cpp. They should only be in one place, right?
Hans Wennborg
Comment 4 2011-04-27 02:31:09 PDT
(In reply to comment #3) > (From update of attachment 91100 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=91100&action=review > > > I'm not sure about the use of namespaces within WebKit, but if a reviewer agrees, maybe it would be nicer to have the IDBLevelDBCoding class be a namespace instead, and just do "using namespace IDBLevelDBCoding;" where it's used. > > Namespaces are used very conservatively in WebKit, but there are some in inspector, graphics, audio, xpath. There's even one for leveldb already. This code is already using the class as a namespace (it has lots of classes, static methods, no members and can't be instantiated). So I agree that it would be a lot cleaner to make a namespace. Would you mind making the change? Sure. Done. > > > Source/WebCore/WebCore.gypi:5526 > > + 'storage/IDBLevelDBCoding.h', > > Should these also be added to WebCore/GNUMakefile.list.am? Done. > > > Source/WebCore/storage/IDBLevelDBCoding.cpp:154 > > +#endif > > These macros are still in IDBLevelDBBackingStore.cpp. They should only be in one place, right? They're used in both files at the moment :S
Hans Wennborg
Comment 5 2011-04-27 02:31:39 PDT
WebKit Review Bot
Comment 6 2011-04-27 03:29:53 PDT
Hans Wennborg
Comment 7 2011-04-27 04:11:48 PDT
Note You need to log in before you can comment on or make changes to this bug.