Bug 612356 - Add NS_SetDllDirectory to dlldeps.cpp; r=khuey a=NPOTB
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 15 Nov 2010 15:16:34 -0500
changeset 57967 06e04efa46d61af7febc0dba12241c591f2cff5e
parent 57966 6f28a60c1c71f5f938155bdebb97b9527d50c594
child 57968 baa51e6d4a1540cfa4139cd4777f413d4f8bf755
push idunknown
push userunknown
push dateunknown
reviewerskhuey, NPOTB
bugs612356
milestone2.0b8pre
Bug 612356 - Add NS_SetDllDirectory to dlldeps.cpp; r=khuey a=NPOTB
toolkit/library/libxul-config.mk
xpcom/build/dlldeps.cpp
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -56,16 +56,17 @@ CPPSRCS += \
 
 RCINCLUDE = xulrunner.rc
 
 ifndef MOZ_NATIVE_ZLIB
 CPPSRCS += dlldeps-zlib.cpp
 endif
 
 LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/windows
+LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 endif
 
 ifneq (,$(filter WINNT OS2,$(OS_ARCH)))
 REQUIRES += libreg
 DEFINES	+= -DZLIB_DLL=1
 endif
 
 ifeq ($(OS_ARCH),OS2)
@@ -81,16 +82,17 @@ CPPSRCS += dlldeps-zlib.cpp
 endif
 
 ifdef MOZ_ENABLE_LIBXUL
 RESFILE = xulrunos2.res
 RCFLAGS += -i $(topsrcdir)/widget/src/os2
 endif
 
 LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/os2
+LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 endif
 
 # dependent libraries
 ifdef MOZ_IPC
 STATIC_LIBS += \
   jsipc_s \
   domipc_s \
   domplugins_s \
--- a/xpcom/build/dlldeps.cpp
+++ b/xpcom/build/dlldeps.cpp
@@ -36,16 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 // Force references to all of the symbols that we want exported from
 // the dll that are located in the .lib files we link with
 
 #ifdef XP_WIN
 #include <windows.h>
 #include "nsWindowsRegKey.h"
+#include "nsSetDllDirectory.h"
 #ifdef DEBUG
 #include "pure.h"
 #endif
 #endif
 #include "nsXULAppAPI.h"
 #include "nsXPCOMGlue.h"
 #include "nsVoidArray.h"
 #include "nsTArray.h"
@@ -276,16 +277,17 @@ void XXXNeverCalled()
     }
 
     nsXPCOMCycleCollectionParticipant();
     nsCycleCollector_collect(nsnull);
 #ifdef XP_WIN
     sXPCOMHasLoadedNewDLLs = !sXPCOMHasLoadedNewDLLs;
     NS_SetHasLoadedNewDLLs();
     NS_NewWindowsRegKey(nsnull);
+    NS_SetDllDirectory(nsnull);
 #if defined (DEBUG) && !defined (WINCE)
     PurePrintf(0);
 #endif
 #endif
 
     NS_NewThread(nsnull, nsnull);
     NS_GetCurrentThread(nsnull);
     NS_GetCurrentThread();