Fix non-debug bustage in nsNativeComponentLoader, this variable should not be debug-only.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 22 Jun 2010 16:22:17 -0400
changeset 47023 8aae857e15a17280afbd03a867ad54b7c3bd276f
parent 47022 14faec0675283d579ef621c95d00a0edf5536882
child 47024 bcb07835feedc5628db11f4d10455e3b9ff78d9f
push idunknown
push userunknown
push dateunknown
milestone1.9.3a6pre
Fix non-debug bustage in nsNativeComponentLoader, this variable should not be debug-only.
xpcom/components/nsNativeComponentLoader.cpp
--- a/xpcom/components/nsNativeComponentLoader.cpp
+++ b/xpcom/components/nsNativeComponentLoader.cpp
@@ -134,30 +134,25 @@ nsNativeModuleLoader::LoadModule(nsILoca
     if (!NS_IsMainThread()) {
         // If this call is off the main thread, synchronously proxy it
         // to the main thread.
         nsRefPtr<LoadModuleMainThreadRunnable> r = new LoadModuleMainThreadRunnable(this, aFile);
         NS_DispatchToMainThread(r, NS_DISPATCH_SYNC);
         return r->mResult;
     }
 
-#ifdef DEBUG
-    // Only load components that end in the proper dynamic library suffix
-    nsCAutoString filePath;
-    aFile->GetNativePath(filePath);
-    NS_ASSERTION(StringEndsWith(filePath, NS_LITERAL_CSTRING(MOZ_DLL_SUFFIX)),
-                 "Invalid DLL passed to the native module loader");
-#endif
-
     nsCOMPtr<nsIHashable> hashedFile(do_QueryInterface(aFile));
     if (!hashedFile) {
         NS_ERROR("nsIFile is not nsIHashable");
         return NULL;
     }
 
+    nsCAutoString filePath;
+    aFile->GetNativePath(filePath);
+
     NativeLoadData data;
 
     if (mLibraries.Get(hashedFile, &data)) {
         NS_ASSERTION(data.module, "Corrupt mLibraries hash");
         LOG(PR_LOG_DEBUG,
             ("nsNativeModuleLoader::LoadModule(\"%s\") - found in cache",
              filePath.get()));
         return data.module;