Bug 845190 - Revert previous attempt to fix and re-disable tests.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 11 Jun 2013 08:12:06 -0400
changeset 146126 8fe099852dc472aad700f6c3c1159b08fcecc151
parent 146125 1ac9367a6c23dcac1c14469eb18b79badf2017d1
child 146127 e8945a734ab708d35be19a03618a6cf35cf0ca2b
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs845190
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 845190 - Revert previous attempt to fix and re-disable tests.
netwerk/base/src/nsStreamTransportService.cpp
netwerk/base/src/nsStreamTransportService.h
toolkit/components/osfile/tests/xpcshell/xpcshell.ini
toolkit/components/search/tests/xpcshell/xpcshell.ini
--- a/netwerk/base/src/nsStreamTransportService.cpp
+++ b/netwerk/base/src/nsStreamTransportService.cpp
@@ -425,31 +425,24 @@ nsOutputStreamTransport::IsNonBlocking(b
     *result = false;
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 // nsStreamTransportService
 //-----------------------------------------------------------------------------
 
-bool nsStreamTransportService::sHasBeenShutdown = false;
-
 nsStreamTransportService::~nsStreamTransportService()
 {
     NS_ASSERTION(!mPool, "thread pool wasn't shutdown");
 }
 
 nsresult
 nsStreamTransportService::Init()
 {
-    if (sHasBeenShutdown) {
-      // Prevent any attempt at resurrection
-      // (see bug 845190)
-      return NS_ERROR_NOT_AVAILABLE;
-    }
     mPool = do_CreateInstance(NS_THREADPOOL_CONTRACTID);
     NS_ENSURE_STATE(mPool);
 
     // Configure the pool
     mPool->SetName(NS_LITERAL_CSTRING("StreamTrans"));
     mPool->SetThreadLimit(25);
     mPool->SetIdleThreadLimit(1);
     mPool->SetIdleThreadTimeout(PR_SecondsToInterval(30));
@@ -510,15 +503,15 @@ nsStreamTransportService::CreateOutputTr
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsStreamTransportService::Observe(nsISupports *subject, const char *topic,
                                   const PRUnichar *data)
 {
   NS_ASSERTION(strcmp(topic, "xpcom-shutdown-threads") == 0, "oops");
-  sHasBeenShutdown = true;
+
   if (mPool) {
     mPool->Shutdown();
     mPool = nullptr;
   }
   return NS_OK;
 }
--- a/netwerk/base/src/nsStreamTransportService.h
+++ b/netwerk/base/src/nsStreamTransportService.h
@@ -22,15 +22,9 @@ public:
     nsresult Init();
 
     nsStreamTransportService() {}
 
 private:
     ~nsStreamTransportService();
 
     nsCOMPtr<nsIThreadPool> mPool;
-
-    /**
-     * |true| if we have shutdown once already, in which
-     * case we should reject any attempt to resurrect.
-     */
-    static bool sHasBeenShutdown;
 };
--- a/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/osfile/tests/xpcshell/xpcshell.ini
@@ -2,8 +2,10 @@
 head =
 tail =
 
 [test_osfile_closed.js]
 [test_path.js]
 [test_osfile_async.js]
 [test_profiledir.js]
 [test_logging.js]
+# bug 845190 - thread pool wasn't shutdown assertions
+skip-if = os == "win" && debug
--- a/toolkit/components/search/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/search/tests/xpcshell/xpcshell.ini
@@ -1,15 +1,17 @@
 [DEFAULT]
 head = head_search.js
 tail = 
 firefox-appdir = browser
 
 [test_nocache.js]
 [test_645970.js]
+# Bug 845190: Too many intermittent assertions on Linux (ASSERTION: thread pool wasn't shutdown)
+skip-if = debug && os == "linux"
 [test_identifiers.js]
 [test_init_async_multiple.js]
 [test_init_async_multiple_then_sync.js]
 [test_json_cache.js]
 [test_migratedb.js]
 [test_nodb.js]
 [test_nodb_pluschanges.js]
 [test_save_sorted_engines.js]