Browse Source

loader: remove unncessary main thread assertion in LoadModule; turn other assertions fatal in debug

Mark Yen 12 years ago
parent
commit
6c37dcabac
1 changed files with 2 additions and 5 deletions
  1. 2 5
      xpcom/src/loader/pyloader.cpp

+ 2 - 5
xpcom/src/loader/pyloader.cpp

@@ -80,7 +80,7 @@ NS_IMPL_THREADSAFE_ISUPPORTS1(nsPythonModuleLoader,
 nsresult
 nsresult
 nsPythonModuleLoader::Init()
 nsPythonModuleLoader::Init()
 {
 {
-    NS_ASSERTION(NS_IsMainThread(), "nsPythonModuleLoader::Init not on main thread?");
+    MOZ_ASSERT(NS_IsMainThread(), "nsPythonModuleLoader::Init not on main thread?");
 
 
     LOG(PR_LOG_DEBUG, ("nsPythonModuleLoader::Init()"));
     LOG(PR_LOG_DEBUG, ("nsPythonModuleLoader::Init()"));
 
 
@@ -112,9 +112,6 @@ done:
 const mozilla::Module*
 const mozilla::Module*
 nsPythonModuleLoader::LoadModule(mozilla::FileLocation& aFileLocation)
 nsPythonModuleLoader::LoadModule(mozilla::FileLocation& aFileLocation)
 {
 {
-    NS_ASSERTION(NS_IsMainThread(), "nsPythonModuleLoader::LoadModule not on main thread?");
-
-
     if (aFileLocation.IsZip()) {
     if (aFileLocation.IsZip()) {
         NS_ERROR("Python components cannot be loaded from JARs");
         NS_ERROR("Python components cannot be loaded from JARs");
         return NULL;
         return NULL;
@@ -164,7 +161,7 @@ done:
 void
 void
 nsPythonModuleLoader::UnloadLibraries()
 nsPythonModuleLoader::UnloadLibraries()
 {
 {
-    NS_ASSERTION(NS_IsMainThread(), "nsPythonModuleLoader::UnloadLibraries not on main thread?");
+    MOZ_ASSERT(NS_IsMainThread(), "nsPythonModuleLoader::UnloadLibraries not on main thread?");
 }
 }