Bug 612356 - Add NS_SetDllDirectory to dlldeps.cpp; r=khuey a=NPOTB
--- 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();