Commit Graph

136 Commits

Author SHA1 Message Date
Nilay Vaish
4bf92afb22 Bug 473268 - We should use forget instead of swap in mozStorageService.cpp; r=sdwilsh 2009-02-03 15:42:28 +01:00
Andrew Sutherland
d63e071cfb Bug 463907 - mozStorageConnection::ExecuteAsync does not check that provided statements have not been finalized; r=sdwilsh 2009-02-03 15:42:22 +01:00
Fred Jendrzejewski
8759b06c00 Bug 466622. Replace nsCStringArray with nsTArray<nsCString> for more consistent code and fewer heap allocations. r+sr=roc,r=bsmedberg
--HG--
extra : rebase_source : b963bf5de9d9c445b14620479691482512e0faf2
2009-01-22 17:15:34 +13:00
Blake Kaplan
bc907b65e6 Add missing return (from bug 473845). 2009-01-21 17:12:41 -08:00
Shawn Wilsher
5de65e03a2 Bug 473845 - Break a potential cycle with XPConnect and mozStroageService
This changeset removes a cycle that gets created between XPConnect and the
storage service.  This accomplishes this by releasing the cached reference to
XPConnect during xpcom-shutdown.

This was the last remaining leak of the browser-chrome test harness, so this
also sets the leak threshold to zero for that test.

