diff --git a/toolkit/components/contentprefs/src/nsContentPrefService.js b/toolkit/components/contentprefs/src/nsContentPrefService.js index 4cf4ca5631a..900cc4a3b9c 100644 --- a/toolkit/components/contentprefs/src/nsContentPrefService.js +++ b/toolkit/components/contentprefs/src/nsContentPrefService.js @@ -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 diff --git a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js b/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js index 8f4f8c88f24..be528441a95 100644 --- a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js +++ b/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js @@ -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");