Commit Graph

22 Commits

Author SHA1 Message Date
Marco Bonardo
a363c063f6 Bug 658135 - Use sqlite3_stmt_readonly to check if multiple async statements need a transaction.
r=sdwilsh
2011-05-24 00:15:01 +02:00
Marco Bonardo
37cc2cd994 Bug 637957 - Followup, add proper QI. rs=mossop a=blocker-orange-fix 2011-03-02 21:25:11 +01:00
Marco Bonardo
c9a5aabb5f Bug 637957 - Make results notifier hold a strong reference to mCallback, to prevent it being destroyed prematurely.
r=sdwilsh a=blocker
2011-03-02 19:55:08 +01:00
Shawn Wilsher
bd975c9f6f Bug 635482 - Crash [@ mozalloc_abort(char const* const) | NS_DebugBreak_P | AbortIfOffMainThreadIfCheckFast ] (was: [@ mozalloc_abort(char const* const) | NS_DebugBreak_P]) from nsCycleCollectingAutoRefCnt::decr with mozilla::storage::BindingParams::Release
Be very explicit about what thread we release objects on.
r=asuth
a=blocking
2011-02-28 11:52:31 -08:00
Phil Ringnalda
0b2c623018 Back out f9e075d85552 (Bug 635482) to investigate Mac tp4 regression, a=backout 2011-02-27 10:27:44 -08:00
Shawn Wilsher
c659beeda2 Bug 635482 - Crash [@ mozalloc_abort(char const* const) | NS_DebugBreak_P | AbortIfOffMainThreadIfCheckFast ] (was: [@ mozalloc_abort(char const* const) | NS_DebugBreak_P]) from nsCycleCollectingAutoRefCnt::decr with mozilla::storage::BindingParams::Release
Be very explicit about what thread we release objects on.
r=asuth
a=blocking
2011-02-25 16:12:00 -08:00
Shawn Wilsher
688f6b6cd2 Bug 571599 - Use sqlite3_unlock_notify
sr=vlad
r=bent
r=asuth
2010-06-21 14:23:00 -07:00
Andrew Sutherland
ddd3c4327f Bug 507414 - Add a createAsyncStatement API on mozIStorageConnection. r=sdwilsh, sr=vlad.
--HG--
rename : storage/src/mozStorageStatementJSHelper.cpp => storage/src/mozStorageAsyncStatementJSHelper.cpp
rename : storage/src/mozStorageStatementJSHelper.h => storage/src/mozStorageAsyncStatementJSHelper.h
rename : storage/src/mozStorageStatementParams.cpp => storage/src/mozStorageAsyncStatementParams.cpp
rename : storage/src/mozStorageStatementParams.h => storage/src/mozStorageAsyncStatementParams.h
2010-03-24 00:32:40 -07:00
Shawn Wilsher
e7bf5fc1f2 Bug 496019 - mozilla::storage::Connection::Close can spin a nested event loop
Creates a new close method that must be used when using asynchronous statements,
and disallow Close from being called in that case.
r=asuth
sr=vlad
2009-11-09 09:58:34 -08:00
Shawn Wilsher
3889b768e7 Bug 507674 - Safer protection of AsyncExecuteStatements::mState and AsyncExecuteStatements::mCancelRequested
This is essentially a backout of bug 506805, followed by changing the locking
protection rules to only protect mCancelRequested writing on the calling thread,
and reading on the background thread.

--HG--
extra : rebase_source : 249a61e40c2fd140527f034e36e8c1a53518baac
2009-09-02 13:30:24 -07:00
Shawn Wilsher
11b33f0ab8 Bug 506805 - Remove locking in AsyncExecuteStatements
This removes the use of the shared mutex in AsyncExecuteStatements.  We now rely
on PR_AtomicSet and the volatile keyword.  This results in zero lock contention
between the calling thread and the background thread if cancel is ever called.
r=asuth
r=bent
sr=vlad
2009-07-29 17:24:50 -07:00
Shawn Wilsher
9981a52b9b Bug 506959 - AsyncExecuteStatements assumes ms, but calls functions that assume microseconds
This fixes the code to use functions that expect milliseconds instead of
microseconds, and updates to use the new TimeStamp and TimeDuration class.
r=asuth
2009-07-28 13:18:10 -07:00
Shawn Wilsher
463b989609 Bug 506022 - Avoid obtaining the database mutex at all costs in Connection::ExecuteAsync
Stop calling any SQLite functions that would acquire the database mutex inside
Connection::ExecuteAsync.  Additionally, do not actually bind parameters when
the binding functions are called, but rather when we execute (so for async
statements, that will happen on the background thread creating no mutex
contention with the main thread).
r=asuth
2009-07-28 10:21:03 -07:00
Shawn Wilsher
6cbf5ad014 Bug 490085 - Add ability to bind multiple sets of parameters and execute asynchronously
Improves the asynchronous API by allowing multiple parameters to be bound before
executing it.  The statement is then executed with each set of parameters
asynchronously.
r=asuth
sr=vlad
2009-06-17 12:12:51 -07:00
Shawn Wilsher
1ef152638f Bug 488148 - Share the mutex used by AsyncExecuteStatements on Connection
Greatly reduces the number of mutexes used when using the asynchronous storage
API.
r=bent
r=asuth
2009-06-17 12:12:43 -07:00
Shawn Wilsher
2c58e01641 Backed out changeset 0997bcc75daf (bug 488148). Silly me - this patch is wrong! 2009-06-19 12:21:44 -07:00
Shawn Wilsher
b85d50d660 Bug 488148 - Share the mutex used by AsyncExecuteStatements on Connection
Greatly reduces the number of mutexes used when using the asynchronous storage
API.
r=bent
r=asuth
2009-06-17 12:12:43 -07:00
Shawn Wilsher
9f81f7a68f Bug 489624 - Update mozStorageRow.* to follow style guidelines
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
73a73e52ca Bug 489617 - Update mozStorageResultSet.* to follow style guidelines
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
6f67edf0cc Bug 489612 - Update mozStoragePrivateHelpers.* to follow style guidelines
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:56 -04:00
Shawn Wilsher
b139ffaf75 Bug 489603 - Update mozStorageError.* to follow style guidelines
Consistent spacing, consistent naming, and namespaces - OH MY!
r=asuth
2009-05-08 20:29:55 -04:00
Shawn Wilsher
41a0fe0c5f Bug 489257 - Rename and update mozStorageEvents.* to mozStorageAsyncStatementExecution.*
Renames the files to be more representative to what they actually contain.  This
also updates the files to follow the storage style guidelines.
r=asuth

--HG--
rename : storage/src/mozStorageEvents.cpp => storage/src/mozStorageAsyncStatementExecution.cpp
rename : storage/src/mozStorageEvents.h => storage/src/mozStorageAsyncStatementExecution.h
2009-04-21 11:27:03 -04:00