r=bent
2009-01-21 16:52:16 -05:00
Drew Willcoxon
30cb71bdf3 Bug 384954 - Get xpcshell tests for wrapped statements
r=sdwilsh
2009-01-21 14:26:07 -05:00
Robert Sesek
49b3b4bd73 Bug 431473. Kill unused mozIStorageDataSet. r=sdwilsh 2009-01-19 21:44:31 +13:00
Fred Jendrzejewski
7d5761cdfa Bug 461047 - Replace nsStringArray with nsTArray<nsString>. r+sr=roc 2009-01-18 21:14:14 +01:00
Robert O'Callahan
1a9b00de4e Backed out changeset 8019a959aade 2009-01-16 22:20:33 +13:00
Fred Jendrzejewski
b79ad6fa55 Bug 461047. Replace nsStringArray with nsTArray<nsString>. r+sr=roc
--HG--
extra : rebase_source : 7a20af24c97867efbb28dafa6a70ea1b4cf00e58
2009-01-16 20:51:04 +13:00
Andrew Sutherland
51abf8490c Bug 445525 - set SQLITE_CONFIG_MEMSTATUS to 0. v1.1 turn off SQLITE_CONFIG_MEMSTATUS at init-time. r=sdwilsh 2008-12-13 22:38:18 -08:00
Andrew Sutherland
c28b95be23 Bug 463988 - Gloda: mozStorageConnection holds lock while calling outside its module leading to PR_ASSERT(lock->owner != me) on shutting down while indexing is active. v1 add flag that indicates async thread is shutting down, don't call nsIThread::Shutdown with a lock held. r=sdwilsh. 2008-12-13 18:59:17 -08:00
Marco Bonardo
ecb72b2c5d Bug 467856 - Expose SQLITE_IOERR, r=sdwilsh 2008-12-09 21:39:32 +01:00
Shawn Wilsher
c10c68340d fix for windows bustage 2008-12-08 17:36:20 -05:00
Shawn Wilsher
dc0b4a75a2 Bug 462173 - We treat transaction errors as fatal when we should not
r=asuth
2008-12-08 17:14:14 -05:00
Shawn Wilsher
122bf532ee Bug 448114 - Notify about non-finalized statements in debug builds
r=asuth
2008-12-08 17:14:14 -05:00
Andrew Sutherland
d5f1c956df Bug 462432 - Leak mAsyncExecutionMutex
r=sdwilsh
2008-11-27 12:34:40 -08:00
Shawn Wilsher
0a8f056851 Addressing review nit for bug 464202 that was improperly addressed in changeset 59d84ac24da2
original patch r=mrbkap, a=beltzner
2008-11-20 14:11:03 -05:00
Jeff Walden
d344271c46 Address followup nit for bug 464202. 2008-11-19 11:54:29 -08:00
Shawn Wilsher
1b5c15b190 Bug 457743 - Automatic wrapper creates cycles, and thus leaks. r=dcamp, r=asuth, a=beltzner for 1.9.1b2 2008-11-19 11:33:00 -08:00
Shawn Wilsher
ff3b4fd01c Bug 464202 - nsGlobalWindow leak running browser-chrome Mochitests. r=mrbkap a=beltzner 2008-11-19 01:11:30 -05:00
Shawn Wilsher
0f58a116a4 Bug 461344 - abort if the version of sqlite we are using is not new enough
This adds a runtime check to ensure that the version of SQLite that is running
is the same as the one that we were compiled with.  If the check fails, we will
display a prompt to the user, and abort.
r=bsmedberg
2008-10-31 20:38:58 -04:00
Shawn Wilsher
39902a3ad9 Bug 451815 - Need a more reliable way to indicate SQLITE_BUSY
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
2008-10-30 18:50:00 -04:00
Shawn Wilsher
391d9528c6 Bug 462434 - Transaction semantics are bad
This propagates errors in starting and ending transactions.
r=asuth
2008-10-30 18:46:25 -04:00
Shawn Wilsher
dc609f2b37 Bug 454740 - Asynchronous storage should batch/chunk results
This changeset batches results obtained by the async storage API so we are not
flooding the calling thread with so many events.
r=asuth
2008-10-29 13:13:32 -04:00
Serge Gautherie
072cb01113 Bustage fix (= missed additional change) for
Bug 460635 - There should be one async execution thread per mozStorageConnection connection; v1.2; r=(bugmail + sdwilsh)
2008-10-29 05:09:23 +01:00
Andrew Sutherland
6d099dfd18 Bug 460635 - There should be one async execution thread per mozStorageConnection connection; v1.2; r=(bugmail + sdwilsh) 2008-10-29 04:53:19 +01:00
Shawn Wilsher
92b873c0ea Bug 458998 - AsyncExecute helper classes can complete() before they are added to mPendingEvents
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
2008-10-24 18:30:07 -04:00
Shawn Wilsher
109431d7e2 Bug 461263 - Race condition exists with mozStorageTransaction
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
2008-10-24 16:50:01 -04:00
Shawn Wilsher
7d6e03614c Bug 458811 - Allow for multiple statements to be executed at in a transaction asynchronously
This changeset allows consumers to execute a series of statements, in order,
asynchronously in a transaction.
r=dcamp
sr=sicking
2008-10-13 18:45:40 -04:00
Shawn Wilsher
63c721e654 Bug 458756 - Use raw sqlite3_stmt pointers instead of the mozStorageStatement object for async statements
This ends up saving us a bunch of work when we execute a statement
asynchronously, and makes bug 458811 easier to do.
r=dcamp
2008-10-10 17:41:31 -04:00
Shawn Wilsher
88ea2a123a comment change to kick off new builds
rs=me
2008-10-09 20:29:14 -04:00
Shawn Wilsher
b05d1e3d70 Bug 453722 - Do not need to safeguard more than one call to Init for storage service
Bug 449822 made it so services can not be initialized more than once when being
called from multiple threads.  Storage used to protect against this, but no
longer needs to do this (which this changeset makes us do).
r=bent
2008-09-25 14:28:29 -04:00
Doug Turner
78944ebcd0 Bug 456489 - WinCE Compiler keyword interface used in mozStorageRow.cpp. patch by wolfe, r=sdwilsh 2008-09-23 11:03:48 -07:00
Doug Turner
532a8f794c Bug 456471 - mozIStorageError IDL file needs ERROR undefined for WinCE / WinMobile. patch by wolfe, r=sdwilsh 2008-09-23 11:02:55 -07:00
Andrew Sutherland
801ff3b722 Bug 455202 - executeAsync without listener/callback results in segfault when error encountered; test part; r=sdwilsh 2008-09-15 18:50:21 +02:00
Andrew Sutherland
b08b3ce98a Bug 455202 - executeAsync without listener/callback results in segfault when error encountered; fix part; r=sdwilsh 2008-09-15 18:49:18 +02:00
Shawn Wilsher
0185fdd2c7 Bustage fix - double semi-colon. 2008-09-12 17:40:55 -04:00
Shawn Wilsher
411ab513e4 Bug 452897 - Automatically provide the wrapper for JavaScript
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
2008-09-12 17:30:41 -04:00
Shawn Wilsher
3c7e641f24 Bug 452897 - Automatically provide the wrapper for JS
This changeset has no code changes - it just separates three classes that were
all contained in one file into three files (with appropriate headers).  This is
being done to make the actual code changes for the bug simpler.
rs=me
2008-09-12 17:30:37 -04:00
Shawn Wilsher
07b0c50926 Bug 452836 - Optimize calls to sqlite3_prepare_v2
This changeset makes all calls pass -1 for length which indicates that the
string is null terminated.
r=Neil
2008-09-03 12:20:10 -04:00
Jason Orendorff
4b74677d5e Bug 407216 - DOM quick stubs - faster paths for top N DOM methods (r+sr=jst, security r=mrbkap, build r=bsmedberg)
* * *
* * *
* * *
2008-08-19 21:38:24 -05:00
Shawn Wilsher
0160a5a9a4 Bug 452836 - Optimize calls to sqlite3_prepare_v2
This makes sqlite not copy the sql string when preparing it, saving us a string
copy every time.
r=bholley
2008-08-29 17:19:23 -04:00
Shawn Wilsher
8f4c08beda Bug 452833 - Do not loop if we get SQLITE_SCHEMA
We used to have to try again if we got SQLITE_SCHEMA back from sqlite when we
prepare a statement.  However, this isn't needed with the new v2 interface,
which we now use.
r=bholley
2008-08-29 17:17:01 -04:00
Shawn Wilsher
76d3a2e23b Bug 451058 - Address post-review comments.
This addresses some comments that were brought up after the code had already
landed.
r=Neil
2008-08-29 16:46:14 -04:00
Shawn Wilsher
44a275974f Bug 452841 - Remove hack in mozStorageStatement::Initialize
This removes some code that was at one time needed to work around a sqlite but
that no longer exists.
r=vlad
2008-08-29 16:42:12 -04:00
Shawn Wilsher
08e0233a18 Bug 451463 - mozStorageStatement needs threadsafe refcounting
This changeset makes mozStoageStatement use threadsafe refcounting.  The class
is still not threadsafe, but JS consumers cannot create a statement off of the
main thread since it would be garbage collected on the main thread.
r=bent
2008-08-27 13:11:02 -04:00
Shawn Wilsher
8efcc4cad7 Bug 448607 - Includes and comments are not accurate in mozStorageBackground.*
This fixes some comments that are wrong and removes unneeded includes.
rs=me; there's really no change here.
2008-08-27 13:05:03 -04:00
Jason Orendorff
f9365c3994 Backing out changeset cf6c811e1272 (bug 407216) due to debug assertions. 2008-08-19 22:28:26 -05:00
Jason Orendorff
fe99024391 Bug 407216 - DOM quick stubs - faster paths for top N DOM methods (r+sr=jst, security r=mrbkap, build r=bsmedberg)
* * *
* * *
2008-08-19 21:38:24 -05:00