Bug 546445 - Asynchronous getPref triggers debug assertion when shutting down sqlite. r=sdwilsh

This commit is contained in:
Ryan Flint 2010-02-23 12:19:36 -05:00
parent b4e4a16416
commit 47d53a6d69
2 changed files with 6 additions and 4 deletions

View File

@ -101,6 +101,12 @@ ContentPrefService.prototype = {
_destroy: function ContentPrefService__destroy() {
this._observerSvc.removeObserver(this, "xpcom-shutdown");
// Finalize statements which may have been used asynchronously.
if (this.__stmtSelectPref)
this.__stmtSelectPref.finalize();
if (this.__stmtSelectGlobalPref)
this.__stmtSelectGlobalPref.finalize();
// Delete references to XPCOM components to make sure we don't leak them
// (although we haven't observed leakage in tests). Also delete references
// in _observers and _genericObservers to avoid cycles with those that

View File

@ -38,10 +38,6 @@ var cps = Cc["@mozilla.org/content-pref/service;1"].
var uri = ContentPrefTest.getURI("http://www.example.com/");
function run_test() {
//XXX Temporarily disabled due to sqlite assertions
do_check_true(true);
return;
do_test_pending();
cps.setPref(uri, "asynctest", "pie");