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
This changes the location bar's AutoComplete provider to use asynchronous
queries instead of synchronous ones. No more blocking the main thread FTW!
r=mak
r=Mardak
r=dietrich
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
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
--HG--
rename : storage/test/unit/test_storage_statement_executeAsync.js => storage/test/unit/test_statement_executeAsync.js
This gets rid of the old, unused native code test file for storage. It adds two
more test files which test our C++ helper classes to ensure that they behave as
advertised. Also fixes a bug found in mozStorageTransaction that was uncovered
while writing these tests.
r=asuth
This exposes the templated nsIVariant implementation that storage uses
internally so that consumers can use it as well.
r=bsmedberg
--HG--
rename : storage/src/mozStorageVariant.cpp => storage/src/Variant.cpp
rename : storage/src/mozStorageVariant.h => storage/src/Variant.h
We don't really want to give this pointer out to consumers since we track some
state, and if they call SQLite functions on it, can cause our internal state to
be inaccurate.
r=asuth
This changeset adds a new error result for storage (NS_ERROR_STORAGE_BUSY) that
maps directly to when SQLite would return SQLITE_BUSY.
r=asuth
--HG--
rename : storage/src/mozStorage.h => storage/src/mozStoragePrivateHelpers.h
This changeset also fixes a few issues where we were holding a lock while and
kills off a few other race conditions that were noticed in the course of fixing
this bug.
r=bent
While the race was technically "safe", we could have possibly wrongly tried to
commit or rollback. This changeset makes us operate sanely in all conditions.
r=bent
This changeset adds a language helper to mozStorageStatement so it gets the
attributes and methods that mozIStorageStatementWrapper has. We can now mark
the wrapper as depreciated.
r=vlad
r=mrbkap
--HG--
rename : storage/test/unit/test_storage_statement_wrapper.js => storage/test/unit/test_statement_wrapper_automatically.js
This adds a method to mozIStorageStatement to allow for a statement to execute
asynchronously and report to a callback. For writes, this can move fsyncs,
which can be painful, off of the main thread.
r=vlad
sr=shaver