RESOLVED FIXED 226124
Make error returned by SQLiteIDBBackingStore::getOrEstablishDatabaseInfo more detailed
https://bugs.webkit.org/show_bug.cgi?id=226124
Summary Make error returned by SQLiteIDBBackingStore::getOrEstablishDatabaseInfo more...
Sihui Liu
Reported 2021-05-21 16:33:10 PDT
To help debug rdar://77532291.
Attachments
Patch (29.28 KB, patch)
2021-05-21 16:42 PDT, Sihui Liu
no flags
Patch (29.34 KB, patch)
2021-05-24 14:03 PDT, Sihui Liu
no flags
Patch for landing (30.32 KB, patch)
2021-05-25 14:51 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2021-05-21 16:42:11 PDT
Sihui Liu
Comment 2 2021-05-24 14:03:47 PDT
Chris Dumez
Comment 3 2021-05-25 09:00:37 PDT
Comment on attachment 429562 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429562&action=review > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:-262 > - LOG_ERROR("Unable to prepare statement to fetch schema for the Records table."); Unclear why this patch is getting rid of all the LOG_ERROR(). You can both LOG_ERROR AND return a useful IDBError. Why trade one for the other? > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:257 > + String tableStatement = database.tableSQL("Records"_s); Why is it named Statement and not schema like it used to be? If I see statement, I expect a SQLiteStatement. > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:262 > + return IDBError { }; wouldn't `return { };` work? > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:267 > + return IDBError { }; wouldn't `return { };` work? > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:293 > + return IDBError { }; wouldn't `return { };` work?
Sihui Liu
Comment 4 2021-05-25 14:14:22 PDT
(In reply to Chris Dumez from comment #3) > Comment on attachment 429562 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=429562&action=review > > > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:-262 > > - LOG_ERROR("Unable to prepare statement to fetch schema for the Records table."); > > Unclear why this patch is getting rid of all the LOG_ERROR(). You can both > LOG_ERROR AND return a useful IDBError. Why trade one for the other? > As the error is more detailed, we can add error logging at higher level. Will add logging in UniqueIDBDatabase::performCurrentOpenOperation(). > > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:257 > > + String tableStatement = database.tableSQL("Records"_s); > > Why is it named Statement and not schema like it used to be? If I see > statement, I expect a SQLiteStatement. > I think schema is for describing the whole database and this is a column of an entry in schema table, which is usually text of the original statement to create the table. > > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:262 > > + return IDBError { }; > > wouldn't `return { };` work? > No, chosen constructor is explicit in copy-initialization. (IDBError's constructor is explicit, we may change that) > > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:267 > > + return IDBError { }; > > wouldn't `return { };` work? > > > Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:293 > > + return IDBError { }; > > wouldn't `return { };` work?
Sihui Liu
Comment 5 2021-05-25 14:51:34 PDT
Created attachment 429695 [details] Patch for landing
EWS
Comment 6 2021-05-25 15:35:03 PDT
Committed r278053 (238138@main): <https://commits.webkit.org/238138@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429695 [details].
Radar WebKit Bug Importer
Comment 7 2021-05-25 15:36:20 PDT
Note You need to log in before you can comment on or make changes to this bug.