bug 203362 - Turn on building IDispatch code by default. r=bryner, sr=alecf, a=sspitzer, IsEqualGUID patch r=dbradley, sr=alecf, a=asa

git-svn-id: svn://10.0.0.236/trunk@141960 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbradley%netscape.com 2003-04-30 04:13:58 +00:00
parent f7f1dbd1a9
commit f254b56ec2
3 changed files with 28 additions and 14 deletions

View File

@ -3730,10 +3730,13 @@ dnl ========================================================
dnl ActiveX
dnl ========================================================
MOZ_NO_ACTIVEX_SUPPORT=1
MOZ_ACTIVEX_SCRIPTING_SUPPORT=
case "$target_os" in
msvc*|mks*|cygwin*|mingw*)
MOZ_NO_ACTIVEX_SUPPORT=
if test -z "$GNU_CC"; then
MOZ_NO_ACTIVEX_SUPPORT=
MOZ_ACTIVEX_SCRIPTING_SUPPORT=1
fi
;;
esac
@ -3743,16 +3746,11 @@ MOZ_ARG_DISABLE_BOOL(activex,
MOZ_NO_ACTIVEX_SUPPORT= )
AC_SUBST(MOZ_NO_ACTIVEX_SUPPORT)
MOZ_ACTIVEX_SCRIPTING_SUPPORT=
if test -n "$_WIN32_MSVC"; then
MOZ_ARG_ENABLE_BOOL(activex-scripting,
[ --enable-activex-scripting
Enable building of ActiveX scripting
and plugin support (win32 only)],
MOZ_ACTIVEX_SCRIPTING_SUPPORT=1,
MOZ_ACTIVEX_SCRIPTING_SUPPORT=)
fi
MOZ_ARG_DISABLE_BOOL(activex-scripting,
[ --disable-activex-scripting
Disable building of ActiveX scripting support (win32)],
MOZ_ACTIVEX_SCRIPTING_SUPPORT=,
MOZ_ACTIVEX_SCRIPTING_SUPPORT=1)
AC_SUBST(MOZ_ACTIVEX_SCRIPTING_SUPPORT)
if test -n "$MOZ_NO_ACTIVEX_SUPPORT" -a -n "$MOZ_ACTIVEX_SCRIPTING_SUPPORT";

View File

@ -226,6 +226,7 @@ install-securitypolicy: nsAxSecurityPolicy.js
install-prefs: activex.js
$(INSTALL) $< $(DIST)/bin/defaults/pref
ifdef MOZ_USE_ACTIVEX_PLUGIN
libs:: install-plugin install-prefs
ifdef MOZ_ACTIVEX_PLUGIN_LIVECONNECT
@ -239,6 +240,7 @@ endif
ifdef XPC_IDISPATCH_SUPPORT
libs:: install-securitypolicy
endif
endif
## Note: Ensure you create the redist dir containing the correct runtime dlls
@ -254,7 +256,7 @@ ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT
$(ZIP) -9 -j $(DIST)/bin/$(XPIFILE) $(XPIDL_GEN_DIR)/nsIMozAxPlugin.xpt
endif
$(SHARED_LIBRARY) : $(DEFFILE) copy-sources
$(SHARED_LIBRARY) : $(DEFFILE)
$(DEFFILE):
-rm -f $@

View File

@ -138,6 +138,20 @@ XPCDispatchTearOff::~XPCDispatchTearOff()
NS_COM_IMPL_ADDREF(XPCDispatchTearOff)
NS_COM_IMPL_RELEASE(XPCDispatchTearOff)
// See bug 127982:
//
// Microsoft's InlineIsEqualGUID global function is multiply defined
// in ATL and/or SDKs with varying namespace requirements. To save the control
// from future grief, this method is used instead.
static inline BOOL _IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
{
return (
((PLONG) &rguid1)[0] == ((PLONG) &rguid2)[0] &&
((PLONG) &rguid1)[1] == ((PLONG) &rguid2)[1] &&
((PLONG) &rguid1)[2] == ((PLONG) &rguid2)[2] &&
((PLONG) &rguid1)[3] == ((PLONG) &rguid2)[3]);
}
STDMETHODIMP XPCDispatchTearOff::InterfaceSupportsErrorInfo(REFIID riid)
{
static const IID* arr[] =
@ -147,7 +161,7 @@ STDMETHODIMP XPCDispatchTearOff::InterfaceSupportsErrorInfo(REFIID riid)
for(int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
{
if(InlineIsEqualGUID(*arr[i],riid))
if(_IsEqualGUID(*arr[i],riid))
return S_OK;
}
return S_FALSE;