From 718ca7a4a65759f0ba306a51e59ff812c13661fb Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Mon, 12 Dec 2005 15:08:16 +0000 Subject: [PATCH] Bug 315090 - convert xpconnect utils/tests to use frozen linkage, r=shaver --- js/src/xpconnect/shell/Makefile.in | 2 +- js/src/xpconnect/shell/xpcshell.cpp | 2 ++ js/src/xpconnect/tests/Makefile.in | 8 ++++++-- js/src/xpconnect/tests/TestXPC.cpp | 7 +++++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/js/src/xpconnect/shell/Makefile.in b/js/src/xpconnect/shell/Makefile.in index 22a4eddd70a2..cbc19bae4474 100644 --- a/js/src/xpconnect/shell/Makefile.in +++ b/js/src/xpconnect/shell/Makefile.in @@ -45,7 +45,6 @@ include $(DEPTH)/config/autoconf.mk MODULE = xpcshell SIMPLE_PROGRAMS = xpcshell$(BIN_SUFFIX) -MOZILLA_INTERNAL_API = 1 REQUIRES = xpconnect \ xpcom \ @@ -56,6 +55,7 @@ REQUIRES = xpconnect \ CPPSRCS = xpcshell.cpp LIBS = \ + $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(MOZ_JS_LIBS) \ $(XPCOM_LIBS) \ $(NSPR_LIBS) \ diff --git a/js/src/xpconnect/shell/xpcshell.cpp b/js/src/xpconnect/shell/xpcshell.cpp index 665a150eb1c1..3589386101a9 100644 --- a/js/src/xpconnect/shell/xpcshell.cpp +++ b/js/src/xpconnect/shell/xpcshell.cpp @@ -45,6 +45,8 @@ /* XPConnect JavaScript interactive shell. */ #include +#include "nsServiceManagerUtils.h" +#include "nsComponentManagerUtils.h" #include "nsIXPConnect.h" #include "nsIXPCScriptable.h" #include "nsIInterfaceInfo.h" diff --git a/js/src/xpconnect/tests/Makefile.in b/js/src/xpconnect/tests/Makefile.in index c713a59aa57d..c5beb8cdd7e7 100644 --- a/js/src/xpconnect/tests/Makefile.in +++ b/js/src/xpconnect/tests/Makefile.in @@ -45,7 +45,6 @@ include $(DEPTH)/config/autoconf.mk MODULE = TestXPC SIMPLE_PROGRAMS = TestXPC$(BIN_SUFFIX) -MOZILLA_INTERNAL_API = 1 REQUIRES = xpconnect \ xpcom \ @@ -54,11 +53,16 @@ REQUIRES = xpconnect \ xpconnect_tests \ $(NULL) -DIRS = idl components +DIRS = idl + +ifndef MOZ_ENABLE_LIBXUL +DIRS += components +endif CPPSRCS = TestXPC.cpp LIBS = \ + $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \ $(LIBS_DIR) \ $(MOZ_JS_LIBS) \ $(MOZ_COMPONENT_LIBS) \ diff --git a/js/src/xpconnect/tests/TestXPC.cpp b/js/src/xpconnect/tests/TestXPC.cpp index bfd47c9c4e5c..cfb3a6d8f648 100644 --- a/js/src/xpconnect/tests/TestXPC.cpp +++ b/js/src/xpconnect/tests/TestXPC.cpp @@ -42,6 +42,8 @@ #include +#include "nsComponentManagerUtils.h" +#include "nsServiceManagerUtils.h" #include "nsIXPConnect.h" #include "nsIScriptError.h" #include "nsIServiceManager.h" @@ -52,8 +54,9 @@ #include "nsMemory.h" #include "nsIXPCSecurityManager.h" #include "nsICategoryManager.h" -#include "nsString.h" #include "nsIVariant.h" +#include "nsStringAPI.h" +#include "nsEmbedString.h" #include "jsapi.h" @@ -515,7 +518,7 @@ TestArgFormatter(JSContext* jscontext, JSObject* glob, nsIXPConnect* xpc) goto out; } - if(d_in != d_out) + if(!d_in.Equals(d_out)) { printf(" JS to native for %%is returned the wrong value -- FAILED!\n"); goto out;