SQLTransactionBackend::doCleanup() should not nullify its current
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Feb 2013 02:51:44 +0000 (02:51 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Feb 2013 02:51:44 +0000 (02:51 +0000)
commite5109a61fa72182eacd67c2571914bc6799679cd
tree838afc5a7e29e533e077699b45c778ee0b5c3ac2
parentd711c70001a491ec53a2996e9e71aea94bb6785c
SQLTransactionBackend::doCleanup() should not nullify its current
statement and transaction error fields.
https://bugs.webkit.org/show_bug.cgi?id=110826.

Reviewed by Geoffrey Garen.

The reason for this is because the frontend SQLTransaction may have
tasks that are already registered via callOnMainThread(), and may
invoke transaction state functions that access these objects in the
SQLTransactionBackend. This proves to be problematic if the database
was interrupted resulting in doCleanup() being called concurrently
while those states are executing.

Instead, we leave their clean up to the SQLTransactionBackend destructor
which is guaranteed to only be called when the SQLTransaction is also
destructing i.e. these objects are no longer needed.

No new tests.

* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::doCleanup):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp