Bug 28872 - [V8] SQLStatement Error Callback may not return the correct result to WebCore
Summary: [V8] SQLStatement Error Callback may not return the correct result to WebCore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ben Murdoch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-01 06:05 PDT by Ben Murdoch
Modified: 2009-11-18 16:06 PST (History)
2 users (show)

See Also:


Attachments
Proposed patch (1.55 KB, patch)
2009-09-01 06:29 PDT, Ben Murdoch
eric: review-
Details | Formatted Diff | Diff
Proposed patch with layout test. (6.45 KB, patch)
2009-09-01 10:49 PDT, Ben Murdoch
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Murdoch 2009-09-01 06:05:28 PDT
In the custom V8 binding for SQLStatementErrorCallback, handleEvent() may not return the correct result to WebCore. It must return true to WebCore to signify that the transaction error steps should be executed in the event of the statement error callback throwing an exception or returning true.
Comment 1 Ben Murdoch 2009-09-01 06:29:51 PDT
Created attachment 38863 [details]
Proposed patch

Corrects the return logic in handleEvent().
Comment 2 Eric Seidel (no email) 2009-09-01 07:39:48 PDT
Comment on attachment 38863 [details]
Proposed patch

Is this testable?  How does this bug manifest itself to the user/page?  We either need a test or an explanation of why it's untestable. :)
Comment 3 Ben Murdoch 2009-09-01 07:47:13 PDT
(In reply to comment #2)
> (From update of attachment 38863 [details])
> Is this testable?  How does this bug manifest itself to the user/page?  We
> either need a test or an explanation of why it's untestable. :)

I should be able to put together a layout test. Essentially, without this fix the wrong result is returned to WebCore in the event that the statement error callback does not throw an exception and returns true. In this situation the binding will currently returns false to WebCore, signifying that processing of the next statement may begin. The spec states that if the statement callback returns true we should jump immediately to the transaction error callback.
Comment 4 Eric Seidel (no email) 2009-09-01 07:55:45 PDT
Perfect.  If we layout test this then other implementations will be sure not to get this wrong. :)
Comment 5 Ben Murdoch 2009-09-01 10:49:01 PDT
Created attachment 38870 [details]
Proposed patch with layout test.
Comment 6 Eric Seidel (no email) 2009-09-03 01:46:58 PDT
Comment on attachment 38870 [details]
Proposed patch with layout test.

LGTM.
Comment 7 Eric Seidel (no email) 2009-09-03 02:04:42 PDT
Comment on attachment 38870 [details]
Proposed patch with layout test.

Clearing flags on attachment: 38870

Committed r48008: <http://trac.webkit.org/changeset/48008>
Comment 8 Eric Seidel (no email) 2009-09-03 02:04:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Eric Seidel (no email) 2009-11-18 16:06:51 PST
Please don't remove the Reviewed by NOBODY(OOPS!) line, or our scripts won't correctly add the reviewer when landing. :(