WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71575
WebSQLDatabase could use some better error reporting.
https://bugs.webkit.org/show_bug.cgi?id=71575
Summary
WebSQLDatabase could use some better error reporting.
Michael Nordman
Reported
2011-11-04 11:14:52 PDT
I'm getting reports of errors opening databases and starting transactions, but there's not much to go on in these reports beyond the WebSQLError code which isn't very informative. See
http://code.google.com/p/chromium/issues/detail?id=98939
I plan on adding some console logging and also building a way for errors in webcore to get reported in chrome's 'histogram' logging mechanism to aggregate information about specific errors at specific callsites (see about:histogram in chrome).
Attachments
addMessage from bgThread
(4.58 KB, patch)
2011-11-04 11:22 PDT
,
Michael Nordman
gyuyoung.kim
: commit-queue-
Details
Formatted Diff
Diff
addMessage from bgThread
(4.45 KB, patch)
2011-11-04 12:29 PDT
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
addMessage from bgThread
(4.44 KB, patch)
2011-11-04 12:35 PDT
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(30.74 KB, patch)
2011-11-08 18:36 PST
,
Michael Nordman
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
dberrors
(30.72 KB, patch)
2011-11-08 19:32 PST
,
Michael Nordman
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
dberrors
(31.06 KB, patch)
2011-11-09 14:26 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(39.46 KB, patch)
2011-11-10 13:44 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(39.45 KB, patch)
2011-11-10 13:49 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(57.54 KB, patch)
2011-11-10 14:54 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(61.70 KB, patch)
2011-11-10 15:47 PST
,
Michael Nordman
levin
: review-
Details
Formatted Diff
Diff
dberrors
(64.89 KB, patch)
2011-11-11 15:02 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(65.48 KB, patch)
2011-11-11 15:08 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors
(64.10 KB, patch)
2011-11-11 15:16 PST
,
Michael Nordman
levin
: review+
webkit-ews
: commit-queue-
Details
Formatted Diff
Diff
dberrors
(64.48 KB, patch)
2011-11-11 17:26 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
dberrors (patch for landing)
(64.43 KB, patch)
2011-11-14 10:31 PST
,
Michael Nordman
no flags
Details
Formatted Diff
Diff
Show Obsolete
(14)
View All
Add attachment
proposed patch, testcase, etc.
Michael Nordman
Comment 1
2011-11-04 11:22:43 PDT
Created
attachment 113683
[details]
addMessage from bgThread
Gyuyoung Kim
Comment 2
2011-11-04 11:47:14 PDT
Comment on
attachment 113683
[details]
addMessage from bgThread
Attachment 113683
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/10337040
Michael Nordman
Comment 3
2011-11-04 12:29:55 PDT
Created
attachment 113697
[details]
addMessage from bgThread make efl happy with this too (hopefully)
WebKit Review Bot
Comment 4
2011-11-04 12:33:01 PDT
Attachment 113697
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/dom/ScriptExecutionContext.h:172: The parameter name "context" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Michael Nordman
Comment 5
2011-11-04 12:35:48 PDT
Created
attachment 113698
[details]
addMessage from bgThread style change
Michael Nordman
Comment 6
2011-11-04 13:25:27 PDT
horray for bot happiness :)
Nate Chapin
Comment 7
2011-11-04 13:35:06 PDT
Comment on
attachment 113698
[details]
addMessage from bgThread View in context:
https://bugs.webkit.org/attachment.cgi?id=113698&action=review
Ok. What happens when addMessage() is called currently?
> Source/WebCore/ChangeLog:9 > + No new tests. > +
Is this testable yet?
Michael Nordman
Comment 8
2011-11-04 13:46:58 PDT
> What happens when addMessage() is called currently?
Its not called on anything other than the 'context' thread, it's not thread safe.
> Is this testable yet?
Nothing calls this method on a bg thread yet, when there are new calls to it that affect console output related layout tests (whose expectations include the console output) will get updated to check for that output.
WebKit Review Bot
Comment 9
2011-11-04 15:24:32 PDT
Comment on
attachment 113698
[details]
addMessage from bgThread Clearing flags on attachment: 113698 Committed
r99328
: <
http://trac.webkit.org/changeset/99328
>
WebKit Review Bot
Comment 10
2011-11-04 15:24:36 PDT
All reviewed patches have been landed. Closing bug.
Michael Nordman
Comment 11
2011-11-04 15:46:55 PDT
reopening for subsequent patches
Michael Nordman
Comment 12
2011-11-08 18:36:21 PST
Created
attachment 114192
[details]
dberrors
WebKit Review Bot
Comment 13
2011-11-08 19:21:08 PST
Comment on
attachment 114192
[details]
dberrors
Attachment 114192
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10374281
New failing tests: storage/test-authorizer.html storage/change-version-handle-reuse.html storage/open-database-creation-callback.html
Michael Nordman
Comment 14
2011-11-08 19:32:45 PST
Created
attachment 114199
[details]
dberrors
WebKit Review Bot
Comment 15
2011-11-08 20:23:58 PST
Comment on
attachment 114199
[details]
dberrors
Attachment 114199
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/10377117
New failing tests: storage/test-authorizer.html storage/change-version-handle-reuse.html storage/open-database-creation-callback.html
Michael Nordman
Comment 16
2011-11-09 14:26:16 PST
Created
attachment 114367
[details]
dberrors
Michael Nordman
Comment 17
2011-11-10 13:44:53 PST
Created
attachment 114558
[details]
dberrors
WebKit Review Bot
Comment 18
2011-11-10 13:47:41 PST
Attachment 114558
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/storage/AbstractDatabase.h:98: The parameter name "ec" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Michael Nordman
Comment 19
2011-11-10 13:49:42 PST
Created
attachment 114560
[details]
dberrors
Michael Nordman
Comment 20
2011-11-10 14:54:42 PST
Created
attachment 114581
[details]
dberrors update layout tests
Michael Nordman
Comment 21
2011-11-10 15:47:12 PST
Created
attachment 114589
[details]
dberrors layout tests for .lastErrorMessage
Michael Nordman
Comment 22
2011-11-10 15:51:14 PST
ptal, i still want to return a formatted openDatabase[Sync] error message to the caller in some way, in this patch those messages only get put on the js console, but this patch is large enough already.
Michael Nordman
Comment 23
2011-11-10 18:04:37 PST
adding some reviewers to the cc list
David Levin
Comment 24
2011-11-10 18:15:35 PST
Comment on
attachment 114589
[details]
dberrors View in context:
https://bugs.webkit.org/attachment.cgi?id=114589&action=review
> Source/WebCore/ChangeLog:11 > + Tests are in the works, just not in this snapshot yet.
I'm confused, so is this ready for review?
> Source/WebCore/ChangeLog:15 > + (WebCore::SQLiteDatabase::open):
The changelog ideally guides the reviewer through why changes were done in particular function so they don't have to reconstruct it. For example, I don't know why m_openError was added in here and being used. I'm sure this is obvious to you, and I could piece it together by spending enough time on it but I'd rather not :).
David Levin
Comment 25
2011-11-11 07:35:57 PST
Comment on
attachment 114589
[details]
dberrors Per previous comments.
Michael Nordman
Comment 26
2011-11-11 13:05:35 PST
> > + Tests are in the works, just not in this snapshot yet. > I'm confused, so is this ready for review?
I just forgot to update the change log, please see the updated tests that are also in the patch.
> > + (WebCore::SQLiteDatabase::open): > The changelog ideally guides the reviewer through why changes were done in particular function so they don't have to reconstruct it. > > For example, I don't know why m_openError was added in here and being used. I'm sure this is obvious to you, and I could piece it together by spending enough time on it but I'd rather not :).
Sure, i'll add some comments in the ChangeLog and prepare a new patch. To answer your question here, the reason is to allow the lastError() and lastErrorMsg() methods to reflect errors experienced in the open() method as well as the other methods... right details of errors in open() are not available to consumers.
Michael Nordman
Comment 27
2011-11-11 15:02:42 PST
Created
attachment 114781
[details]
dberrors fixed changelog comments, added console logging for vacuum errors
Michael Nordman
Comment 28
2011-11-11 15:08:15 PST
Created
attachment 114782
[details]
dberrors really this time... log to the console errors when vacuuming
Michael Nordman
Comment 29
2011-11-11 15:16:21 PST
Created
attachment 114784
[details]
dberrors reverted the unintentional xcode project file changes
David Levin
Comment 30
2011-11-11 15:22:19 PST
Comment on
attachment 114784
[details]
dberrors View in context:
https://bugs.webkit.org/attachment.cgi?id=114782&action=review
Tnis could go in as is. Here are some nice to haves but not critical: Would be nice to clean up the duplicate strings.
> Source/WebCore/storage/ChangeVersionWrapper.cpp:55 > + transaction->database()->sqliteDatabase().lastErrorMsg());
Somehow the repeat of "transaction->database()->sqliteDatabase()" bothers me. (It would be nice to do only once.)
> Source/WebCore/storage/ChangeVersionWrapper.cpp:74 > + transaction->database()->sqliteDatabase().lastErrorMsg());
Ditto.
Early Warning System Bot
Comment 31
2011-11-11 15:58:49 PST
Comment on
attachment 114784
[details]
dberrors
Attachment 114784
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/10450622
Michael Nordman
Comment 32
2011-11-11 16:15:45 PST
Comment on
attachment 114784
[details]
dberrors View in context:
https://bugs.webkit.org/attachment.cgi?id=114784&action=review
> Source/WebCore/storage/AbstractDatabase.cpp:536 > + if (result != SQLResultOK)
ooops... got the wrong symbol here s/b SQLResultOk (lower k)
>> Source/WebCore/storage/ChangeVersionWrapper.cpp:55 >> + transaction->database()->sqliteDatabase().lastErrorMsg()); > > Somehow the repeat of "transaction->database()->sqliteDatabase()" bothers me. (It would be nice to do only once.)
done
>> Source/WebCore/storage/ChangeVersionWrapper.cpp:74 >> + transaction->database()->sqliteDatabase().lastErrorMsg()); > > Ditto.
done
Gyuyoung Kim
Comment 33
2011-11-11 16:30:36 PST
Comment on
attachment 114784
[details]
dberrors
Attachment 114784
[details]
did not pass efl-ews (efl): Output:
http://queues.webkit.org/results/10396584
Michael Nordman
Comment 34
2011-11-11 17:26:19 PST
Created
attachment 114805
[details]
dberrors
Michael Nordman
Comment 35
2011-11-14 10:31:54 PST
Created
attachment 114978
[details]
dberrors (patch for landing) patch for landing
WebKit Review Bot
Comment 36
2011-11-14 11:47:05 PST
Comment on
attachment 114978
[details]
dberrors (patch for landing) Clearing flags on attachment: 114978 Committed
r100172
: <
http://trac.webkit.org/changeset/100172
>
WebKit Review Bot
Comment 37
2011-11-14 11:47:19 PST
All reviewed patches have been landed. Closing bug.
Michael Nordman
Comment 38
2011-11-14 11:57:44 PST
reopening for more
David Levin
Comment 39
2011-11-14 12:00:43 PST
(In reply to
comment #38
)
> reopening for more
Please use a new bug for new patches. (Just like you'd have a new code review issue in chromium land.) Otherwise it gets really confusing. (Note how there are 38 comments and 14 patches in this bug already.)
Michael Nordman
Comment 40
2011-11-29 13:35:29 PST
continuing work in
https://bugs.webkit.org/show_bug.cgi?id=73258
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