RESOLVED FIXED Bug 64552
[V8] Pending indexed db transactions cancelled to aggressively at script exit
https://bugs.webkit.org/show_bug.cgi?id=64552
Summary [V8] Pending indexed db transactions cancelled to aggressively at script exit
Nate Chapin
Reported 2011-07-14 12:55:27 PDT
Current, v8 cancels pending indexed db transactions as soon as it exits a context, even if we're in a recursive v8 call. We should wait until we've got v8 entirely off the stack before cancelling the pending transactions.
Attachments
patch (2.07 KB, patch)
2011-07-14 13:05 PDT, Nate Chapin
no flags
fix style issue + test (6.24 KB, patch)
2011-07-15 13:24 PDT, Nate Chapin
no flags
Patch for landing (6.29 KB, patch)
2011-07-19 13:35 PDT, Nate Chapin
no flags
Patch for landing (6.32 KB, patch)
2011-07-19 15:02 PDT, Nate Chapin
no flags
Nate Chapin
Comment 1 2011-07-14 13:05:39 PDT
Created attachment 100851 [details] patch I haven't figured out a good way to isolate the test case as of yet, so no layout test included. Assistance welcome :)
WebKit Review Bot
Comment 2 2011-07-14 13:07:16 PDT
Attachment 100851 [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/bindings/v8/V8Proxy.cpp:617: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Adam Barth
Comment 3 2011-07-14 23:00:09 PDT
You should be able to trigger this case by using dispatchEvent to call an event handler synchronously. That will enter/leave a nested V8 context, which you can observe to cancel your IDB transaction.
Adam Barth
Comment 4 2011-07-14 23:00:35 PDT
(The patch looks correct, BTW, but it might be worth trying a test along those lines.)
Adam Barth
Comment 5 2011-07-14 23:08:11 PDT
Comment on attachment 100851 [details] patch Clearing the review flag while you investigate a test.
Nate Chapin
Comment 6 2011-07-15 13:24:39 PDT
Created attachment 101036 [details] fix style issue + test Thanks for the test suggestion....I was having a brain cramp on how to guarantee we had a recursive JS call.
David Grogan
Comment 7 2011-07-18 13:35:56 PDT
Comment on attachment 101036 [details] fix style issue + test View in context: https://bugs.webkit.org/attachment.cgi?id=101036&action=review Thanks a lot for picking this up. > LayoutTests/storage/indexeddb/transaction-abort-with-js-recursion.html:26 > + request = evalAndLog("webkitIndexedDB.open('test')"); Could you change 'test' to 'transaction-abort-with-js-recursion'? Running the layout tests in parallel can fail if multiple tests are mucking with the same db, so we've been using the name of the test.
Adam Barth
Comment 8 2011-07-19 11:36:53 PDT
Comment on attachment 101036 [details] fix style issue + test Yay. Thanks!
Nate Chapin
Comment 9 2011-07-19 13:35:37 PDT
Created attachment 101373 [details] Patch for landing
WebKit Review Bot
Comment 10 2011-07-19 14:23:16 PDT
Comment on attachment 101373 [details] Patch for landing Rejecting attachment 101373 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=ec2-cq-02', '--port..." exit_code: 2 Last 500 characters of output: operties.html = TEXT fast/table/align-right-within-left-aligned-div.html = TEXT storage/indexeddb/transaction-abort-with-js-recursion.html = TEXT Regressions: Unexpected image mismatch : (5) fast/text/atsui-multiple-renderers.html = IMAGE fast/text/international/danda-space.html = IMAGE fast/text/international/thai-baht-space.html = IMAGE fast/text/international/thai-line-breaks.html = IMAGE platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html = IMAGE Full output: http://queues.webkit.org/results/9191008
Nate Chapin
Comment 11 2011-07-19 15:02:13 PDT
Created attachment 101394 [details] Patch for landing
WebKit Review Bot
Comment 12 2011-07-19 15:14:11 PDT
Comment on attachment 101394 [details] Patch for landing Clearing flags on attachment: 101394 Committed r91309: <http://trac.webkit.org/changeset/91309>
WebKit Review Bot
Comment 13 2011-07-19 15:14:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.