diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-04-30 07:20:21 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-04-30 07:20:21 +0000 |
commit | 94e3ce48e532f9704453b64963778ced1cfb417d (patch) | |
tree | ee9bb1975370740f4735441e10de3931cf741ea3 | |
parent | fd305830b2a2192855968a19cb9e16ddd93c94a5 (diff) | |
download | ports-94e3ce48e532f9704453b64963778ced1cfb417d.tar.gz ports-94e3ce48e532f9704453b64963778ced1cfb417d.zip |
2008-04-30 www/firefox15: Obsolete version, use Firefox 2.0 or greater instead
2008-04-30 www/phpadsnew: replaced by www/openx
2007-10-27 x11-wm/yawm: project no longer exists
2007-10-27 x11-wm/uwm: Version branch long since retired
Notes
Notes:
svn path=/head/; revision=212328
52 files changed, 4 insertions, 5166 deletions
@@ -3463,3 +3463,7 @@ security/wpa_supplicant||2008-04-26|Obsolete, newer version in base games/glpuzzle|games/jigzo|2008-04-28|Project renamed ftp/greed||2008-04-29|Has expired: No longer maintained x11-themes/gnome-industrial-theme||2008-04-29|Has expired: gnome-themes-extras no longer has industrial engine +www/firefox15||2008-04-30|Has expired: Obsolete version, use Firefox 2.0 or greater instead +www/phpadsnew||2008-04-30|Has expired: replaced by www/openx +x11-wm/yawm||2008-04-30|Has expired: project no longer exists +x11-wm/uwm||2008-04-30|Has expired: Version branch long since retired diff --git a/www/Makefile b/www/Makefile index bb5f1fc3deca..4d4bc1671311 100644 --- a/www/Makefile +++ b/www/Makefile @@ -188,7 +188,6 @@ SUBDIR += firefox-devel SUBDIR += firefox-i18n SUBDIR += firefox-remote - SUBDIR += firefox15 SUBDIR += flashplugin-mozilla SUBDIR += flat-frog SUBDIR += flickcurl @@ -1048,7 +1047,6 @@ SUBDIR += php5-session SUBDIR += php5-tidy SUBDIR += phpSysInfo - SUBDIR += phpadsnew SUBDIR += phpbb SUBDIR += phpbb-devel SUBDIR += phpbb3 diff --git a/www/firefox15/Makefile b/www/firefox15/Makefile deleted file mode 100644 index deea940ca91b..000000000000 --- a/www/firefox15/Makefile +++ /dev/null @@ -1,111 +0,0 @@ -# New ports collection makefile for: phoenix -# Date created: 2002/10/21 -# Whom: Alan Eldridge <alane@FreeBSD.org> -# -# $FreeBSD$ -# $MCom: ports-stable/www/firefox15/Makefile,v 1.21 2006/10/24 17:48:39 ahze Exp $ -# - -PORTNAME= firefox -DISTVERSION= 1.5.0.12 -PORTREVISION= 3 -PORTEPOCH= 3 -CATEGORIES= www -MASTER_SITES= ${MASTER_SITE_MOZILLA_EXTENDED} -MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source -DISTNAME= ${PORTNAME}-${DISTVERSION}-source - -MAINTAINER= gnome@FreeBSD.org -COMMENT= Web browser based on the browser portion of Mozilla - -DEPRECATED= Obsolete version, use Firefox 2.0 or greater instead -FORBIDDEN= http://vuxml.FreeBSD.org/810a5197-e0d9-11dc-891a-02061b08fc24.html -EXPIRATION_DATE=2008-04-30 - -LATEST_LINK= firefox15 -MOZILLA= ${PORTNAME}${MOZILLA_SUFX} -MOZILLA_NAME= Firefox${MOZILLA_SUFX} -MOZILLA_SUFX= 15 -MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' -WANT_GNOME= yes -ALL_TARGET= default -CONFIGURE_ENV= LOCALBASE=${LOCALBASE} -HAS_CONFIGURE= yes -USE_BZIP2= yes -USE_GMAKE= yes -USE_GCC= 3.4+ -WANT_PERL= yes - -GECKO_PLIST_PRE_FILES= lib/${MOZILLA}/chrome/icons/default/default.xpm -GECKO_PLIST_PRE_DIRS= lib/${MOZILLA}/chrome/icons/default lib/${MOZILLA}/chrome/icons - -FIREFOX_ICON= ${MOZILLA}.xpm -FIREFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/icons/default.xpm -MOZ_OPTIONS= --enable-application=browser \ - --enable-system-cairo \ - --enable-official-branding \ - --enable-canvas - -SYSTEM_PREFS= ${FAKEDIR}/lib/${MOZILLA}/defaults/pref/firefox.js -MOZ_PIS_SCRIPTS= moz_pis_S50cleanhome - -OPTIONS= NEWTAB "Open external links in a new tab" on \ - SMB "Enable smb:// URI support using gnomevfs" off - -.include <bsd.port.pre.mk> - -.if ${ARCH}=="alpha" && ${OSVERSION} < 500035 -IGNORE= core dumps on ${ARCH} -.endif - -.if ${ARCH}=="sparc64" && ${OSVERSION} < 601101 -IGNORE= core dumps on ${ARCH}, kern.osreldate>=601101 needed -.endif - -.if ${OSVERSION} >= 600000 -MOZ_OPTIONS+= --enable-svg --enable-svg-renderer=cairo -.endif - -post-extract:: - @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' \ - <${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop - -post-patch: -.for ii in modules/libpref/src/init extensions/sroaming/resources/content/prefs \ - embedding/minimo - @${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/ ; \ - /dom.disable_window_open_feature.toolbar/s/false/true/' \ - ${WRKSRC}/${ii}/all.js -.endfor - -pre-install: - ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLIST} - ${ECHO_CMD} "@unexec ${RMDIR} %D/share/applications 2>/dev/null || ${TRUE}" >> ${PLIST} - ${ECHO_CMD} 'share/pixmaps/${FIREFOX_ICON}' >> ${PLIST} -.if !defined(WITHOUT_NEWTAB) - ${ECHO_CMD} >> ${SYSTEM_PREFS} - ${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS} - ${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \ - >> ${SYSTEM_PREFS} -.endif # !defined(WITHOUT_NEWTAB) - -do-install: - if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then \ - for jpi in ${JPI_LIST}; do \ - if [ -f $${jpi} ]; then \ - ${LN} -sf $${jpi} \ - ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ; \ - break; \ - fi; \ - done; \ - fi - -post-install: - ${MKDIR} ${PREFIX}/share/applications ${PREFIX}/share/pixmaps - ${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop ${PREFIX}/share/applications/ - ${MKDIR} ${PREFIX}/lib/${MOZILLA}/chrome/icons/default - ${LN} -sf ${FIREFOX_ICON_SRC} ${PREFIX}/lib/${MOZILLA}/chrome/icons/default/default.xpm - ${LN} -sf ${FIREFOX_ICON_SRC} ${PREFIX}/share/pixmaps/${FIREFOX_ICON} - -.include "${PORTSDIR}/www/mozilla/Makefile.common" -.include <bsd.port.post.mk> diff --git a/www/firefox15/distinfo b/www/firefox15/distinfo deleted file mode 100644 index 92fd11510165..000000000000 --- a/www/firefox15/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (firefox-1.5.0.12-source.tar.bz2) = dd5add97bd75287817c820ef856a30ed -SHA256 (firefox-1.5.0.12-source.tar.bz2) = 620047580c3082326075af95740b2560a38862f7ce0653435d2f74f8a2064930 -SIZE (firefox-1.5.0.12-source.tar.bz2) = 35642743 diff --git a/www/firefox15/files/firefox.desktop.in b/www/firefox15/files/firefox.desktop.in deleted file mode 100644 index a25106a594e2..000000000000 --- a/www/firefox15/files/firefox.desktop.in +++ /dev/null @@ -1,191 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Firefox 1.5 Web Browser -Name[am]= -Name[ar]= -Name[az]=Firefox 1.5 Veb Səyyahı -Name[be]= -Name[bg]=Интернет браузър Firefox 1.5 -Name[bn]= -Name[bs]=Firefox 1.5 web preglednik -Name[ca]=Navegador web Firefox 1.5 -Name[cs]=Prohlížeč WWW Firefox 1.5 -Name[cy]=Y Porwr Gwe Firefox 1.5 -Name[da]=Firefox 1.5 - internetsurfning -Name[de]=Firefox 1.5 Webbrowser -Name[el]=Περιηγητής Διαδικτύου Firefox 1.5 -Name[en_CA]=Firefox 1.5 Web Browser -Name[en_GB]=Firefox 1.5 Web Browser -Name[es]=Navegador Web Firefox 1.5 -Name[et]=Firefox 1.5 veebibrauser -Name[eu]=Firefox 1.5 web arakatzailea -Name[fi]=Firefox 1.5, WWW-selain -Name[fr]=Navigateur Web Firefox 1.5 -Name[ga]=Brabhsálaí Lín Firefox 1.5 -Name[gu]=એપીફની વૅબ બ્રાઉઝર -Name[he]=דפדפן Firefox 1.5 -Name[hi]= -Name[hr]=Firefox 1.5 Web preglednik -Name[hu]=Firefox 1.5 webböngésző -Name[id]=Web Browser Firefox 1.5 -Name[it]=Browser web Firefox 1.5 -Name[ja]=Firefox 1.5 ウェブ・ブラウザ -Name[ko]=Firefox 1.5 웹 브라우저 -Name[li]=Firefox 1.5 Web Browser -Name[lt]=Firefox 1.5 web naršyklė -Name[mk]=Firefox 1.5 веб прелистувач -Name[ml]=എപ്പിഫാനി വെബ്ബ് ബ്രൌസര് -Name[mn]=Firefox 1.5 веб хөтөч -Name[ms]=Pelungsur Web Firefox 1.5 -Name[nb]=Firefox 1.5 nettleser -Name[nl]=Firefox 1.5 Webbrowser -Name[nn]=Firefox 1.5 nettlesar -Name[no]=Firefox 1.5 nettleser -Name[pa]=ਏਪੀਫਾਨੀ ਵੈੱਬ ਬਰਾਊਜ਼ਰ -Name[pl]=Przeglądarka WWW Firefox 1.5 -Name[pt]=Navegador Web Firefox 1.5 -Name[pt_BR]=Navegador Web Firefox 1.5 -Name[ro]=Navigatorul Firefox 1.5 -Name[ru]=Веб-браузер Firefox 1.5 -Name[sk]= -Name[sl]=Spletni brskalnik Firefox 1.5 -Name[sq]=Firefox 1.5 - Shfletuesi Web -Name[sr]= -Name[sr@Latn]=Veb čitač Spoznaja -Name[sv]=Webbläsaren Firefox 1.5 -Name[ta]=எபிபனி வலை உலாவி -Name[tk]=Firefox 1.5 Web Ahtarçisi -Name[tr]=Firefox 1.5 Web Tarayıcı -Name[uk]=Переглядач web Firefox 1.5 -Name[vi]=Trình Duyệt Web Firefox 1.5 -Name[wa]=Betchteu waibe epiphany -Name[zh_CN]=Firefox 1.5 Web 浏览器 -Name[zh_TW]=Firefox 1.5 網頁瀏覽器 -GenericName=Web Browser -GenericName[ar]=متصفّح الانترنت -GenericName[az]=Veb Səyyahı -GenericName[be]=Вандроўнік па павуціньню -GenericName[bg]=Браузър -GenericName[bn]=ওয়েব ব্রাউজার -GenericName[bs]=Web preglednik -GenericName[ca]=Navegador web -GenericName[cs]=Prohlížeč WWW -GenericName[cy]=Porwr Gwe -GenericName[da]=Internetsurfning -GenericName[de]=Webbrowser -GenericName[el]=Περιηγητής Ιστοσελίδων -GenericName[en_CA]=Web Browser -GenericName[en_GB]=Web Browser -GenericName[es]=Navegador web -GenericName[et]=Veebilehitseja -GenericName[eu]=Web arakatzailea -GenericName[fi]=WWW-selain -GenericName[fr]=Navigateur Web Firefox 1.5 -GenericName[ga]=Brabhsálaí Lín -GenericName[gu]=વેબ બ્રાઉઝર -GenericName[he]=דפדפן אינטרנט -GenericName[hi]=वेब ब्राउज़र -GenericName[hr]=Web preglednik -GenericName[hu]=Webböngésző -GenericName[id]=Browser Web -GenericName[it]=Browser web -GenericName[ja]=GNOME ウェブ・ブラウザ -GenericName[ko]=웹 브라우저 -GenericName[li]=Wèb Browser -GenericName[lt]=Web naršyklė -GenericName[mk]=Веб прелистувач -GenericName[mn]=Веб хөтөч -GenericName[ms]=Pelungsur Web -GenericName[nb]=Nettleser -GenericName[nl]=Web-browser -GenericName[nn]=Nettlesar -GenericName[no]=Nettleser -GenericName[pa]=ਵੈਬ ਬਰਾਊਜ਼ -GenericName[pl]=Przeglądarka WWW -GenericName[pt]=Navegador Web -GenericName[pt_BR]=Navegador Web -GenericName[ro]=Navigator Internet -GenericName[ru]=Веб-браузер -GenericName[sk]=WWW prehliadač -GenericName[sl]=Spletni brskalnik -GenericName[sq]=Shfletuesi Web -GenericName[sr]=Веб читач -GenericName[sr@Latn]=Veb čitač -GenericName[sv]=Webbläsare -GenericName[ta]=வலை உலாவி -GenericName[th]=เว็บบราวเซอร์ -GenericName[tk]=Web Ahtarçysy -GenericName[tr]=Web Tarayıcı -GenericName[uk]=Переглядач web-сторінок -GenericName[vi]=Trình duyệt Web -GenericName[wa]=Betchteu waibe -GenericName[zh_CN]=Web 浏览器 -GenericName[zh_TW]=網頁瀏覽器 -Comment=Browse the web -Comment[ar]=تصفح الانترنت -Comment[az]=Vebi gəzin -Comment[be]=Вандраваць па павуціньню -Comment[bg]=Сърфиране в интернет -Comment[bn]=ওয়েব ব্রাউজ করুন -Comment[bs]=Pregledaj na internetu -Comment[ca]=Navegueu per la web -Comment[cs]=Prohlížet WWW -Comment[cy]=Pori'r we -Comment[da]=Surf på internettet -Comment[de]=Im Web surfen -Comment[el]=Περιήγηση στον παγκόσμιο ιστό -Comment[en_CA]=Browse the web -Comment[en_GB]=Browse the web -Comment[es]=Navegar por la web -Comment[et]=Sirvi veebi -Comment[eu]=Arakatu web-a -Comment[fi]=Selaa WWW:tä -Comment[fr]=Naviguer sur Internet -Comment[ga]=Brabhsáil an Líon -Comment[gu]=વેબમાં શોધો -Comment[he]=גלוש ברשת -Comment[hi]=वेब ब्राउज़ करें -Comment[hr]=Pregledaj Web -Comment[hu]=A világháló böngészése -Comment[id]=Jelajah web -Comment[it]=Esplora il web -Comment[ja]=ウェブを閲覧します -Comment[ko]=웹을 돌아 다닙니다 -Comment[li]=Blajere op internet -Comment[lt]=Naršyti internete -Comment[mk]=Прелистувајте на веб -Comment[ml]=വലക്കെട്ട് തിരയുക -Comment[mn]=Веб броузе хийх -Comment[ms]=Layari web -Comment[nb]=Surf på nettet -Comment[nl]=Websurfen -Comment[nn]=Surf på nettet -Comment[no]=Surf på nettet -Comment[pa]=ਵੈਬ ਬਰਾਊਜ਼ -Comment[pl]=Przeglądanie stron WWW -Comment[pt]=Navegar na web -Comment[pt_BR]=Navegar na web -Comment[ro]=Navigare Internet -Comment[ru]=Веб-браузер -Comment[sk]=Prehliadať internet -Comment[sl]=Brskaj po spletu -Comment[sq]=Eksploro web-in -Comment[sr]=Прегледај веб -Comment[sr@Latn]=Pregledaj veb -Comment[sv]=Surfa på nätet -Comment[ta]=வலையில் உலாவு -Comment[th]=ใช้งานเว็บบราวเซอร์ Firefox 1.5 -Comment[tk]=Webi Ahtar -Comment[tr]=Web'e Gözat -Comment[uk]=Програма перегляду web-сторінок -Comment[vi]=Duyệt web -Comment[wa]=Naivyî avå les waibes -Comment[zh_CN]=浏览 Web -Comment[zh_TW]=瀏覽網頁 -Exec=firefox %U -Icon=@FIREFOX_ICON@ -StartupNotify=false -Terminal=false -Type=Application -Categories=Application;Network; -MimeType=text/html;text/xml;application/xhtml+xml; diff --git a/www/firefox15/files/moz_pis_S50cleanhome b/www/firefox15/files/moz_pis_S50cleanhome deleted file mode 100644 index 3de5565e39f2..000000000000 --- a/www/firefox15/files/moz_pis_S50cleanhome +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# - -# S50cleanhome -# a script to clean up users' Mozilla home directories to make upgrading -# less painful. - -# We run in our own subshell - -# First, verify protocol -[ "$1" != "start" ] && exit 1 -[ -z "${MOZ_PIS_API}" -o ${MOZ_PIS_API} -ne 2 ] && exit 1 -[ -z "${MOZ_PIS_MOZBINDIR}" -o ! -d "${MOZ_PIS_MOZBINDIR}" ] && exit 1 -[ -z "${HOME}" -o ! -d "${HOME}" ] && exit 1 -[ -z "${MOZ_PIS_USER_DIR}" -o ! -d "${HOME}/${MOZ_PIS_USER_DIR}" ] && exit 1 - -# Try to cleanup ${HOME}/${MOZ_PIS_USER_DIR} - -if [ -f "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" ]; then - sed -e '/Path=/! d' -e "s,Path=,${HOME}/${MOZ_PIS_USER_DIR}/," \ - "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" \ - | while read dir - do - [ ! -d "${dir}" ] && continue - # Debian does this for new builds - # rm -f "${dir}/XUL.mfasl" - # force a rebuild of compreg.dat and xpti.dat for new installations - [ "${dir}/compreg.dat" -ot "${MOZ_PIS_MOZBINDIR}/components.ini" ] && - rm -f "${dir}/compatibility.ini" "${dir}/XUL.mfasl" - done -fi diff --git a/www/firefox15/files/patch-Double.cpp b/www/firefox15/files/patch-Double.cpp deleted file mode 100644 index f91a805bc6cc..000000000000 --- a/www/firefox15/files/patch-Double.cpp +++ /dev/null @@ -1,59 +0,0 @@ ---- extensions/transformiix/source/base/Double.cpp.orig Fri Jun 23 00:56:19 2006 -+++ extensions/transformiix/source/base/Double.cpp -@@ -52,10 +52,10 @@ - //A trick to handle IEEE floating point exceptions on FreeBSD - E.D. - #ifdef __FreeBSD__ - #include <ieeefp.h> --#ifdef __alpha__ --fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP; --#else -+#if defined(__i386__) || defined(__amd64__) - fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML; -+#else -+fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP; - #endif - fp_except_t oldmask = fpsetmask(~allmask); - #endif -@@ -115,22 +115,31 @@ - #define TX_DOUBLE_HI32_EXPMASK 0x7ff00000 - #define TX_DOUBLE_HI32_MANTMASK 0x000fffff - -+union ui32dun { -+ PRUint32 i[2]; -+ double d; -+}; -+ - //-- Initialize Double related constants - #ifdef IS_BIG_ENDIAN --const PRUint32 nanMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK, -- 0xffffffff}; --const PRUint32 infMask[2] = {TX_DOUBLE_HI32_EXPMASK, 0}; --const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0}; -+const union ui32dun nanMask = -+ {{TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK, 0xffffffff}}; -+const union ui32dun infMask = -+ {{TX_DOUBLE_HI32_EXPMASK, 0}}; -+const union ui32dun negInfMask = -+ {{TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0}}; - #else --const PRUint32 nanMask[2] = {0xffffffff, -- TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK}; --const PRUint32 infMask[2] = {0, TX_DOUBLE_HI32_EXPMASK}; --const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT}; -+const union ui32dun nanMask = -+ {{0xffffffff, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK}}; -+const union ui32dun infMask = -+ {{0, TX_DOUBLE_HI32_EXPMASK}}; -+const union ui32dun negInfMask = -+ {{0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT}}; - #endif - --const double Double::NaN = *((double*)nanMask); --const double Double::POSITIVE_INFINITY = *((double*)infMask); --const double Double::NEGATIVE_INFINITY = *((double*)negInfMask); -+const double Double::NaN = nanMask.d; -+const double Double::POSITIVE_INFINITY = infMask.d; -+const double Double::NEGATIVE_INFINITY = negInfMask.d; - - /* - * Determines whether the given double represents positive or negative diff --git a/www/firefox15/files/patch-browser_app_mozilla.in b/www/firefox15/files/patch-browser_app_mozilla.in deleted file mode 100644 index c815a4780038..000000000000 --- a/www/firefox15/files/patch-browser_app_mozilla.in +++ /dev/null @@ -1,125 +0,0 @@ ---- browser/app/mozilla.in.orig Mon Apr 4 15:08:49 2005 -+++ browser/app/mozilla.in Wed Jun 1 14:47:45 2005 -@@ -49,51 +49,83 @@ - ## the mozilla-bin binary to work. - ## - -+# -+# MOZ_PIS, "Mozilla Plugable Init Scripts" -+# MOZ_PIS_ is the name space used -+# These variables and there meaning are specified in -+# mozilla/xpfe/bootstrap/init.d/README - moz_pis_startstop_scripts() - { -- MOZ_USER_DIR="%MOZ_USER_DIR%" -- # MOZ_PIS_ is the name space for "Mozilla Plugable Init Scripts" -- # These variables and there meaning are specified in -- # mozilla/xpfe/bootstrap/init.d/README -- MOZ_PIS_API=2 -- MOZ_PIS_MOZBINDIR="${dist_bin}" -- MOZ_PIS_SESSION_PID="$$" -- MOZ_PIS_USER_DIR="${MOZ_USER_DIR}" -- export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR -- -- case "${1}" in -- "start") -- for curr_pis in "${dist_bin}/init.d"/S* "${HOME}/${MOZ_USER_DIR}/init.d"/S* ; do -- if [ -x "${curr_pis}" ] ; then -- case "${curr_pis}" in -- *.sh) . "${curr_pis}" ;; -- *) "${curr_pis}" "start" ;; -- esac -- fi -- done -- ;; -- "stop") -- for curr_pis in "${HOME}/${MOZ_USER_DIR}/init.d"/K* "${dist_bin}/init.d"/K* ; do -- if [ -x "${curr_pis}" ] ; then -- case "${curr_pis}" in -- *.sh) . "${curr_pis}" ;; -- *) "${curr_pis}" "stop" ;; -- esac -- fi -- done -- ;; -- *) -- echo 1>&2 "$0: Internal error in moz_pis_startstop_scripts." -- exit 1 -- ;; -- esac -+ MOZ_PIS_API=2 -+ MOZ_PIS_MOZBINDIR="${dist_bin}" -+ MOZ_PIS_SESSION_PID="$$" -+ MOZ_PIS_USER_DIR="${MOZ_USER_DIR}" -+ export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR -+ -+ case "${1}" in -+ "start") -+ for curr_pis in "${MOZ_PIS_MOZBINDIR}/init.d"/S* \ -+ "${HOME}/${MOZ_PIS_USER_DIR}/init.d"/S*; do -+ if [ -x "${curr_pis}" ]; then -+ case "${curr_pis}" in -+ *.sh) -+ . "${curr_pis}" -+ ;; -+ *) -+ ${curr_pis} "start" -+ ;; -+ esac -+ fi -+ done -+ ;; -+ "stop") -+ for curr_pis in "${MOZ_PIS_MOZBINDIR}/init.d"/K* \ -+ "${HOME}/${MOZ_PIS_USER_DIR}/init.d"/K*; do -+ if [ -x "${curr_pis}" ]; then -+ case "${curr_pis}" in -+ *.sh) -+ . "${curr_pis}" -+ ;; -+ *) -+ ${curr_pis} "stop" -+ ;; -+ esac -+ fi -+ done -+ ;; -+ *) -+ echo "$0: Internal error in moz_pis_startstop_scripts." 1>&2 -+ exit 1 -+ ;; -+ esac - } - --#uncomment for debugging -+# uncomment for debugging - #set -x - --moz_libdir=%MOZAPPDIR% --MRE_HOME=%MREDIR% -+# -+# variables -+# -+#location="new-tab" -+#MOZILLA_UILOCALE="en-US" -+#MOZILLA_UIREGION="US" -+ -+# -+# working definitions -+# -+MOZ_USER_DIR="%MOZ_USER_DIR%" -+moz_libdir="%MOZAPPDIR%" -+MRE_HOME="%MREDIR%" -+ -+debugging= # set the debugging level -+use_openFile="yes" # use openFile() for file/dir -+here=`pwd` -+ -+if [ ! -d "${MRE_HOME}" ]; then -+ # use moz_libdir as MRE_HOME -+ MRE_HOME="${moz_libdir}" -+fi -+export MRE_HOME - - # Use run-mozilla.sh in the current dir if it exists - # If not, then start resolving symlinks until we find run-mozilla.sh diff --git a/www/firefox15/files/patch-build_unix_run-mozilla.sh b/www/firefox15/files/patch-build_unix_run-mozilla.sh deleted file mode 100644 index 837a70c4ffdc..000000000000 --- a/www/firefox15/files/patch-build_unix_run-mozilla.sh +++ /dev/null @@ -1,21 +0,0 @@ ---- build/unix/run-mozilla.sh.orig Fri Sep 30 22:36:47 2005 -+++ build/unix/run-mozilla.sh -@@ -328,7 +328,7 @@ - fi - ## - ## Set LD_LIBRARY_PATH --LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} -+LD_LIBRARY_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:%%PREFIX%%/lib/browser_plugins:%%PREFIX%%/lib/browser_linux_plugins:${MRE_HOME}${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"} - if [ -n "$LD_LIBRARYN32_PATH" ] - then - LD_LIBRARYN32_PATH=${MOZ_DIST_BIN}:${MOZ_DIST_BIN}/plugins:${MRE_HOME}${LD_LIBRARYN32_PATH+":$LD_LIBRARYN32_PATH"} -@@ -415,6 +415,9 @@ - # - export MOZILLA_FIVE_HOME LD_LIBRARY_PATH - export SHLIB_PATH LIBPATH LIBRARY_PATH ADDON_PATH DYLD_LIBRARY_PATH -+ -+MOZ_PLUGIN_PATH=%%PREFIX%%/lib/browser_plugins:%%PREFIX%%/lib/browser_linux_plugins -+export MOZ_PLUGIN_PATH - - if [ $moz_debug -eq 1 ] - then diff --git a/www/firefox15/files/patch-config-mkdepend-imakemdep.h b/www/firefox15/files/patch-config-mkdepend-imakemdep.h deleted file mode 100644 index 561c0756d184..000000000000 --- a/www/firefox15/files/patch-config-mkdepend-imakemdep.h +++ /dev/null @@ -1,12 +0,0 @@ ---- config/mkdepend/imakemdep.h.orig Tue Apr 20 14:38:14 2004 -+++ config/mkdepend/imakemdep.h -@@ -440,6 +440,9 @@ - # ifdef __i386__ - "-D__i386__", - # endif -+# if defined(__amd64__) || defined(__x86_64__) -+ "-D__amd64__ -D__x86_64__", -+# endif - # ifdef __GNUC__ - "-traditional", - # endif diff --git a/www/firefox15/files/patch-config-rules.mk b/www/firefox15/files/patch-config-rules.mk deleted file mode 100644 index 6a27dbc60df2..000000000000 --- a/www/firefox15/files/patch-config-rules.mk +++ /dev/null @@ -1,14 +0,0 @@ ---- config/rules.mk.orig Fri Apr 28 12:25:51 2006 -+++ config/rules.mk -@@ -443,7 +443,11 @@ - - ifeq ($(OS_ARCH),FreeBSD) - ifdef IS_COMPONENT -+ifneq (,$(filter alpha ia64,$(OS_TEST))) -+EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc -+else - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -+endif - endif - endif - diff --git a/www/firefox15/files/patch-config_autoconf.mk.in b/www/firefox15/files/patch-config_autoconf.mk.in deleted file mode 100644 index 97d214ea71f5..000000000000 --- a/www/firefox15/files/patch-config_autoconf.mk.in +++ /dev/null @@ -1,18 +0,0 @@ ---- config/autoconf.mk.in.orig Fri Apr 21 13:50:30 2006 -+++ config/autoconf.mk.in -@@ -56,13 +56,13 @@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - bindir = @bindir@ --includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+includedir = @includedir@/%%MOZILLA%% - libdir = @libdir@ - datadir = @datadir@ - mandir = @mandir@ - idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - --mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+mozappdir = $(libdir)/%%MOZILLA%% - mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION) - mrelibdir = $(mredir)/lib - diff --git a/www/firefox15/files/patch-config_mkdepend_Makefile.in b/www/firefox15/files/patch-config_mkdepend_Makefile.in deleted file mode 100644 index 6a066e18d8a7..000000000000 --- a/www/firefox15/files/patch-config_mkdepend_Makefile.in +++ /dev/null @@ -1,10 +0,0 @@ ---- config/mkdepend/Makefile.in.orig Sun Apr 18 07:17:26 2004 -+++ config/mkdepend/Makefile.in -@@ -73,6 +73,7 @@ - include $(topsrcdir)/config/rules.mk - - HOST_CFLAGS += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -+HOST_CFLAGS += $(XCFLAGS) - - ifdef GNU_CC - _GCCDIR = $(shell $(CC) -print-file-name=include) diff --git a/www/firefox15/files/patch-configure b/www/firefox15/files/patch-configure deleted file mode 100644 index 97e2f003c2b1..000000000000 --- a/www/firefox15/files/patch-configure +++ /dev/null @@ -1,38 +0,0 @@ ---- configure.orig Wed Aug 23 09:40:33 2006 -+++ configure -@@ -10115,7 +10115,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" --LIBS="-liconv $LIBS" -+LIBS="-L$LOCALBASE/lib -liconv $LIBS" - cat > conftest.$ac_ext <<EOF - #line 10121 "configure" - #include "confdefs.h" -@@ -10146,7 +10146,7 @@ - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -- _ICONV_LIBS="$_ICONV_LIBS -liconv" -+ _ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv" - else - echo "$ac_t""no" 1>&6 - echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6 -@@ -10156,7 +10156,7 @@ - echo $ac_n "(cached) $ac_c" 1>&6 - else - ac_save_LIBS="$LIBS" --LIBS="-liconv $LIBS" -+LIBS="-L$LOCALBASE/lib -liconv $LIBS" - cat > conftest.$ac_ext <<EOF - #line 10162 "configure" - #include "confdefs.h" -@@ -10187,7 +10187,7 @@ - fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -- _ICONV_LIBS="$_ICONV_LIBS -liconv" -+ _ICONV_LIBS="$_ICONV_LIBS -L$LOCALBASE/lib -liconv" - else - echo "$ac_t""no" 1>&6 - fi diff --git a/www/firefox15/files/patch-extensions_typeaheadfind_src_nsTypeAheadFind.cpp b/www/firefox15/files/patch-extensions_typeaheadfind_src_nsTypeAheadFind.cpp deleted file mode 100644 index cee60eebf2ed..000000000000 --- a/www/firefox15/files/patch-extensions_typeaheadfind_src_nsTypeAheadFind.cpp +++ /dev/null @@ -1,46 +0,0 @@ ---- extensions/typeaheadfind/src/nsTypeAheadFind.cpp.orig Tue Jun 28 19:03:59 2005 -+++ extensions/typeaheadfind/src/nsTypeAheadFind.cpp -@@ -318,11 +318,11 @@ - prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly", - &mStartLinksOnlyPref); - -- PRBool isSoundEnabled = PR_TRUE; -+ mIsSoundEnabled = PR_TRUE; - prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound", -- &isSoundEnabled); -+ &mIsSoundEnabled); - nsXPIDLCString soundStr; -- if (isSoundEnabled) { -+ if (mIsSoundEnabled && mIsSoundEnabled) { - prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL", - getter_Copies(soundStr)); - } -@@ -757,7 +757,7 @@ - } - else { - // No find string to backspace in! -- if (mIsBackspaceProtectOn) { -+ if (mIsBackspaceProtectOn && mIsSoundEnabled) { - // This flag should be on only if the last key was a backspace. - // It keeps us from accidentally hitting backspace too many times and - // going back in history when we really just wanted to clear -@@ -1022,7 +1022,9 @@ - - // Error sound (don't fire when backspace is pressed, they're - // trying to correct the mistake!) -- PlayNotFoundSound(); -+ if (mIsSoundEnabled) { -+ PlayNotFoundSound(); -+ } - - // Remove bad character from buffer, so we can continue typing from - // last matched character -@@ -1069,7 +1071,7 @@ - void - nsTypeAheadFind::PlayNotFoundSound() - { -- if (mNotFoundSoundURL.IsEmpty()) // no sound -+ if (mNotFoundSoundURL.IsEmpty() || !mIsSoundEnabled) // no sound - return; - if (!mSoundInterface) { - mSoundInterface = do_CreateInstance("@mozilla.org/sound;1"); diff --git a/www/firefox15/files/patch-extensions_typeaheadfind_src_nsTypeAheadFind.h b/www/firefox15/files/patch-extensions_typeaheadfind_src_nsTypeAheadFind.h deleted file mode 100644 index 8211dd1bd30f..000000000000 --- a/www/firefox15/files/patch-extensions_typeaheadfind_src_nsTypeAheadFind.h +++ /dev/null @@ -1,12 +0,0 @@ ---- extensions/typeaheadfind/src/nsTypeAheadFind.h.orig Mon Jun 27 18:02:03 2005 -+++ extensions/typeaheadfind/src/nsTypeAheadFind.h -@@ -197,6 +197,9 @@ - - nsCString mNotFoundSoundURL; - -+ // Move the sound enabled boolean out for all methods to access. -+ PRBool mIsSoundEnabled; -+ - // PRBool's are used instead of PRPackedBool's where the address of the - // boolean variable is getting passed into a method. For example: - // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref); diff --git a/www/firefox15/files/patch-libm b/www/firefox15/files/patch-libm deleted file mode 100644 index 003929b1342c..000000000000 --- a/www/firefox15/files/patch-libm +++ /dev/null @@ -1,30 +0,0 @@ ---- js/src/Makefile.in.orig Mon Jun 12 14:36:07 2006 -+++ js/src/Makefile.in -@@ -149,7 +149,6 @@ - EXPORTS += jscpucfg.h - endif - --FDLIBM_LIBRARY = fdlibm/$(LIB_PREFIX)fdm.$(LIB_SUFFIX) - JSMATH_PRELINK = jsmathtemp.o - JS_SAFE_ARENA = 1 - -@@ -325,9 +324,6 @@ - $(LD) $(DASH_R) -o $@ $(JSMATH_PRELINK) $(FDLIBM_LIBRARY) - endif - @$(RM) -f $(JSMATH_PRELINK) --else --# Create dependency so we build fdlibm --jsmath.o: $(FDLIBM_LIBRARY) Makefile.in - endif - - # An AIX Optimization bug causes PR_dtoa() & JS_dtoa to produce wrong result. ---- js/Makefile.in.orig Sun Apr 18 14:57:30 2004 -+++ js/Makefile.in -@@ -61,6 +61,6 @@ - # See top-level makefile for details - # - --DIRS = src/fdlibm src -+DIRS = src - - include $(topsrcdir)/config/rules.mk diff --git a/www/firefox15/files/patch-modules_libpref_src_init_all.js b/www/firefox15/files/patch-modules_libpref_src_init_all.js deleted file mode 100644 index 481fc9654f79..000000000000 --- a/www/firefox15/files/patch-modules_libpref_src_init_all.js +++ /dev/null @@ -1,53 +0,0 @@ ---- modules/libpref/src/init/all.js.orig Fri Aug 18 15:12:03 2006 -+++ modules/libpref/src/init/all.js -@@ -1885,33 +1885,33 @@ - - // th - --pref("font.name.serif.tr", "Times"); --pref("font.name.sans-serif.tr", "Helvetica"); --pref("font.name.monospace.tr", "Courier"); -+pref("font.name.serif.tr", "serif"); -+pref("font.name.sans-serif.tr", "sans-serif"); -+pref("font.name.monospace.tr", "monospace"); - - pref("font.name.serif.x-baltic", "serif"); - pref("font.name.sans-serif.x-baltic", "sans-serif"); - pref("font.name.monospace.x-baltic", "monospace"); - --pref("font.name.serif.x-central-euro", "Times"); --pref("font.name.sans-serif.x-central-euro", "Helvetica"); --pref("font.name.monospace.x-central-euro", "Courier"); -+pref("font.name.serif.x-central-euro", "serif"); -+pref("font.name.sans-serif.x-central-euro", "sans-serif"); -+pref("font.name.monospace.x-central-euro", "monospace"); - - pref("font.name.serif.x-cyrillic", "serif"); - pref("font.name.sans-serif.x-cyrillic", "sans-serif"); - pref("font.name.monospace.x-cyrillic", "monospace"); - --pref("font.name.serif.x-unicode", "Times"); --pref("font.name.sans-serif.x-unicode", "Helvetica"); --pref("font.name.monospace.x-unicode", "Courier"); -- --pref("font.name.serif.x-user-def", "Times"); --pref("font.name.sans-serif.x-user-def", "Helvetica"); --pref("font.name.monospace.x-user-def", "Courier"); -- --pref("font.name.serif.x-western", "Times"); --pref("font.name.sans-serif.x-western", "Helvetica"); --pref("font.name.monospace.x-western", "Courier"); -+pref("font.name.serif.x-unicode", "serif"); -+pref("font.name.sans-serif.x-unicode", "sans-serif"); -+pref("font.name.monospace.x-unicode", "monospace"); -+ -+pref("font.name.serif.x-user-def", "serif"); -+pref("font.name.sans-serif.x-user-def", "sans-serif"); -+pref("font.name.monospace.x-user-def", "monospace"); -+ -+pref("font.name.serif.x-western", "serif"); -+pref("font.name.sans-serif.x-western", "sans-serif"); -+pref("font.name.monospace.x-western", "monospace"); - - pref("font.name.serif.zh-CN", "serif"); - pref("font.name.sans-serif.zh-CN", "sans-serif"); diff --git a/www/firefox15/files/patch-nopangoxft b/www/firefox15/files/patch-nopangoxft deleted file mode 100644 index 5a11c8c4864e..000000000000 --- a/www/firefox15/files/patch-nopangoxft +++ /dev/null @@ -1,20 +0,0 @@ ---- gfx/src/gtk/mozilla-decoder.cpp.orig 2005-08-18 22:41:26.000000000 -0400 -+++ gfx/src/gtk/mozilla-decoder.cpp 2005-08-18 22:38:01.000000000 -0400 -@@ -40,7 +40,7 @@ - #define PANGO_ENABLE_ENGINE - - #include "mozilla-decoder.h" --#include <pango/pangoxft.h> -+#include <pango/pangocairo.h> - #include <pango/pangofc-fontmap.h> - #include <pango/pangofc-font.h> - #include <gdk/gdkx.h> -@@ -208,7 +208,7 @@ - } - } - -- pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_xft_get_font_map(GDK_DISPLAY(),gdk_x11_get_default_screen())), -+ pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_cairo_font_map_get_default()), - mozilla_find_decoder, - NULL, - NULL); diff --git a/www/firefox15/files/patch-security b/www/firefox15/files/patch-security deleted file mode 100644 index af4a9e599064..000000000000 --- a/www/firefox15/files/patch-security +++ /dev/null @@ -1,2424 +0,0 @@ - netwerk/cookie/public/nsICookie2.idl | 9 ++ - netwerk/cookie/src/nsCookie.cpp | 7 +- - netwerk/cookie/src/nsCookie.h | 8 ++ - netwerk/cookie/src/nsCookieService.cpp | 111 +++++++++++++++++++++++++-------- - netwerk/cookie/src/nsCookieService.h | 6 + - 5 files changed, 113 insertions(+), 28 deletions(-) - -Index: netwerk/cookie/public/nsICookie2.idl -=================================================================== ---- netwerk/cookie/public/nsICookie2.idl 2007-07-16 10:53:19.000000000 +0000 -+++ netwerk/cookie/public/nsICookie2.idl 2007-07-16 10:53:23.000000000 +0000 -@@ -67,8 +67,17 @@ - * (where 0 does not represent a session cookie). - * - * not to be confused with |expires|, an - * attribute on nsICookie. - */ - readonly attribute PRInt64 expiry; - - }; -+ -+[scriptable, uuid(40712890-6c9e-45fc-b77c-c8ea344f690e)] -+interface nsICookie2_MOZILLA_1_8_BRANCH : nsICookie2 -+{ -+ /** -+ * true if the cookie is an http only cookie -+ */ -+ readonly attribute boolean httpOnly; -+}; -Index: netwerk/cookie/src/nsCookie.cpp -=================================================================== ---- netwerk/cookie/src/nsCookie.cpp 2007-07-16 10:53:19.000000000 +0000 -+++ netwerk/cookie/src/nsCookie.cpp 2007-07-16 10:53:23.000000000 +0000 -@@ -84,16 +84,17 @@ - nsCookie::Create(const nsACString &aName, - const nsACString &aValue, - const nsACString &aHost, - const nsACString &aPath, - nsInt64 aExpiry, - nsInt64 aLastAccessed, - PRBool aIsSession, - PRBool aIsSecure, -+ PRBool aIsHttpOnly, - nsCookieStatus aStatus, - nsCookiePolicy aPolicy) - { - // find the required string buffer size, adding 4 for the terminating nulls - const PRUint32 stringLength = aName.Length() + aValue.Length() + - aHost.Length() + aPath.Length() + 4; - - // allocate contiguous space for the nsCookie and its strings - -@@ -106,17 +107,18 @@ - char *name, *value, *host, *path, *end; - name = NS_STATIC_CAST(char *, place) + sizeof(nsCookie); - StrBlockCopy(aName, aValue, aHost, aPath, - name, value, host, path, end); - - // construct the cookie. placement new, oh yeah! - return new (place) nsCookie(name, value, host, path, end, - aExpiry, aLastAccessed, ++gLastCreationTime, -- aIsSession, aIsSecure, aStatus, aPolicy); -+ aIsSession, aIsSecure, aIsHttpOnly, -+ aStatus, aPolicy); - } - - /****************************************************************************** - * nsCookie: - * xpcom impl - ******************************************************************************/ - - // xpcom getters -@@ -124,25 +126,26 @@ - NS_IMETHODIMP nsCookie::GetValue(nsACString &aValue) { aValue = Value(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetHost(nsACString &aHost) { aHost = Host(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetRawHost(nsACString &aHost) { aHost = RawHost(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetPath(nsACString &aPath) { aPath = Path(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetExpiry(PRInt64 *aExpiry) { *aExpiry = Expiry(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetIsSession(PRBool *aIsSession) { *aIsSession = IsSession(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetIsDomain(PRBool *aIsDomain) { *aIsDomain = IsDomain(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetIsSecure(PRBool *aIsSecure) { *aIsSecure = IsSecure(); return NS_OK; } -+NS_IMETHODIMP nsCookie::GetHttpOnly(PRBool *aHttpOnly) { *aHttpOnly = IsHttpOnly(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetStatus(nsCookieStatus *aStatus) { *aStatus = Status(); return NS_OK; } - NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy) { *aPolicy = Policy(); return NS_OK; } - - // compatibility method, for use with the legacy nsICookie interface. - // here, expires == 0 denotes a session cookie. - NS_IMETHODIMP - nsCookie::GetExpires(PRUint64 *aExpires) - { - if (IsSession()) { - *aExpires = 0; - } else { - *aExpires = Expiry() > nsInt64(0) ? PRInt64(Expiry()) : 1; - } - return NS_OK; - } - --NS_IMPL_ISUPPORTS2(nsCookie, nsICookie2, nsICookie) -+NS_IMPL_ISUPPORTS3(nsCookie, nsICookie2, nsICookie, nsICookie2_MOZILLA_1_8_BRANCH) -Index: netwerk/cookie/src/nsCookie.h -=================================================================== ---- netwerk/cookie/src/nsCookie.h 2007-07-16 10:53:19.000000000 +0000 -+++ netwerk/cookie/src/nsCookie.h 2007-07-16 10:53:23.000000000 +0000 -@@ -50,71 +50,75 @@ - * for xpcom access of cookie objects. - */ - - /****************************************************************************** - * nsCookie: - * implementation - ******************************************************************************/ - --class nsCookie : public nsICookie2 -+class nsCookie : public nsICookie2_MOZILLA_1_8_BRANCH - { - // break up the NS_DECL_ISUPPORTS macro, since we use a bitfield refcount member - public: - NS_DECL_ISUPPORTS_INHERITED - protected: - NS_DECL_OWNINGTHREAD - - public: - // nsISupports - NS_DECL_NSICOOKIE - NS_DECL_NSICOOKIE2 -+ NS_DECL_NSICOOKIE2_MOZILLA_1_8_BRANCH - - private: - // for internal use only. see nsCookie::Create(). - nsCookie(const char *aName, - const char *aValue, - const char *aHost, - const char *aPath, - const char *aEnd, - nsInt64 aExpiry, - nsInt64 aLastAccessed, - PRUint32 aCreationTime, - PRBool aIsSession, - PRBool aIsSecure, -+ PRBool aIsHttpOnly, - nsCookieStatus aStatus, - nsCookiePolicy aPolicy) - : mNext(nsnull) - , mName(aName) - , mValue(aValue) - , mHost(aHost) - , mPath(aPath) - , mEnd(aEnd) - , mExpiry(aExpiry) - , mLastAccessed(aLastAccessed) - , mCreationTime(aCreationTime) - , mRefCnt(0) - , mIsSession(aIsSession != PR_FALSE) - , mIsSecure(aIsSecure != PR_FALSE) -+ , mIsHttpOnly(aIsHttpOnly != PR_FALSE) - , mStatus(aStatus) - , mPolicy(aPolicy) - { - } - - public: - // public helper to create an nsCookie object. use |operator delete| - // to destroy an object created by this method. - static nsCookie * Create(const nsACString &aName, - const nsACString &aValue, - const nsACString &aHost, - const nsACString &aPath, - nsInt64 aExpiry, - nsInt64 aLastAccessed, - PRBool aIsSession, - PRBool aIsSecure, -+ PRBool aIsHttpOnly, - nsCookieStatus aStatus, - nsCookiePolicy aPolicy); - - virtual ~nsCookie() {}; - - // fast (inline, non-xpcom) getters - inline const nsDependentCString Name() const { return nsDependentCString(mName, mValue - 1); } - inline const nsDependentCString Value() const { return nsDependentCString(mValue, mHost - 1); } -@@ -122,16 +126,17 @@ - inline const nsDependentCString RawHost() const { return nsDependentCString(IsDomain() ? mHost + 1 : mHost, mPath - 1); } - inline const nsDependentCString Path() const { return nsDependentCString(mPath, mEnd); } - inline nsInt64 Expiry() const { return mExpiry; } - inline nsInt64 LastAccessed() const { return mLastAccessed; } - inline PRUint32 CreationTime() const { return mCreationTime; } - inline PRBool IsSession() const { return mIsSession; } - inline PRBool IsDomain() const { return *mHost == '.'; } - inline PRBool IsSecure() const { return mIsSecure; } -+ inline PRBool IsHttpOnly() const { return mIsHttpOnly; } - inline nsCookieStatus Status() const { return mStatus; } - inline nsCookiePolicy Policy() const { return mPolicy; } - - // setters - inline void SetLastAccessed(nsInt64 aLastAccessed) { mLastAccessed = aLastAccessed; } - inline void SetExpiry(PRInt64 aExpiry) { mExpiry = aExpiry; } - inline void SetIsSession(PRBool aIsSession) { mIsSession = aIsSession; } - inline void SetCreationTime(PRUint32 aCT) { mCreationTime = aCT; } -@@ -153,13 +158,14 @@ - const char *mPath; - const char *mEnd; - nsInt64 mExpiry; - nsInt64 mLastAccessed; - PRUint32 mCreationTime; - PRUint32 mRefCnt : 16; - PRUint32 mIsSession : 1; - PRUint32 mIsSecure : 1; -+ PRUint32 mIsHttpOnly: 1; - PRUint32 mStatus : 3; - PRUint32 mPolicy : 3; - }; - - #endif // nsCookie_h__ -Index: netwerk/cookie/src/nsCookieService.cpp -=================================================================== ---- netwerk/cookie/src/nsCookieService.cpp 2007-07-16 10:53:19.000000000 +0000 -+++ netwerk/cookie/src/nsCookieService.cpp 2007-07-16 10:53:23.000000000 +0000 -@@ -70,16 +70,22 @@ - #include "nsNetCID.h" - #include "nsAppDirectoryServiceDefs.h" - - /****************************************************************************** - * nsCookieService impl: - * useful types & constants - ******************************************************************************/ - -+// XXX_hack. See bug 178993. -+// This is a hack to hide HttpOnly cookies from older browsers -+// -+ -+static const char kHttpOnlyPrefix[] = "#HttpOnly_"; -+ - static const char kCookieFileName[] = "cookies.txt"; - - static const PRUint32 kLazyWriteTimeout = 5000; //msec - - #undef LIMIT - #define LIMIT(x, low, high, default) ((x) >= (low) && (x) <= (high) ? (x) : (default)) - - // default limits for the cookie list. these can be tuned by the -@@ -119,16 +125,17 @@ - nsCAutoString value; - nsCAutoString host; - nsCAutoString path; - nsCAutoString expires; - nsCAutoString maxage; - nsInt64 expiryTime; - PRBool isSession; - PRBool isSecure; -+ PRBool isHttpOnly; - }; - - // stores linked list iteration state, and provides a rudimentary - // list traversal method - struct nsListIter - { - nsListIter() {} - -@@ -477,40 +484,24 @@ - nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(aSubject); - if (prefBranch) - PrefChanged(prefBranch); - } - - return NS_OK; - } - --NS_IMETHODIMP --nsCookieService::GetCookieString(nsIURI *aHostURI, -- nsIChannel *aChannel, -- char **aCookie) --{ -- // try to determine first party URI -- nsCOMPtr<nsIURI> firstURI; -- if (aChannel) { -- nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(aChannel); -- if (httpInternal) -- httpInternal->GetDocumentURI(getter_AddRefs(firstURI)); -- } -- -- return GetCookieStringFromHttp(aHostURI, firstURI, aChannel, aCookie); --} -- - // helper function for GetCookieStringFromHttp - static inline PRBool ispathdelimiter(char c) { return c == '/' || c == '?' || c == '#' || c == ';'; } - --NS_IMETHODIMP --nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI, -- nsIURI *aFirstURI, -- nsIChannel *aChannel, -- char **aCookie) -+nsresult nsCookieService::GetCookieStringFromHttpInternal(nsIURI *aHostURI, -+ nsIURI *aFirstURI, -+ nsIChannel *aChannel, -+ char **aCookie, -+ PRBool aHttpBound) - { - *aCookie = nsnull; - - if (!aHostURI) { - COOKIE_LOGFAILURE(GET_COOKIE, nsnull, nsnull, "host URI is null"); - return NS_OK; - } - -@@ -560,16 +551,22 @@ - nsCookieEntry *entry = mHostTable.GetEntry(currentDot); - cookie = entry ? entry->Head() : nsnull; - for (; cookie; cookie = cookie->Next()) { - // if the cookie is secure and the host scheme isn't, we can't send it - if (cookie->IsSecure() && !isSecure) { - continue; - } - -+ // if the cookie is httpOnly and it's not going directly to the HTTP -+ // connection, don't send it -+ if (cookie->IsHttpOnly() && !aHttpBound) { -+ continue; -+ } -+ - // calculate cookie path length, excluding trailing '/' - PRUint32 cookiePathLen = cookie->Path().Length(); - if (cookiePathLen > 0 && cookie->Path().Last() == '/') { - --cookiePathLen; - } - - // if the nsIURI path is shorter than the cookie path, don't send it back - if (!StringBeginsWith(pathFromURI, Substring(cookie->Path(), 0, cookiePathLen))) { -@@ -639,16 +636,41 @@ - COOKIE_LOGSUCCESS(GET_COOKIE, aHostURI, cookieData, nsnull); - *aCookie = ToNewCString(cookieData); - } - - return NS_OK; - } - - NS_IMETHODIMP -+nsCookieService::GetCookieString(nsIURI *aHostURI, -+ nsIChannel *aChannel, -+ char **aCookie) -+{ -+ // try to determine first party URI -+ nsCOMPtr<nsIURI> firstURI; -+ if (aChannel) { -+ nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(aChannel); -+ if (httpInternal) -+ httpInternal->GetDocumentURI(getter_AddRefs(firstURI)); -+ } -+ -+ return GetCookieStringFromHttpInternal(aHostURI, firstURI, aChannel, aCookie, PR_FALSE); -+} -+ -+NS_IMETHODIMP -+nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI, -+ nsIURI *aFirstURI, -+ nsIChannel *aChannel, -+ char **aCookie) -+{ -+ return GetCookieStringFromHttpInternal(aHostURI, aFirstURI, aChannel, aCookie, PR_TRUE); -+} -+ -+NS_IMETHODIMP - nsCookieService::SetCookieString(nsIURI *aHostURI, - nsIPrompt *aPrompt, - const char *aCookieHeader, - nsIChannel *aChannel) - { - // try to determine first party URI - nsCOMPtr<nsIURI> firstURI; - -@@ -847,16 +869,17 @@ - nsInt64 currentTime = NOW_IN_SECONDS; - - nsRefPtr<nsCookie> cookie = - nsCookie::Create(aName, aValue, aDomain, aPath, - nsInt64(aExpiry), - currentTime, - aIsSession, - aIsSecure, -+ PR_FALSE, - nsICookie::STATUS_UNKNOWN, - nsICookie::POLICY_UNKNOWN); - if (!cookie) { - return NS_ERROR_OUT_OF_MEMORY; - } - - AddInternal(cookie, currentTime, nsnull, nsnull); - return NS_OK; -@@ -911,21 +934,21 @@ - if (NS_FAILED(rv)) { - return rv; - } - - static const char kTrue[] = "TRUE"; - - nsCAutoString buffer; - PRBool isMore = PR_TRUE; -- PRInt32 hostIndex = 0, isDomainIndex, pathIndex, secureIndex, expiresIndex, nameIndex, cookieIndex; -+ PRInt32 hostIndex, isDomainIndex, pathIndex, secureIndex, expiresIndex, nameIndex, cookieIndex; - nsASingleFragmentCString::char_iterator iter; - PRInt32 numInts; - PRInt64 expires; -- PRBool isDomain; -+ PRBool isDomain, isHttpOnly = PR_FALSE; - nsInt64 currentTime = NOW_IN_SECONDS; - // we use lastAccessedCounter to keep cookies in recently-used order, - // so we start by initializing to currentTime (somewhat arbitrary) - nsInt64 lastAccessedCounter = currentTime; - nsCookie *newCookie; - - /* file format is: - * -@@ -935,21 +958,36 @@ - * isDomain is "TRUE" or "FALSE" (default to "FALSE") - * isSecure is "TRUE" or "FALSE" (default to "TRUE") - * expires is a PRInt64 integer - * note 1: cookie can contain tabs. - * note 2: cookies are written in order of lastAccessed time: - * most-recently used come first; least-recently-used come last. - */ - -+ /* -+ * ...but due to bug 178933, we hide HttpOnly cookies from older code -+ * in a comment, so they don't expose HttpOnly cookies to JS. -+ * -+ * The format for HttpOnly cookies is -+ * -+ * #HttpOnly_host \t isDomain \t path \t secure \t expires \t name \t cookie -+ * -+ */ -+ - while (isMore && NS_SUCCEEDED(lineInputStream->ReadLine(buffer, &isMore))) { -- if (buffer.IsEmpty() || buffer.First() == '#') { -+ if (StringBeginsWith(buffer, NS_LITERAL_CSTRING(kHttpOnlyPrefix))) { -+ isHttpOnly = PR_TRUE; -+ hostIndex = sizeof(kHttpOnlyPrefix) - 1; -+ } else if (buffer.IsEmpty() || buffer.First() == '#') { - continue; -+ } else { -+ isHttpOnly = PR_FALSE; -+ hostIndex = 0; - } -- - // this is a cheap, cheesy way of parsing a tab-delimited line into - // string indexes, which can be lopped off into substrings. just for - // purposes of obfuscation, it also checks that each token was found. - // todo: use iterators? - if ((isDomainIndex = buffer.FindChar('\t', hostIndex) + 1) == 0 || - (pathIndex = buffer.FindChar('\t', isDomainIndex) + 1) == 0 || - (secureIndex = buffer.FindChar('\t', pathIndex) + 1) == 0 || - (expiresIndex = buffer.FindChar('\t', secureIndex) + 1) == 0 || -@@ -982,16 +1020,17 @@ - nsCookie::Create(Substring(buffer, nameIndex, cookieIndex - nameIndex - 1), - Substring(buffer, cookieIndex, buffer.Length() - cookieIndex), - host, - Substring(buffer, pathIndex, secureIndex - pathIndex - 1), - nsInt64(expires), - lastAccessedCounter, - PR_FALSE, - Substring(buffer, secureIndex, expiresIndex - secureIndex - 1).EqualsLiteral(kTrue), -+ isHttpOnly, - nsICookie::STATUS_UNKNOWN, - nsICookie::POLICY_UNKNOWN); - if (!newCookie) { - return NS_ERROR_OUT_OF_MEMORY; - } - - // trick: keep the cookies in most-recently-used order, - // by successively decrementing the lastAccessed time -@@ -1077,28 +1116,37 @@ - * - * isDomain is "TRUE" or "FALSE" - * isSecure is "TRUE" or "FALSE" - * expires is a PRInt64 integer - * note 1: cookie can contain tabs. - * note 2: cookies are written in order of lastAccessed time: - * most-recently used come first; least-recently-used come last. - */ -+ -+ /* -+ * XXX but see above in ::Read for the HttpOnly hack -+ */ -+ - nsCookie *cookie; - nsInt64 currentTime = NOW_IN_SECONDS; - char dateString[22]; - PRUint32 dateLen; - for (PRUint32 i = 0; i < mCookieCount; ++i) { - cookie = NS_STATIC_CAST(nsCookie*, sortedCookieList.ElementAt(i)); - - // don't write entry if cookie has expired, or is a session cookie - if (cookie->IsSession() || cookie->Expiry() <= currentTime) { - continue; - } - -+ // XXX hack for HttpOnly. see bug 178993. -+ if (cookie->IsHttpOnly()) { -+ bufferedOutputStream->Write(kHttpOnlyPrefix, sizeof(kHttpOnlyPrefix) - 1, &rv); -+ } - bufferedOutputStream->Write(cookie->Host().get(), cookie->Host().Length(), &rv); - if (cookie->IsDomain()) { - bufferedOutputStream->Write(kTrue, sizeof(kTrue) - 1, &rv); - } else { - bufferedOutputStream->Write(kFalse, sizeof(kFalse) - 1, &rv); - } - bufferedOutputStream->Write(cookie->Path().get(), cookie->Path().Length(), &rv); - if (cookie->IsSecure()) { -@@ -1194,16 +1242,17 @@ - nsCookie::Create(cookieAttributes.name, - cookieAttributes.value, - cookieAttributes.host, - cookieAttributes.path, - cookieAttributes.expiryTime, - currentTime, - cookieAttributes.isSession, - cookieAttributes.isSecure, -+ cookieAttributes.isHttpOnly, - aStatus, - aPolicy); - if (!cookie) { - return newCookie; - } - - // check permissions from site permission list, or ask the user, - // to determine if we can set the cookie -@@ -1338,16 +1387,19 @@ - 4. where appropriate, full <OCTET>s are allowed, where the spec dictates to - reject control chars or non-ASCII chars. This is erring on the loose - side, since there's probably no good reason to enforce this strictness. - - 5. cookie <NAME> is optional, where spec requires it. This is a fairly - trivial case, but allows the flexibility of setting only a cookie <VALUE> - with a blank <NAME> and is required by some sites (see bug 169091). - -+ 6. Attribute "HttpOnly", not covered in the RFCs, is supported -+ (see bug 178993). -+ - ** Begin BNF: - token = 1*<any allowed-chars except separators> - value = token-value | quoted-string - token-value = 1*<any allowed-chars except value-sep> - quoted-string = ( <"> *( qdtext | quoted-pair ) <"> ) - qdtext = <any allowed-chars except <">> ; CR | LF removed by necko - quoted-pair = "\" <any OCTET except NUL or cookie-sep> ; CR | LF removed by necko - separators = ";" | "=" -@@ -1372,16 +1424,17 @@ - valid values for cookie-av (checked post-parsing) are: - cookie-av = "Path" "=" value - | "Domain" "=" value - | "Expires" "=" value - | "Max-Age" "=" value - | "Comment" "=" value - | "Version" "=" value - | "Secure" -+ | "HttpOnly" - - ******************************************************************************/ - - // helper functions for GetTokenValue - static inline PRBool iswhitespace (char c) { return c == ' ' || c == '\t'; } - static inline PRBool isterminator (char c) { return c == '\n' || c == '\r'; } - static inline PRBool isquoteterminator(char c) { return isterminator(c) || c == '"'; } - static inline PRBool isvalueseparator (char c) { return isterminator(c) || c == ';'; } -@@ -1478,24 +1531,27 @@ - nsCookieService::ParseAttributes(nsDependentCString &aCookieHeader, - nsCookieAttributes &aCookieAttributes) - { - static const char kPath[] = "path"; - static const char kDomain[] = "domain"; - static const char kExpires[] = "expires"; - static const char kMaxage[] = "max-age"; - static const char kSecure[] = "secure"; -+ static const char kHttpOnly[] = "httponly"; - - nsASingleFragmentCString::const_char_iterator tempBegin, tempEnd; - nsASingleFragmentCString::const_char_iterator cookieStart, cookieEnd; - aCookieHeader.BeginReading(cookieStart); - aCookieHeader.EndReading(cookieEnd); - - aCookieAttributes.isSecure = PR_FALSE; - -+ aCookieAttributes.isHttpOnly = PR_FALSE; -+ - nsDependentCSubstring tokenString(cookieStart, cookieStart); - nsDependentCSubstring tokenValue (cookieStart, cookieStart); - PRBool newCookie, equalsFound; - - // extract cookie <NAME> & <VALUE> (first attribute), and copy the strings. - // if we find multiple cookies, return for processing - // note: if there's no '=', we assume token is <VALUE>. this is required by - // some sites (see bug 169091). -@@ -1532,16 +1588,21 @@ - aCookieAttributes.expires = tokenValue; - - else if (tokenString.LowerCaseEqualsLiteral(kMaxage)) - aCookieAttributes.maxage = tokenValue; - - // ignore any tokenValue for isSecure; just set the boolean - else if (tokenString.LowerCaseEqualsLiteral(kSecure)) - aCookieAttributes.isSecure = PR_TRUE; -+ -+ // ignore any tokenValue for isHttpOnly (see bug 178993); -+ // just set the boolean -+ else if (tokenString.LowerCaseEqualsLiteral(kHttpOnly)) -+ aCookieAttributes.isHttpOnly = PR_TRUE; - } - - // rebind aCookieHeader, in case we need to process another cookie - aCookieHeader.Rebind(cookieStart, cookieEnd); - return newCookie; - } - - /****************************************************************************** -Index: netwerk/cookie/src/nsCookieService.h -=================================================================== ---- netwerk/cookie/src/nsCookieService.h 2007-07-16 10:53:19.000000000 +0000 -+++ netwerk/cookie/src/nsCookieService.h 2007-07-16 11:32:29.000000000 +0000 -@@ -217,11 +217,17 @@ - PRUint16 mMaxCookiesPerHost; - - // private static member, used to cache a ptr to nsCookieService, - // so we can make nsCookieService a singleton xpcom object. - static nsCookieService *gCookieService; - - // this callback needs access to member functions - friend PLDHashOperator PR_CALLBACK removeExpiredCallback(nsCookieEntry *aEntry, void *aArg); -+ -+ nsresult GetCookieStringFromHttpInternal(nsIURI *aHostURI, -+ nsIURI *aFirstURI, -+ nsIChannel *aChannel, -+ char **aCookie, -+ PRBool aHttpBound); - }; - - #endif // nsCookieService_h__ -Index: js/src/jsopcode.c -=================================================================== -RCS file: /cvsroot/js/src/jsopcode.c,v -retrieving revision 3.89.2.8.2.11 -diff -u -8 -p -r3.89.2.8.2.11 jsopcode.c ---- js/src/jsopcode.c 3 Apr 2007 04:59:17 -0000 3.89.2.8.2.11 -+++ js/src/jsopcode.c 17 Jul 2007 17:15:52 -0000 -@@ -61,16 +61,17 @@ - #include "jsconfig.h" - #include "jsdbgapi.h" - #include "jsemit.h" - #include "jsfun.h" - #include "jslock.h" - #include "jsobj.h" - #include "jsopcode.h" - #include "jsregexp.h" -+#include "jsscan.h" - #include "jsscope.h" - #include "jsscript.h" - #include "jsstr.h" - - const char js_const_str[] = "const"; - const char js_var_str[] = "var"; - const char js_function_str[] = "function"; - const char js_in_str[] = "in"; -@@ -2526,41 +2527,54 @@ Decompile(SprintStack *ss, jsbytecode *p - ? " " : "", - (lastop == JSOP_GETTER) ? js_getter_str : - (lastop == JSOP_SETTER) ? js_setter_str : - "", - rval); - #else - if (lastop == JSOP_GETTER || lastop == JSOP_SETTER) { - rval += strlen(js_function_str) + 1; -- todo = Sprint(&ss->sprinter, "%s%s%s %s%.*s", -- lval, -- (lval[1] != '\0') ? ", " : "", -- (lastop == JSOP_GETTER) -- ? js_get_str : js_set_str, -- xval, -- strlen(rval) - 1, -- rval); -+ if (!atom || !ATOM_IS_STRING(atom) || -+ !ATOM_IS_IDENTIFIER(atom) || -+ !!ATOM_KEYWORD(js_AtomizeChars(cx, -+ ATOM_TO_STRING(atom), -+ sizeof(ATOM_TO_STRING(atom)), -+ 0))|| -+ ((ss->opcodes[ss->top+1] != JSOP_ANONFUNOBJ || -+ strncmp(rval, js_function_str, 8) != 0) && -+ ss->opcodes[ss->top+1] != JSOP_NAMEDFUNOBJ)) { -+ -+ todo = Sprint(&ss->sprinter, "%s%s%s %s%.*s", -+ lval, -+ (lval[1] != '\0') ? ", " : "", -+ (lastop == JSOP_GETTER) -+ ? js_get_str : js_set_str, -+ xval, -+ strlen(rval) - 1, -+ rval); -+ } - } else { - todo = Sprint(&ss->sprinter, "%s%s%s:%s", - lval, - (lval[1] != '\0') ? ", " : "", - xval, - rval); - } - #endif - break; - - case JSOP_INITELEM: - rval = POP_STR(); - xval = POP_STR(); - lval = POP_STR(); - sn = js_GetSrcNote(jp->script, pc); -- if (sn && SN_TYPE(sn) == SRC_LABEL) -+ if (sn && SN_TYPE(sn) == SRC_LABEL) { -+ atom = NULL; - goto do_initprop; -+ } - todo = Sprint(&ss->sprinter, "%s%s%s", - lval, - (lval[1] != '\0' || *xval != '0') ? ", " : "", - rval); - break; - - #if JS_HAS_SHARP_VARS - case JSOP_DEFSHARP: -Index: js/src/jsobj.c -=================================================================== -RCS file: /cvsroot/js/src/jsobj.c,v -retrieving revision 3.208.2.12.2.26 -diff -u -8 -p -r3.208.2.12.2.26 jsobj.c ---- js/src/jsobj.c 11 Jul 2007 01:28:31 -0000 3.208.2.12.2.26 -+++ js/src/jsobj.c 17 Jul 2007 17:15:53 -0000 -@@ -57,16 +57,17 @@ - #include "jscntxt.h" - #include "jsconfig.h" - #include "jsfun.h" - #include "jsgc.h" - #include "jsinterp.h" - #include "jslock.h" - #include "jsnum.h" - #include "jsobj.h" -+#include "jsscan.h" - #include "jsscope.h" - #include "jsscript.h" - #include "jsstr.h" - #include "jsopcode.h" - - #include "jsdbgapi.h" /* whether or not JS_HAS_OBJ_WATCHPOINT */ - - #if JS_HAS_XML_SUPPORT -@@ -689,20 +690,22 @@ js_obj_toSource(JSContext *cx, JSObject - jsint i, j, length, valcnt; - jsid id; - #if JS_HAS_GETTER_SETTER - JSObject *obj2; - JSProperty *prop; - uintN attrs; - #endif - jsval *val; -+ JSString *gsopold[2]; - JSString *gsop[2]; - JSAtom *atom; - JSString *idstr, *valstr, *str; - int stackDummy; -+ char *atomstrchars; - - if (!JS_CHECK_STACK_SIZE(cx, stackDummy)) { - JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_OVER_RECURSED); - return JS_FALSE; - } - - /* - * obj_toString for 1.2 calls toSource, and doesn't want the extra parens -@@ -806,91 +809,110 @@ js_obj_toSource(JSContext *cx, JSObject - /* - * We have four local roots for cooked and raw value GC safety. Hoist the - * "argv + 2" out of the loop using the val local, which refers to the raw - * (unconverted, "uncooked") values. - */ - val = argv + 2; - - for (i = 0, length = ida->length; i < length; i++) { -+ JSBool idIsLexicalIdentifier, needOldStyleGetterSetter; -+ - /* Get strings for id and value and GC-root them via argv. */ - id = ida->vector[i]; - - #if JS_HAS_GETTER_SETTER -- - ok = OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop); - if (!ok) - goto error; -+#endif -+ -+ /* -+ * Convert id to a jsval and then to a string. Decide early whether we -+ * prefer get/set or old getter/setter syntax. -+ */ -+ atom = JSID_IS_ATOM(id) ? JSID_TO_ATOM(id) : NULL; -+ idstr = js_ValueToString(cx, ID_TO_VALUE(id)); -+ if (!idstr) { -+ ok = JS_FALSE; -+ OBJ_DROP_PROPERTY(cx, obj2, prop); -+ goto error; -+ } -+ *rval = STRING_TO_JSVAL(idstr); /* local root */ -+ idIsLexicalIdentifier = js_IsIdentifier(idstr); -+ -+ atomstrchars = ATOM_TO_STRING(atom); -+ needOldStyleGetterSetter = -+ !idIsLexicalIdentifier || -+ ATOM_KEYWORD(js_AtomizeChars(cx, -+ atomstrchars, -+ sizeof(atomstrchars), -+ 0)) != TOK_EOF; -+ -+#if JS_HAS_GETTER_SETTER -+ - valcnt = 0; - if (prop) { - ok = OBJ_GET_ATTRIBUTES(cx, obj2, id, prop, &attrs); - if (!ok) { - OBJ_DROP_PROPERTY(cx, obj2, prop); - goto error; - } - if (OBJ_IS_NATIVE(obj2) && - (attrs & (JSPROP_GETTER | JSPROP_SETTER))) { - if (attrs & JSPROP_GETTER) { - val[valcnt] = (jsval) ((JSScopeProperty *)prop)->getter; --#ifdef OLD_GETTER_SETTER -- gsop[valcnt] = -+ gsopold[valcnt] = - ATOM_TO_STRING(cx->runtime->atomState.getterAtom); --#else - gsop[valcnt] = - ATOM_TO_STRING(cx->runtime->atomState.getAtom); --#endif - valcnt++; - } - if (attrs & JSPROP_SETTER) { - val[valcnt] = (jsval) ((JSScopeProperty *)prop)->setter; --#ifdef OLD_GETTER_SETTER -- gsop[valcnt] = -+ gsopold[valcnt] = - ATOM_TO_STRING(cx->runtime->atomState.setterAtom); --#else - gsop[valcnt] = - ATOM_TO_STRING(cx->runtime->atomState.setAtom); --#endif - valcnt++; - } - } else { - valcnt = 1; - gsop[0] = NULL; -+ gsopold[0] = NULL; - ok = OBJ_GET_PROPERTY(cx, obj, id, &val[0]); - } - OBJ_DROP_PROPERTY(cx, obj2, prop); - } - - #else /* !JS_HAS_GETTER_SETTER */ - -+ /* -+ * We simplify the source code at the price of minor dead code bloat in -+ * the ECMA version (for testing only, see jsconfig.h). The null -+ * default values in gsop[j] suffice to disable non-ECMA getter and -+ * setter code. -+ */ - valcnt = 1; - gsop[0] = NULL; -+ gsopold[0] = NULL; - ok = OBJ_GET_PROPERTY(cx, obj, id, &val[0]); - - #endif /* !JS_HAS_GETTER_SETTER */ - - if (!ok) - goto error; - -- /* Convert id to a jsval and then to a string. */ -- atom = JSID_IS_ATOM(id) ? JSID_TO_ATOM(id) : NULL; -- id = ID_TO_VALUE(id); -- idstr = js_ValueToString(cx, id); -- if (!idstr) { -- ok = JS_FALSE; -- goto error; -- } -- *rval = STRING_TO_JSVAL(idstr); /* local root */ -- - /* - * If id is a string that's a reserved identifier, or else id is not - * an identifier at all, then it needs to be quoted. Also, negative - * integer ids must be quoted. - */ - if (atom -- ? (ATOM_KEYWORD(atom) || !js_IsIdentifier(idstr)) -+ ? (ATOM_KEYWORD(atom) || !idIsLexicalIdentifier) - : (JSID_IS_OBJECT(id) || JSID_TO_INT(id) < 0)) { - idstr = js_QuoteString(cx, idstr, (jschar)'\''); - if (!idstr) { - ok = JS_FALSE; - goto error; - } - *rval = STRING_TO_JSVAL(idstr); /* local root */ - } -@@ -903,46 +925,67 @@ js_obj_toSource(JSContext *cx, JSObject - if (!valstr) { - ok = JS_FALSE; - goto error; - } - argv[j] = STRING_TO_JSVAL(valstr); /* local root */ - vchars = JSSTRING_CHARS(valstr); - vlength = JSSTRING_LENGTH(valstr); - -+ if (vchars[0] == '#') -+ needOldStyleGetterSetter = JS_TRUE; -+ -+ if (needOldStyleGetterSetter) -+ gsop[j] = gsopold[j]; -+ - #ifndef OLD_GETTER_SETTER - /* - * Remove '(function ' from the beginning of valstr and ')' from the - * end so that we can put "get" in front of the function definition. - */ -- if (gsop[j]) { -- int n = strlen(js_function_str) + 2; -- vchars += n; -- vlength -= n + 1; -+ if (gsop[j] && (JS_TypeOfValue(cx, val[j]) == JSTYPE_FUNCTION) && -+ !needOldStyleGetterSetter) { -+ const jschar *start = vchars; -+ if (vchars[0] == '(') -+ vchars++; -+ vchars = js_strchr_limit(vchars, '(', vchars + vlength); -+ if (vchars) { -+ vlength -= vchars - start + 1; -+ } else { -+ gsop[j] = NULL; -+ vchars = start; -+ } - } -+#else -+ needOldStyleGetterSetter = JS_TRUE; -+ gsop[j] = gsopold[j]; - #endif - - /* If val[j] is a non-sharp object, consider sharpening it. */ - vsharp = NULL; - vsharplength = 0; - #if JS_HAS_SHARP_VARS - if (!JSVAL_IS_PRIMITIVE(val[j]) && vchars[0] != '#') { - he = js_EnterSharpObject(cx, JSVAL_TO_OBJECT(val[j]), NULL, - &vsharp); - if (!he) { - ok = JS_FALSE; - goto error; - } - if (IS_SHARP(he)) { - vchars = vsharp; - vlength = js_strlen(vchars); -+ needOldStyleGetterSetter = JS_TRUE; -+ gsop[j] = gsopold[j]; - } else { - if (vsharp) { - vsharplength = js_strlen(vsharp); - MAKE_SHARP(he); -+ needOldStyleGetterSetter = JS_TRUE; -+ gsop[j] = gsopold[j]; - } - js_LeaveSharpObject(cx, NULL); - } - } - #endif - - #define SAFE_ADD(n) \ - JS_BEGIN_MACRO \ -@@ -977,38 +1020,41 @@ js_obj_toSource(JSContext *cx, JSObject - } - - if (comma) { - chars[nchars++] = comma[0]; - chars[nchars++] = comma[1]; - } - comma = ", "; - --#ifdef OLD_GETTER_SETTER -- js_strncpy(&chars[nchars], idstrchars, idstrlength); -- nchars += idstrlength; -- if (gsop[j]) { -- chars[nchars++] = ' '; -- gsoplength = JSSTRING_LENGTH(gsop[j]); -- js_strncpy(&chars[nchars], JSSTRING_CHARS(gsop[j]), gsoplength); -- nchars += gsoplength; -- } -- chars[nchars++] = ':'; --#else -- if (gsop[j]) { -- gsoplength = JSSTRING_LENGTH(gsop[j]); -- js_strncpy(&chars[nchars], JSSTRING_CHARS(gsop[j]), gsoplength); -- nchars += gsoplength; -- chars[nchars++] = ' '; -- } -- js_strncpy(&chars[nchars], idstrchars, idstrlength); -- nchars += idstrlength; -- if (!gsop[j]) -+ if (needOldStyleGetterSetter) { -+ js_strncpy(&chars[nchars], idstrchars, idstrlength); -+ nchars += idstrlength; -+ if (gsop[j]) { -+ chars[nchars++] = ' '; -+ gsoplength = JSSTRING_LENGTH(gsop[j]); -+ js_strncpy(&chars[nchars], JSSTRING_CHARS(gsop[j]), -+ gsoplength); -+ nchars += gsoplength; -+ } - chars[nchars++] = ':'; --#endif -+ } else { /* New style "decompilation" */ -+ if (gsop[j]) { -+ gsoplength = JSSTRING_LENGTH(gsop[j]); -+ js_strncpy(&chars[nchars], JSSTRING_CHARS(gsop[j]), -+ gsoplength); -+ nchars += gsoplength; -+ chars[nchars++] = ' '; -+ } -+ js_strncpy(&chars[nchars], idstrchars, idstrlength); -+ nchars += idstrlength; -+ /* Extraneous space after id here will be extracted later */ -+ chars[nchars++] = gsop[j] ? ' ' : ':'; -+ } -+ - if (vsharplength) { - js_strncpy(&chars[nchars], vsharp, vsharplength); - nchars += vsharplength; - } - js_strncpy(&chars[nchars], vchars, vlength); - nchars += vlength; - - if (vsharp) ---- - js/src/jsinterp.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: js/src/jsinterp.c -=================================================================== ---- js/src/jsinterp.c 2007-07-16 11:06:07.000000000 +0200 -+++ js/src/jsinterp.c 2007-07-16 11:06:17.000000000 +0200 -@@ -2025,16 +2025,17 @@ - cx->fp = fp = fp->down; - JS_ARENA_RELEASE(&cx->stackPool, ifp->mark); - - /* Restore sp to point just above the return value. */ - fp->sp = vp + 1; - RESTORE_SP(fp); - - /* Restore the calling script's interpreter registers. */ -+ obj = NULL; - script = fp->script; - depth = (jsint) script->depth; - pc = fp->pc; - endpc = script->code + script->length; - - /* Store the generating pc for the return value. */ - vp[-depth] = (jsval)pc; - -@@ -3579,16 +3580,17 @@ - if (currentVersion != cx->version) - js_SetVersion(cx, currentVersion); - } - - /* Push the frame and set interpreter registers. */ - cx->fp = fp = &newifp->frame; - pc = script->code; - endpc = pc + script->length; -+ obj = NULL; - inlineCallCount++; - JS_RUNTIME_METER(rt, inlineCalls); - continue; - - bad_inline_call: - script = fp->script; - depth = (jsint) script->depth; - goto out; - caps/src/nsPrincipal.cpp | 39 --- - caps/src/nsScriptSecurityManager.cpp | 33 +- - content/base/public/nsIDocument.h | 42 +++ - content/base/src/nsDocument.cpp | 2 - content/base/src/nsDocument.h | 1 - content/base/src/nsFrameLoader.cpp | 7 - content/html/document/src/nsHTMLDocument.cpp | 44 +-- - docshell/base/nsDocShell.cpp | 154 +++++++++--- - docshell/base/nsDocShell.h | 16 + - dom/public/base/nsPIDOMWindow.h | 29 ++ - dom/src/base/nsGlobalWindow.cpp | 161 +++++++------ - dom/src/base/nsGlobalWindow.h | 10 - dom/src/jsurl/nsJSProtocolHandler.cpp | 6 - embedding/components/windowwatcher/src/Makefile.in | 1 - embedding/components/windowwatcher/src/nsWindowWatcher.cpp | 61 ++++ - embedding/components/windowwatcher/src/nsWindowWatcher.h | 1 - 16 files changed, 395 insertions(+), 212 deletions(-) - -Index: caps/src/nsPrincipal.cpp -=================================================================== ---- caps/src/nsPrincipal.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ caps/src/nsPrincipal.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -260,15 +260,10 @@ - } - - // Codebases are equal if they have the same origin. -- nsIURI *origin = mDomain ? mDomain : mCodebase; -- nsCOMPtr<nsIURI> otherOrigin; -- aOther->GetDomain(getter_AddRefs(otherOrigin)); -- if (!otherOrigin) { -- aOther->GetURI(getter_AddRefs(otherOrigin)); -- } -- -- return nsScriptSecurityManager::GetScriptSecurityManager() -- ->SecurityCompareURIs(origin, otherOrigin, aResult); -+ *aResult = -+ NS_SUCCEEDED(nsScriptSecurityManager::GetScriptSecurityManager() -+ ->CheckSameOriginPrincipal(this, aOther)); -+ return NS_OK; - } - - *aResult = PR_TRUE; -@@ -278,32 +273,6 @@ - NS_IMETHODIMP - nsPrincipal::Subsumes(nsIPrincipal *aOther, PRBool *aResult) - { -- // First, check if aOther is an about:blank principal. If it is, then we can -- // subsume it. -- -- nsCOMPtr<nsIURI> otherOrigin; -- aOther->GetURI(getter_AddRefs(otherOrigin)); -- -- if (otherOrigin) { -- PRBool isAbout = PR_FALSE; -- if (NS_SUCCEEDED(otherOrigin->SchemeIs("about", &isAbout)) && isAbout) { -- nsCAutoString str; -- otherOrigin->GetSpec(str); -- -- // Note: about:blank principals do not necessarily subsume about:blank -- // principals (unless aOther == this, which is checked in the Equals call -- // below). -- -- if (str.Equals("about:blank")) { -- PRBool isEqual = PR_FALSE; -- if (NS_SUCCEEDED(otherOrigin->Equals(mCodebase, &isEqual)) && !isEqual) { -- *aResult = PR_TRUE; -- return NS_OK; -- } -- } -- } -- } -- - return Equals(aOther, aResult); - } - -Index: caps/src/nsScriptSecurityManager.cpp -=================================================================== ---- caps/src/nsScriptSecurityManager.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ caps/src/nsScriptSecurityManager.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -273,7 +273,7 @@ - return NS_OK; - } - -- if (!aTargetURI) -+ if (!aTargetURI || !aSourceURI) - { - // return false - return NS_OK; -@@ -863,8 +863,14 @@ - if (aSubject == aObject) - return NS_OK; - -+ // These booleans are only used when !aIsCheckConnect. Default -+ // them to false, and change if that turns out wrong. -+ PRBool subjectSetDomain = PR_FALSE; -+ PRBool objectSetDomain = PR_FALSE; -+ - nsCOMPtr<nsIURI> subjectURI; - nsCOMPtr<nsIURI> objectURI; -+ - if (aIsCheckConnect) - { - // Don't use domain for CheckConnect calls, since that's called for -@@ -875,12 +881,18 @@ - else - { - aSubject->GetDomain(getter_AddRefs(subjectURI)); -- if (!subjectURI) -+ if (!subjectURI) { - aSubject->GetURI(getter_AddRefs(subjectURI)); -+ } else { -+ subjectSetDomain = PR_TRUE; -+ } - - aObject->GetDomain(getter_AddRefs(objectURI)); -- if (!objectURI) -+ if (!objectURI) { - aObject->GetURI(getter_AddRefs(objectURI)); -+ } else { -+ objectSetDomain = PR_TRUE; -+ } - } - - PRBool isSameOrigin = PR_FALSE; -@@ -899,24 +911,11 @@ - if (aIsCheckConnect) - return NS_OK; - -- nsCOMPtr<nsIURI> subjectDomain; -- aSubject->GetDomain(getter_AddRefs(subjectDomain)); -- -- nsCOMPtr<nsIURI> objectDomain; -- aObject->GetDomain(getter_AddRefs(objectDomain)); -- - // If both or neither explicitly set their domain, allow the access -- if (!subjectDomain == !objectDomain) -+ if (subjectSetDomain == objectSetDomain) - return NS_OK; - } - -- // Allow access to about:blank -- nsXPIDLCString origin; -- rv = aObject->GetOrigin(getter_Copies(origin)); -- NS_ENSURE_SUCCESS(rv, rv); -- if (nsCRT::strcasecmp(origin, "about:blank") == 0) -- return NS_OK; -- - /* - ** Access tests failed, so now report error. - */ -Index: content/base/public/nsIDocument.h -=================================================================== ---- content/base/public/nsIDocument.h 2007-07-16 11:51:44.000000000 +0200 -+++ content/base/public/nsIDocument.h 2007-07-16 11:53:05.000000000 +0200 -@@ -841,7 +841,7 @@ - PRUint32 mPartID; - }; - --// IID for the nsIDocument interface -+// IID for the nsIDocument_MOZILLA_1_8_0_BRANCH interface - #define NS_IDOCUMENT_MOZILLA_1_8_0_BRANCH_IID \ - { 0x7d001ad2, 0x01ac, 0x4bf2, \ - { 0xb8, 0x3a, 0x50, 0xaa, 0xed, 0xc6, 0x1d, 0xfa } } -@@ -870,6 +870,46 @@ - virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify) = 0; - }; - -+// IID for the nsIDocument_MOZILLA_1_8_BRANCH2 interface -+#define NS_IDOCUMENT_MOZILLA_1_8_BRANCH2_IID \ -+{ 0x095024b5, 0x57d1, 0x4117, \ -+ { 0xb6, 0x02, 0x5c, 0x6d, 0xf2, 0x81, 0xe0, 0xba } } -+ -+class nsIDocument_MOZILLA_1_8_BRANCH2 : public nsISupports -+{ -+public: -+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_MOZILLA_1_8_BRANCH2_IID) -+ -+ nsIDocument_MOZILLA_1_8_BRANCH2() : -+ mIsInitialDocumentInWindow(PR_FALSE) -+ { -+ } -+ -+ /** -+ * Ask this document whether it's the initial document in its window. -+ */ -+ PRBool IsInitialDocument() const -+ { -+ return mIsInitialDocumentInWindow; -+ } -+ -+ /** -+ * Tell this document that it's the initial document in its window. See -+ * comments on mIsInitialDocumentInWindow for when this should be called. -+ */ -+ void SetIsInitialDocument(PRBool aIsInitialDocument) -+ { -+ mIsInitialDocumentInWindow = aIsInitialDocument; -+ } -+ -+protected: -+ // True if this document is the initial document for a window. This should -+ // basically be true only for documents that exist in newly-opened windows or -+ // documents created to satisfy a GetDocument() on a window when there's no -+ // document in it. -+ PRBool mIsInitialDocumentInWindow; -+}; -+ - /** - * Helper class to automatically handle batching of document updates. This - * class will call BeginUpdate on construction and EndUpdate on destruction on -Index: content/base/src/nsDocument.cpp -=================================================================== ---- content/base/src/nsDocument.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ content/base/src/nsDocument.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -783,6 +783,7 @@ - - nsDocument::nsDocument() - : nsIDocument(), -+ nsIDocument_MOZILLA_1_8_BRANCH2(), - mVisible(PR_TRUE) - { - #ifdef PR_LOGGING -@@ -916,6 +917,7 @@ - NS_INTERFACE_MAP_BEGIN(nsDocument) - NS_INTERFACE_MAP_ENTRY(nsIDocument) - NS_INTERFACE_MAP_ENTRY(nsIDocument_MOZILLA_1_8_0_BRANCH) -+ NS_INTERFACE_MAP_ENTRY(nsIDocument_MOZILLA_1_8_BRANCH2) - NS_INTERFACE_MAP_ENTRY(nsIDOMDocument) - NS_INTERFACE_MAP_ENTRY(nsIDOMNSDocument) - NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentEvent) -Index: content/base/src/nsDocument.h -=================================================================== ---- content/base/src/nsDocument.h 2007-07-16 11:51:44.000000000 +0200 -+++ content/base/src/nsDocument.h 2007-07-16 11:53:05.000000000 +0200 -@@ -365,6 +365,7 @@ - // the interface. - class nsDocument : public nsIDocument, - public nsIDocument_MOZILLA_1_8_0_BRANCH, -+ public nsIDocument_MOZILLA_1_8_BRANCH2, - public nsIDOMXMLDocument, // inherits nsIDOMDocument - public nsIDOMNSDocument, - public nsIDOMDocumentEvent, -Index: content/base/src/nsFrameLoader.cpp -=================================================================== ---- content/base/src/nsFrameLoader.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ content/base/src/nsFrameLoader.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -165,6 +165,13 @@ - // load instead of just forcing the system principal. That way if we have - // something loaded already the principal used will be that of what we - // already have loaded. -+ -+ // XXX bz I'd love to nix this, but the problem is chrome calling -+ // setAttribute() on an iframe or browser and passing in a javascript: URI. -+ // We probably don't want to run that with chrome privileges... Though in -+ // similar circumstances, if one sets window.location.href from chrome we -+ // _do_ run that with chrome privileges, so maybe we should do the same -+ // here? - loadInfo->SetInheritOwner(PR_TRUE); - - // Also, in this case we don't set a referrer, just in case. -Index: content/html/document/src/nsHTMLDocument.cpp -=================================================================== ---- content/html/document/src/nsHTMLDocument.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ content/html/document/src/nsHTMLDocument.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -2020,10 +2020,24 @@ - // Rememer the old scope in case the call to SetNewDocument changes it. - nsCOMPtr<nsIScriptGlobalObject> oldScope(do_QueryReferent(mScopeObject)); - -+ // If callerPrincipal doesn't match our principal. make sure that -+ // SetNewDocument gives us a new inner window and clears our scope. -+ NS_ENSURE_TRUE(GetPrincipal(), NS_ERROR_OUT_OF_MEMORY); -+ if (!callerPrincipal || -+ NS_FAILED(nsContentUtils::GetSecurityManager()-> -+ CheckSameOriginPrincipal(callerPrincipal, GetPrincipal()))) { -+ SetIsInitialDocument(PR_FALSE); -+ } -+ - rv = mScriptGlobalObject->SetNewDocument((nsDocument *)this, nsnull, - PR_FALSE, PR_FALSE); - NS_ENSURE_SUCCESS(rv, rv); - -+ // Now make sure we're not flagged as the initial document anymore, now -+ // that we've had stuff done to us. From now on, if anyone tries to -+ // document.open() us, they get a new inner window. -+ SetIsInitialDocument(PR_FALSE); -+ - nsCOMPtr<nsIScriptGlobalObject> newScope(do_QueryReferent(mScopeObject)); - if (oldScope && newScope != oldScope) { - nsContentUtils::ReparentContentWrappersInScope(oldScope, newScope); -@@ -2359,36 +2373,6 @@ - GetCurrentNativeCallContext(getter_AddRefs(ncc)); - NS_ENSURE_SUCCESS(rv, rv); - -- nsCAutoString spec; -- -- if (mDocumentURI) { -- rv = mDocumentURI->GetSpec(spec); -- NS_ENSURE_SUCCESS(rv, rv); -- } -- -- if (!mDocumentURI || spec.EqualsLiteral("about:blank")) { -- // The current document's URI and principal are empty or "about:blank". -- // By writing to this document, the script acquires responsibility for the -- // document for security purposes. Thus a document.write of a script tag -- // ends up producing a script with the same principals as the script -- // that performed the write. -- nsIScriptSecurityManager *secMan = nsContentUtils::GetSecurityManager(); -- -- nsCOMPtr<nsIPrincipal> subject; -- rv = secMan->GetSubjectPrincipal(getter_AddRefs(subject)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (subject) { -- nsCOMPtr<nsIURI> subjectURI; -- subject->GetURI(getter_AddRefs(subjectURI)); -- -- if (subjectURI) { -- mDocumentURI = subjectURI; -- mPrincipal = subject; -- } -- } -- } -- - if (ncc) { - // We're called from JS, concatenate the extra arguments into - // string_buffer -Index: docshell/base/nsDocShell.cpp -=================================================================== ---- docshell/base/nsDocShell.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ docshell/base/nsDocShell.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -3226,21 +3226,20 @@ - rv = LoadHistoryEntry(mLSHE, type); - } - else { -+ nsCOMPtr<nsIDOMDocument> domDoc(do_GetInterface(GetAsSupports(this))); -+ nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc)); -+ -+ nsIPrincipal* principal = nsnull; - nsAutoString contentTypeHint; -- nsCOMPtr<nsIDOMWindow> window(do_GetInterface((nsIDocShell*)this)); -- if (window) { -- nsCOMPtr<nsIDOMDocument> document; -- window->GetDocument(getter_AddRefs(document)); -- nsCOMPtr<nsIDOMNSDocument> doc(do_QueryInterface(document)); -- if (doc) { -- doc->GetContentType(contentTypeHint); -- } -+ if (doc) { -+ principal = doc->GetPrincipal(); -+ doc->GetContentType(contentTypeHint); - } - - rv = InternalLoad(mCurrentURI, - mReferrerURI, -- nsnull, // No owner -- INTERNAL_LOAD_FLAGS_INHERIT_OWNER, // Inherit owner from document -+ principal, -+ INTERNAL_LOAD_FLAGS_NONE, // Do not inherit owner from document - nsnull, // No window target - NS_LossyConvertUCS2toASCII(contentTypeHint).get(), - nsnull, // No post data -@@ -4859,7 +4858,38 @@ - if (mIsBeingDestroyed) - return NS_ERROR_FAILURE; - -- return CreateAboutBlankContentViewer(); -+ nsIPrincipal* principal = nsnull; -+ -+ nsCOMPtr<nsPIDOMWindow_MOZILLA_1_8_BRANCH2> piDOMWindow = -+ do_QueryInterface(mScriptGlobal); -+ if (piDOMWindow) { -+ principal = piDOMWindow->GetOpenerScriptPrincipal(); -+ } -+ -+ if (!principal) { -+ principal = GetInheritedPrincipal(PR_FALSE); -+ } -+ -+ nsresult rv = CreateAboutBlankContentViewer(); -+ -+ if (NS_SUCCEEDED(rv)) { -+ nsCOMPtr<nsIDOMDocument> domDoc; -+ mContentViewer->GetDOMDocument(getter_AddRefs(domDoc)); -+ nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc)); -+ nsCOMPtr<nsIDocument_MOZILLA_1_8_BRANCH2> doc_MOZILLA_1_8_BRANCH2 = -+ do_QueryInterface(domDoc); -+ NS_ASSERTION(doc && doc_MOZILLA_1_8_BRANCH2, -+ "Should have doc if CreateAboutBlankContentViewer " -+ "succeeded!"); -+ -+ doc_MOZILLA_1_8_BRANCH2->SetIsInitialDocument(PR_TRUE); -+ -+ if (principal) { -+ doc->SetPrincipal(principal); -+ } -+ } -+ -+ return rv; - } - - NS_IMETHODIMP -@@ -6300,12 +6330,28 @@ - - nsCOMPtr<nsISupports> owner(aOwner); - // -- // Get an owner from the current document if necessary, but only -- // if this is not an external load. -+ // Get an owner from the current document if necessary. Note that we only -+ // do this for URIs that inherit a security context; in particular we do -+ // NOT do this for about:blank. This way, random about:blank loads that -+ // have no owner (which basically means they were done by someone from -+ // chrome manually messing with our nsIWebNavigation or by C++ setting -+ // document.location) don't get a funky principal. If callers want -+ // something interesting to happen with the about:blank principal in this -+ // case, they should pass an owner in. - // - if (aLoadType != LOAD_NORMAL_EXTERNAL && !owner && -- (aFlags & INTERNAL_LOAD_FLAGS_INHERIT_OWNER)) -- GetCurrentDocumentOwner(getter_AddRefs(owner)); -+ (aFlags & INTERNAL_LOAD_FLAGS_INHERIT_OWNER)) { -+ PRBool inherits; -+ PRBool isScheme; -+ inherits = -+ (NS_SUCCEEDED(aURI->SchemeIs("javascript", &isScheme)) && -+ isScheme) || -+ (NS_SUCCEEDED(aURI->SchemeIs("data", &isScheme)) && -+ isScheme); -+ if (inherits) { -+ owner = GetInheritedPrincipal(PR_TRUE); -+ } -+ } - - // - // Resolve the window target before going any further... -@@ -6684,42 +6730,51 @@ - return rv; - } - --void --nsDocShell::GetCurrentDocumentOwner(nsISupports ** aOwner) -+nsIPrincipal* -+nsDocShell::GetInheritedPrincipal(PRBool aConsiderCurrentDocument) - { -- *aOwner = nsnull; - nsCOMPtr<nsIDocument> document; -- //-- Get the current document -- if (mContentViewer) { -+ -+ if (aConsiderCurrentDocument && mContentViewer) { - nsCOMPtr<nsIDocumentViewer> - docViewer(do_QueryInterface(mContentViewer)); - if (!docViewer) -- return; -+ return nsnull; - docViewer->GetDocument(getter_AddRefs(document)); - } -- else //-- If there's no document loaded yet, look at the parent (frameset) -- { -+ -+ if (!document) { - nsCOMPtr<nsIDocShellTreeItem> parentItem; - GetSameTypeParent(getter_AddRefs(parentItem)); -- if (!parentItem) -- return; -- nsCOMPtr<nsIDOMWindowInternal> -- parentWindow(do_GetInterface(parentItem)); -- if (!parentWindow) -- return; -- nsCOMPtr<nsIDOMDocument> parentDomDoc; -- parentWindow->GetDocument(getter_AddRefs(parentDomDoc)); -- if (!parentDomDoc) -- return; -- document = do_QueryInterface(parentDomDoc); -+ if (parentItem) { -+ nsCOMPtr<nsIDOMDocument> parentDomDoc(do_GetInterface(parentItem)); -+ document = do_QueryInterface(parentDomDoc); -+ } -+ } -+ -+ if (!document) { -+ if (!aConsiderCurrentDocument) { -+ return nsnull; -+ } -+ -+ // Make sure we end up with _something_ as the principal no matter -+ // what. -+ EnsureContentViewer(); // If this fails, we'll just get a null -+ // docViewer and bail. -+ -+ nsCOMPtr<nsIDocumentViewer> -+ docViewer(do_QueryInterface(mContentViewer)); -+ if (!docViewer) -+ return nsnull; -+ docViewer->GetDocument(getter_AddRefs(document)); - } - - //-- Get the document's principal - if (document) { -- *aOwner = document->GetPrincipal(); -+ return document->GetPrincipal(); - } - -- NS_IF_ADDREF(*aOwner); -+ return nsnull; - } - - nsresult -@@ -6885,7 +6940,12 @@ - // Set the owner of the channel - only for javascript and data channels. - // - // XXX: Is seems wrong that the owner is ignored - even if one is -- // supplied) unless the URI is javascript or data. -+ // supplied) unless the URI is javascript or data or about:blank. -+ // XXX: If this is ever changed, check all callers for what owners they're -+ // passing in. In particular, see the code and comments in LoadURI -+ // where we fall back on inheriting the owner if called -+ // from chrome. That would be very wrong if this code changed -+ // anything but channels that can't provide their own security context! - // - // (Currently chrome URIs set the owner when they are created! - // So setting a NULL owner would be bad!) -@@ -6895,7 +6955,7 @@ - if (!isJSOrData) { - aURI->SchemeIs("data", &isJSOrData); - } -- if (isJSOrData) { -+ if (isJSOrData || IsAboutBlank(aURI)) { - channel->SetOwner(aOwner); - } - -@@ -8730,3 +8790,21 @@ - - return wwatch->GetNewAuthPrompter(window, aResult); - } -+ -+/* static */ -+PRBool -+nsDocShell::IsAboutBlank(nsIURI* aURI) -+{ -+ NS_PRECONDITION(aURI, "Must have URI"); -+ -+ // GetSpec can be expensive for some URIs, so check the scheme first. -+ PRBool isAbout = PR_FALSE; -+ if (NS_FAILED(aURI->SchemeIs("about", &isAbout)) || !isAbout) { -+ return PR_FALSE; -+ } -+ -+ nsCAutoString str; -+ aURI->GetSpec(str); -+ return str.EqualsLiteral("about:blank"); -+} -+ -Index: docshell/base/nsDocShell.h -=================================================================== ---- docshell/base/nsDocShell.h 2007-07-16 11:51:44.000000000 +0200 -+++ docshell/base/nsDocShell.h 2007-07-16 11:53:05.000000000 +0200 -@@ -287,7 +287,18 @@ - void SetupReferrerFromChannel(nsIChannel * aChannel); - - NS_IMETHOD GetEldestPresContext(nsPresContext** aPresContext); -- void GetCurrentDocumentOwner(nsISupports ** aOwner); -+ -+ // Get the principal that we'll set on the channel if we're inheriting. If -+ // aConsiderCurrentDocument is true, we try to use the current document if -+ // at all possible. If that fails, we fall back on the parent document. -+ // If that fails too, we force creation of a content viewer and use the -+ // resulting principal. If aConsiderCurrentDocument is false, we just look -+ // at the parent. -+ nsIPrincipal* GetInheritedPrincipal(PRBool aConsiderCurrentDocument); -+ -+ // Actually open a channel and perform a URI load. Note: whatever owner is -+ // passed to this function will be set on the channel. Callers who wish to -+ // not have an owner on the channel should just pass null. - virtual nsresult DoURILoad(nsIURI * aURI, - nsIURI * aReferrer, - PRBool aSendReferrer, -@@ -511,6 +522,9 @@ - // Call BeginRestore(nsnull, PR_FALSE) for each child of this shell. - nsresult BeginRestoreChildren(); - -+ // Check whether aURI is about:blank -+ static PRBool IsAboutBlank(nsIURI* aURI); -+ - protected: - // Override the parent setter from nsDocLoader - virtual nsresult SetDocLoaderParent(nsDocLoader * aLoader); -Index: dom/public/base/nsPIDOMWindow.h -=================================================================== ---- dom/public/base/nsPIDOMWindow.h 2007-07-16 11:51:44.000000000 +0200 -+++ dom/public/base/nsPIDOMWindow.h 2007-07-16 11:53:05.000000000 +0200 -@@ -50,6 +50,8 @@ - #include "nsIURI.h" - #include "nsCOMPtr.h" - -+class nsIPrincipal; -+ - // Popup control state enum. The values in this enum must go from most - // permissive to least permissive so that it's safe to push state in - // all situations. Pushing popup state onto the stack never makes the -@@ -252,6 +254,8 @@ - return win->mIsHandlingResizeEvent; - } - -+ // DO NOT USE THIS FUNCTION. IT DOES NOTHING. USE -+ // SetOpenerScriptPrincipal INSTEAD. - virtual void SetOpenerScriptURL(nsIURI* aURI) = 0; - - virtual PopupControlState PushPopupControlState(PopupControlState aState, -@@ -313,7 +317,6 @@ - - // These members are only used on outer windows. - nsIDOMElement *mFrameElement; // weak -- nsCOMPtr<nsIURI> mOpenerScriptURL; // strong; used to determine whether to clear scope - - // These variables are only used on inner windows. - nsTimeout *mRunningTimeout; -@@ -329,6 +332,30 @@ - nsPIDOMWindow *mOuterWindow; - }; - -+#define NS_PIDOMWINDOW_MOZILLA_1_8_BRANCH2_IID \ -+{ 0xddd4affd, 0x6ad4, 0x44b4, \ -+ { 0xa8, 0xfc, 0x78, 0x1d, 0xbd, 0xf1, 0x87, 0x1d } } -+ -+class nsPIDOMWindow_MOZILLA_1_8_BRANCH2 : public nsPIDOMWindow -+{ -+public: -+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOW_MOZILLA_1_8_BRANCH2_IID) -+ -+ // Tell this window who opened it. This only has an effect if there is -+ // either no document currently in the window or if the document is the -+ // original document this window came with (an about:blank document either -+ // preloaded into it when it was created, or created by -+ // CreateAboutBlankContentViewer()). -+ virtual void SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal) = 0; -+ // Ask this window who opened it. -+ virtual nsIPrincipal* GetOpenerScriptPrincipal() = 0; -+ -+protected: -+ nsPIDOMWindow_MOZILLA_1_8_BRANCH2(nsPIDOMWindow *aOuterWindow) -+ : nsPIDOMWindow(aOuterWindow) -+ { -+ } -+}; - - #ifdef _IMPL_NS_LAYOUT - PopupControlState -Index: dom/src/base/nsGlobalWindow.cpp -=================================================================== ---- dom/src/base/nsGlobalWindow.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ dom/src/base/nsGlobalWindow.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -296,13 +296,28 @@ - static const char kCryptoContractID[] = NS_CRYPTO_CONTRACTID; - static const char kPkcs11ContractID[] = NS_PKCS11_CONTRACTID; - -+static PRBool -+IsAboutBlank(nsIURI* aURI) -+{ -+ NS_PRECONDITION(aURI, "Must have URI"); -+ -+ // GetSpec can be expensive for some URIs, so check the scheme first. -+ PRBool isAbout = PR_FALSE; -+ if (NS_FAILED(aURI->SchemeIs("about", &isAbout)) || !isAbout) { -+ return PR_FALSE; -+ } -+ -+ nsCAutoString str; -+ aURI->GetSpec(str); -+ return str.EqualsLiteral("about:blank"); -+} - - //***************************************************************************** - //*** nsGlobalWindow: Object Management - //***************************************************************************** - - nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow) -- : nsPIDOMWindow(aOuterWindow), -+ : nsPIDOMWindow_MOZILLA_1_8_BRANCH2(aOuterWindow), - mIsFrozen(PR_FALSE), - mFullScreen(PR_FALSE), - mIsClosed(PR_FALSE), -@@ -521,6 +536,7 @@ - NS_INTERFACE_MAP_ENTRY(nsIDOM3EventTarget) - NS_INTERFACE_MAP_ENTRY(nsIDOMNSEventTarget) - NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow) -+ NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow_MOZILLA_1_8_BRANCH2) - NS_INTERFACE_MAP_ENTRY(nsIDOMViewCSS) - NS_INTERFACE_MAP_ENTRY(nsIDOMAbstractView) - NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference) -@@ -581,70 +597,52 @@ - PRBool - nsGlobalWindow::WouldReuseInnerWindow(nsIDocument *aNewDocument) - { -- return WouldReuseInnerWindow(aNewDocument, PR_TRUE); --} -- --PRBool --nsGlobalWindow::WouldReuseInnerWindow(nsIDocument *aNewDocument, PRBool useDocURI) --{ - // We reuse the inner window when: -- // a. We are currently at about:blank -+ // a. We are currently at our original document. - // b. At least one of the following conditions are true: - // -- We are not currently a content window (i.e., we're currently a chrome - // window). - // -- The new document is the same as the old document. This means that we're - // getting called from document.open(). -- // -- The new URI has the same origin as the script opener uri for our current -- // window. -+ // -- The new document has the same origin as what we have loaded right now. - - nsCOMPtr<nsIDocument> curDoc(do_QueryInterface(mDocument)); -- if (!curDoc || !aNewDocument) { -+ nsCOMPtr<nsIDocument_MOZILLA_1_8_BRANCH2> curDoc_MOZILLA_1_8_BRANCH2 = -+ do_QueryInterface(mDocument); -+ if (!curDoc || !curDoc_MOZILLA_1_8_BRANCH2 || !aNewDocument) { - return PR_FALSE; - } - -- nsCOMPtr<nsIURI> newURI; -- if (useDocURI) { -- newURI = aNewDocument->GetDocumentURI(); -- } else { -- nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell)); -- -- if (webNav) { -- webNav->GetCurrentURI(getter_AddRefs(newURI)); -- } -- } -- -- nsIURI* curURI = curDoc->GetDocumentURI(); -- if (!curURI || !newURI) { -+ nsIPrincipal* newPrincipal = aNewDocument->GetPrincipal(); -+ if (!newPrincipal) { -+ // Play it safe - return PR_FALSE; - } -- -- PRBool isAbout; -- if (NS_FAILED(curURI->SchemeIs("about", &isAbout)) || !isAbout) { -- return PR_FALSE; -- } -- -- nsCAutoString uri; -- curURI->GetSpec(uri); -- if (!uri.EqualsLiteral("about:blank")) { -+ -+ if (!curDoc_MOZILLA_1_8_BRANCH2->IsInitialDocument()) { - return PR_FALSE; - } - -- // Great, we're an about:blank document, check for one of the other -- // conditions. -+ NS_ASSERTION(IsAboutBlank(curDoc->GetDocumentURI()), -+ "How'd this happen?"); -+ -+ // Great, we're the original document, check for one of the other - if (curDoc == aNewDocument) { - // aClearScopeHint is false. - return PR_TRUE; - } - -- if (mOpenerScriptURL) { -- if (sSecMan) { -- PRBool isSameOrigin = PR_FALSE; -- sSecMan->SecurityCompareURIs(mOpenerScriptURL, newURI, &isSameOrigin); -- if (isSameOrigin) { -- // The origin is the same. -- return PR_TRUE; -- } -- } -+ nsIPrincipal* curPrincipal = curDoc->GetPrincipal(); -+ if (!curPrincipal) { -+ // Play it safe -+ return PR_FALSE; -+ } -+ -+ if (nsContentUtils::GetSecurityManager() && -+ NS_SUCCEEDED(nsContentUtils::GetSecurityManager()-> -+ CheckSameOriginPrincipal(curPrincipal, newPrincipal))) { -+ // The origin is the same. -+ return PR_TRUE; - } - - nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(mDocShell)); -@@ -664,9 +662,49 @@ - void - nsGlobalWindow::SetOpenerScriptURL(nsIURI* aURI) - { -- FORWARD_TO_OUTER_VOID(SetOpenerScriptURL, (aURI)); -+} -+ -+void -+nsGlobalWindow::SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal) -+{ -+ FORWARD_TO_OUTER_VOID(SetOpenerScriptPrincipal, (aPrincipal)); -+ -+ nsCOMPtr<nsIDocument> curDoc(do_QueryInterface(mDocument)); -+ nsCOMPtr<nsIDocument_MOZILLA_1_8_BRANCH2> curDoc_MOZILLA_1_8_BRANCH2 = -+ do_QueryInterface(mDocument); -+ if (curDoc && curDoc_MOZILLA_1_8_BRANCH2) { -+ if (!curDoc_MOZILLA_1_8_BRANCH2->IsInitialDocument()) { -+ // We have a document already, and it's not the original one. Bail out. -+ // Do NOT set mOpenerScriptPrincipal in this case, just to be safe. -+ return; -+ } -+ -+#ifdef DEBUG -+ // We better have an about:blank document loaded at this point. Otherwise, -+ // something is really weird. -+ if (curDoc->GetPrincipal()) { -+ nsCOMPtr<nsIURI> uri; -+ curDoc->GetPrincipal()->GetURI(getter_AddRefs(uri)); -+ NS_ASSERTION(uri && IsAboutBlank(uri) && -+ IsAboutBlank(curDoc->GetDocumentURI()), -+ "Unexpected original document"); -+ } -+#endif -+ -+ // Set the opener principal on our document; given the above check, this -+ // is safe. -+ curDoc->SetPrincipal(aPrincipal); -+ } -+ -+ mOpenerScriptPrincipal = aPrincipal; -+} -+ -+nsIPrincipal* -+nsGlobalWindow::GetOpenerScriptPrincipal() -+{ -+ FORWARD_TO_OUTER(GetOpenerScriptPrincipal, (), nsnull); - -- mOpenerScriptURL = aURI; -+ return mOpenerScriptPrincipal; - } - - PopupControlState -@@ -944,7 +982,7 @@ - // check xpc here. - nsIXPConnect *xpc = nsContentUtils::XPConnect(); - -- PRBool reUseInnerWindow = WouldReuseInnerWindow(newDoc, PR_FALSE); -+ PRBool reUseInnerWindow = WouldReuseInnerWindow(newDoc); - - // XXX We used to share event listeners between inner windows in special - // circumstances (that were remarkably close to the conditions that we set -@@ -3530,6 +3568,7 @@ - if (mDocShell) { - // Don't look for a presshell if we're a root chrome window that's got - // about:blank loaded. We don't want to focus our widget in that case. -+ // XXXbz should we really be checking for IsInitialDocument() instead? - PRBool lookForPresShell = PR_TRUE; - PRInt32 itemType = nsIDocShellTreeItem::typeContent; - nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(mDocShell)); -@@ -3541,12 +3580,8 @@ - nsCOMPtr<nsIDocument> doc(do_QueryInterface(mDocument)); - NS_ASSERTION(doc, "Bogus doc?"); - nsIURI* ourURI = doc->GetDocumentURI(); -- PRBool isAbout; -- if (ourURI && NS_SUCCEEDED(ourURI->SchemeIs("about", &isAbout)) && -- isAbout) { -- nsCAutoString spec; -- ourURI->GetSpec(spec); -- lookForPresShell = !spec.EqualsLiteral("about:blank"); -+ if (ourURI) { -+ lookForPresShell = !IsAboutBlank(ourURI); - } - } - -@@ -5978,25 +6013,7 @@ - - // success! - -- if (domReturn) { -- CallQueryInterface(domReturn, aReturn); -- -- // Save the principal of the calling script -- // We need it to decide whether to clear the scope in SetNewDocument -- NS_ASSERTION(sSecMan, "No Security Manager Found!"); -- if (sSecMan) { -- nsCOMPtr<nsIPrincipal> principal; -- sSecMan->GetSubjectPrincipal(getter_AddRefs(principal)); -- if (principal) { -- nsCOMPtr<nsIURI> subjectURI; -- principal->GetURI(getter_AddRefs(subjectURI)); -- if (subjectURI) { -- nsCOMPtr<nsPIDOMWindow> domReturnPrivate(do_QueryInterface(domReturn)); -- domReturnPrivate->SetOpenerScriptURL(subjectURI); -- } -- } -- } -- } -+ domReturn.swap(*aReturn); - - return rv; - } -Index: dom/src/base/nsGlobalWindow.h -=================================================================== ---- dom/src/base/nsGlobalWindow.h 2007-07-16 11:51:44.000000000 +0200 -+++ dom/src/base/nsGlobalWindow.h 2007-07-16 11:53:05.000000000 +0200 -@@ -129,7 +129,7 @@ - // belonging to the same outer window, but that's an unimportant - // side effect of inheriting PRCList). - --class nsGlobalWindow : public nsPIDOMWindow, -+class nsGlobalWindow : public nsPIDOMWindow_MOZILLA_1_8_BRANCH2, - public nsIScriptGlobalObject, - public nsIDOMJSWindow, - public nsIScriptObjectPrincipal, -@@ -224,6 +224,10 @@ - - virtual NS_HIDDEN_(PRBool) WouldReuseInnerWindow(nsIDocument *aNewDocument); - -+ // nsPIDOMWindow_MOZILLA_1_8_BRANCH2 -+ virtual NS_HIDDEN_(void) SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal); -+ virtual NS_HIDDEN_(nsIPrincipal*) GetOpenerScriptPrincipal(); -+ - // nsIDOMViewCSS - NS_DECL_NSIDOMVIEWCSS - -@@ -294,8 +298,6 @@ - PRBool aClearScopeHint, - PRBool aIsInternalCall); - -- PRBool WouldReuseInnerWindow(nsIDocument *aNewDocument, PRBool useDocURI); -- - // Get the parent, returns null if this is a toplevel window - nsIDOMWindowInternal *GetParentInternal(); - -@@ -461,6 +463,8 @@ - nsCOMPtr<nsIDOMPkcs11> mPkcs11; - - nsCOMPtr<nsIXPConnectJSObjectHolder> mInnerWindowHolder; -+ nsCOMPtr<nsIPrincipal> mOpenerScriptPrincipal; // strong; used to determine -+ // whether to clear scope - - // These member variable are used only on inner windows. - nsCOMPtr<nsIEventListenerManager> mListenerManager; -Index: dom/src/jsurl/nsJSProtocolHandler.cpp -=================================================================== ---- dom/src/jsurl/nsJSProtocolHandler.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ dom/src/jsurl/nsJSProtocolHandler.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -222,10 +222,8 @@ - if (!principal) - return NS_ERROR_FAILURE; - -- //-- Don't run if the script principal is different from the -- // principal of the context, with two exceptions: we allow -- // the script to run if the script has the system principal -- // or the context is about:blank. -+ //-- Don't run if the script principal is different from the principal -+ // of the context, unless the script has the system principal. - nsCOMPtr<nsIPrincipal> objectPrincipal; - rv = securityManager->GetObjectPrincipal( - (JSContext*)scriptContext->GetNativeContext(), -Index: embedding/components/windowwatcher/src/Makefile.in -=================================================================== ---- embedding/components/windowwatcher/src/Makefile.in 2007-07-16 11:51:44.000000000 +0200 -+++ embedding/components/windowwatcher/src/Makefile.in 2007-07-16 11:53:05.000000000 +0200 -@@ -63,6 +63,7 @@ - embed_base \ - intl \ - layout \ -+ uriloader \ - $(NULL) - - CPPSRCS = nsPrompt.cpp \ -Index: embedding/components/windowwatcher/src/nsWindowWatcher.cpp -=================================================================== ---- embedding/components/windowwatcher/src/nsWindowWatcher.cpp 2007-07-16 11:51:44.000000000 +0200 -+++ embedding/components/windowwatcher/src/nsWindowWatcher.cpp 2007-07-16 11:53:05.000000000 +0200 -@@ -58,6 +58,7 @@ - #include "nsIDOMWindow.h" - #include "nsIDOMChromeWindow.h" - #include "nsIDOMWindowInternal.h" -+#include "nsIScriptObjectPrincipal.h" - #include "nsIScreen.h" - #include "nsIScreenManager.h" - #include "nsIScriptContext.h" -@@ -684,7 +685,7 @@ - if (!newDocShellItem) - return rv; - -- rv = ReadyOpenedDocShellItem(newDocShellItem, aParent, _retval); -+ rv = ReadyOpenedDocShellItem(newDocShellItem, aParent, windowIsNew, _retval); - if (NS_FAILED(rv)) - return rv; - -@@ -750,6 +751,43 @@ - } - } - -+ // Now we have to set the right opener principal on the new window. Note -+ // that we have to do this _before_ starting any URI loads, thanks to the -+ // sync nature of javascript: loads. Since this is the only place where we -+ // set said opener principal, we need to do it for all URIs, including -+ // chrome ones. So to deal with the mess that is bug 79775, just press on in -+ // a reasonable way even if GetSubjectPrincipal fails. In that case, just -+ // use a null subjectPrincipal. -+ nsCOMPtr<nsIPrincipal> subjectPrincipal; -+ if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)))) { -+ subjectPrincipal = nsnull; -+ } -+ -+ if (windowIsNew) { -+ // Now set the opener principal on the new window. Note that we need to do -+ // this no matter whether we were opened from JS; if there is nothing on -+ // the JS stack, just use the principal of our parent window. In those -+ // cases we do _not_ set the parent window principal as the owner of the -+ // load--since we really don't know who the owner is, just leave it null. -+ nsIPrincipal* newWindowPrincipal = subjectPrincipal; -+ if (!newWindowPrincipal && aParent) { -+ nsCOMPtr<nsIScriptObjectPrincipal> sop(do_QueryInterface(aParent)); -+ if (sop) { -+ newWindowPrincipal = sop->GetPrincipal(); -+ } -+ } -+ -+ nsCOMPtr<nsPIDOMWindow_MOZILLA_1_8_BRANCH2> newWindow = -+ do_QueryInterface(*_retval); -+#ifdef DEBUG -+ nsCOMPtr<nsPIDOMWindow> newDebugWindow = do_GetInterface(newDocShell); -+ NS_ASSERTION(newWindow == newDebugWindow, "Different windows??"); -+#endif -+ if (newWindow) { -+ newWindow->SetOpenerScriptPrincipal(newWindowPrincipal); -+ } -+ } -+ - if (uriToLoad) { // get the script principal and pass it to docshell - JSContextAutoPopper contextGuard; - -@@ -769,15 +807,8 @@ - newDocShell->CreateLoadInfo(getter_AddRefs(loadInfo)); - NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE); - -- if (!uriToLoadIsChrome) { -- nsCOMPtr<nsIPrincipal> principal; -- if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(principal)))) -- return NS_ERROR_FAILURE; -- -- if (principal) { -- nsCOMPtr<nsISupports> owner(do_QueryInterface(principal)); -- loadInfo->SetOwner(owner); -- } -+ if (subjectPrincipal) { -+ loadInfo->SetOwner(subjectPrincipal); - } - - // Set the new window's referrer from the calling context's document: -@@ -1523,6 +1554,7 @@ - nsresult - nsWindowWatcher::ReadyOpenedDocShellItem(nsIDocShellTreeItem *aOpenedItem, - nsIDOMWindow *aParent, -+ PRBool aWindowIsNew, - nsIDOMWindow **aOpenedWindow) - { - nsresult rv = NS_ERROR_FAILURE; -@@ -1533,6 +1565,15 @@ - if (aParent) { - nsCOMPtr<nsIDOMWindowInternal> internalParent(do_QueryInterface(aParent)); - globalObject->SetOpenerWindow(internalParent); // damnit -+ -+ if (aWindowIsNew) { -+ nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(globalObject); -+ nsCOMPtr<nsIDocument_MOZILLA_1_8_BRANCH2> doc = -+ do_QueryInterface(win->GetExtantDocument()); -+ if (doc) { -+ doc->SetIsInitialDocument(PR_TRUE); -+ } -+ } - } - rv = CallQueryInterface(globalObject, aOpenedWindow); - } -Index: embedding/components/windowwatcher/src/nsWindowWatcher.h -=================================================================== ---- embedding/components/windowwatcher/src/nsWindowWatcher.h 2007-07-16 11:51:44.000000000 +0200 -+++ embedding/components/windowwatcher/src/nsWindowWatcher.h 2007-07-16 11:53:05.000000000 +0200 -@@ -100,6 +100,7 @@ - PRInt32 aDefault, PRBool *aPresenceFlag); - static nsresult ReadyOpenedDocShellItem(nsIDocShellTreeItem *aOpenedItem, - nsIDOMWindow *aParent, -+ PRBool aWindowIsNew, - nsIDOMWindow **aOpenedWindow); - static void SizeOpenedDocShellItem(nsIDocShellTreeItem *aDocShellItem, - nsIDOMWindow *aParent, - js/src/jsfun.c | 13 +++++++++---- - js/src/jsobj.c | 3 ++- - js/src/jsobj.h | 4 ++++ - 3 files changed, 15 insertions(+), 5 deletions(-) - -Index: js/src/jsfun.c -=================================================================== ---- js/src/jsfun.c 2007-07-16 10:49:46.000000000 +0000 -+++ js/src/jsfun.c 2007-07-16 10:53:05.000000000 +0000 -@@ -1051,28 +1051,33 @@ - static JSBool - fun_resolve(JSContext *cx, JSObject *obj, jsval id, uintN flags, - JSObject **objp) - { - JSFunction *fun; - JSString *str; - JSAtom *prototypeAtom; - -+ /* -+ * No need to reflect fun.prototype in 'fun.prototype = ...' or in an -+ * unqualified reference to prototype, which the emitter looks up as a -+ * hidden atom when attempting to bind to a formal parameter or local -+ * variable slot. -+ */ -+ if (flags & (JSRESOLVE_ASSIGNING | JSRESOLVE_HIDDEN)) -+ return JS_TRUE; -+ - if (!JSVAL_IS_STRING(id)) - return JS_TRUE; - - /* No valid function object should lack private data, but check anyway. */ - fun = (JSFunction *)JS_GetInstancePrivate(cx, obj, &js_FunctionClass, NULL); - if (!fun || !fun->object) - return JS_TRUE; - -- /* No need to reflect fun.prototype in 'fun.prototype = ...'. */ -- if (flags & JSRESOLVE_ASSIGNING) -- return JS_TRUE; -- - /* - * Ok, check whether id is 'prototype' and bootstrap the function object's - * prototype property. - */ - str = JSVAL_TO_STRING(id); - prototypeAtom = cx->runtime->atomState.classPrototypeAtom; - if (str == ATOM_TO_STRING(prototypeAtom)) { - JSObject *proto, *parentProto; -Index: js/src/jsobj.c -=================================================================== ---- js/src/jsobj.c 2007-07-16 10:52:44.000000000 +0000 -+++ js/src/jsobj.c 2007-07-16 10:53:05.000000000 +0000 -@@ -2568,17 +2568,18 @@ - flags, shortid); - } - - JSBool - js_LookupHiddenProperty(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, - JSProperty **propp) - { - return HidePropertyName(cx, &id) && -- js_LookupProperty(cx, obj, id, objp, propp); -+ js_LookupPropertyWithFlags(cx, obj, id, JSRESOLVE_HIDDEN, -+ objp, propp); - } - - JSScopeProperty * - js_AddNativeProperty(JSContext *cx, JSObject *obj, jsid id, - JSPropertyOp getter, JSPropertyOp setter, uint32 slot, - uintN attrs, uintN flags, intN shortid) - { - JSScope *scope; -Index: js/src/jsobj.h -=================================================================== ---- js/src/jsobj.h 2007-07-16 10:49:47.000000000 +0000 -+++ js/src/jsobj.h 2007-07-16 10:53:05.000000000 +0000 -@@ -405,21 +405,25 @@ - * must later call OBJ_DROP_PROPERTY(cx, *objp, *propp). - */ - extern JS_FRIEND_API(JSBool) - js_LookupProperty(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, - JSProperty **propp); - - /* - * Specialized subroutine that allows caller to preset JSRESOLVE_* flags. -+ * JSRESOLVE_HIDDEN flags hidden function param/local name lookups, just for -+ * internal use by fun_resolve and similar built-ins. - */ - extern JSBool - js_LookupPropertyWithFlags(JSContext *cx, JSObject *obj, jsid id, uintN flags, - JSObject **objp, JSProperty **propp); - -+#define JSRESOLVE_HIDDEN 0x8000 -+ - extern JS_FRIEND_API(JSBool) - js_FindProperty(JSContext *cx, jsid id, JSObject **objp, JSObject **pobjp, - JSProperty **propp); - - extern JSObject * - js_FindIdentifierBase(JSContext *cx, jsid id); - - extern JSObject * ---- - toolkit/mozapps/plugins/content/pluginInstallerDatasource.js | 30 ++++++----- - toolkit/mozapps/plugins/content/pluginInstallerService.js | 7 +- - toolkit/mozapps/plugins/content/pluginInstallerWizard.js | 7 ++ - 3 files changed, 28 insertions(+), 16 deletions(-) - -Index: toolkit/mozapps/plugins/content/pluginInstallerDatasource.js -=================================================================== ---- toolkit/mozapps/plugins/content/pluginInstallerDatasource.js 2007-07-16 11:06:06.000000000 +0200 -+++ toolkit/mozapps/plugins/content/pluginInstallerDatasource.js 2007-07-16 11:06:26.000000000 +0200 -@@ -104,37 +104,41 @@ - target = null; - children = container.GetElements(); - - var child = children.getNext(); - if (child instanceof Components.interfaces.nsIRDFResource){ - target = child; - } - -- function getPFSValueFromRDF(aValue, aDatasource, aRDFService){ -+ var rdfs = this._rdfService; -+ -+ function getPFSValueFromRDF(aValue){ - var rv = null; - -- var myTarget = aDatasource.GetTarget(target, aRDFService.GetResource(PFS_NS + aValue), true); -+ var myTarget = aDatasource.GetTarget(target, rdfs.GetResource(PFS_NS + aValue), true); - if (myTarget) - rv = myTarget.QueryInterface(Components.interfaces.nsIRDFLiteral).Value; - - return rv; - } - -- pluginInfo = new Object(); -- pluginInfo.name = getPFSValueFromRDF("name", aDatasource, this._rdfService); -- pluginInfo.pid = getPFSValueFromRDF("guid", aDatasource, this._rdfService); -- pluginInfo.version = getPFSValueFromRDF("version", aDatasource, this._rdfService); -- pluginInfo.IconUrl = getPFSValueFromRDF("IconUrl", aDatasource, this._rdfService); -- pluginInfo.XPILocation = getPFSValueFromRDF("XPILocation", aDatasource, this._rdfService); -- pluginInfo.InstallerShowsUI = getPFSValueFromRDF("InstallerShowsUI", aDatasource, this._rdfService); -- pluginInfo.manualInstallationURL = getPFSValueFromRDF("manualInstallationURL", aDatasource, this._rdfService); -- pluginInfo.requestedMimetype = getPFSValueFromRDF("requestedMimetype", aDatasource, this._rdfService); -- pluginInfo.licenseURL = getPFSValueFromRDF("licenseURL", aDatasource, this._rdfService); -- pluginInfo.needsRestart = getPFSValueFromRDF("needsRestart", aDatasource, this._rdfService); -+ pluginInfo = { -+ name: getPFSValueFromRDF("name"), -+ pid: getPFSValueFromRDF("guid"), -+ version: getPFSValueFromRDF("version"), -+ IconUrl: getPFSValueFromRDF("IconUrl"), -+ XPILocation: getPFSValueFromRDF("XPILocation"), -+ XPIHash: getPFSValueFromRDF("XPIHash"), -+ InstallerShowsUI: getPFSValueFromRDF("InstallerShowsUI"), -+ manualInstallationURL: getPFSValueFromRDF("manualInstallationURL"), -+ requestedMimetype: getPFSValueFromRDF("requestedMimetype"), -+ licenseURL: getPFSValueFromRDF("licenseURL"), -+ needsRestart: getPFSValueFromRDF("needsRestart") -+ }; - } - catch (ex){} - } - catch (ex){} - - gPluginInstaller.pluginInfoReceived(pluginInfo); - }, - -Index: toolkit/mozapps/plugins/content/pluginInstallerService.js -=================================================================== ---- toolkit/mozapps/plugins/content/pluginInstallerService.js 2007-07-16 11:06:06.000000000 +0200 -+++ toolkit/mozapps/plugins/content/pluginInstallerService.js 2007-07-16 11:06:26.000000000 +0200 -@@ -38,22 +38,25 @@ - var PluginInstallService = { - - init: function () - { - }, - - pluginPidArray: null, - -- startPluginInsallation: function (aPluginXPIUrlsArray, aPluginPidArray) { -+ startPluginInsallation: function (aPluginXPIUrlsArray, -+ aPluginHashes, -+ aPluginPidArray) { - this.pluginPidArray = aPluginPidArray; - - var xpiManager = Components.classes["@mozilla.org/xpinstall/install-manager;1"] - .createInstance(Components.interfaces.nsIXPInstallManager); -- xpiManager.initManagerFromChrome(aPluginXPIUrlsArray, aPluginXPIUrlsArray.length, this); -+ xpiManager.initManagerWithHashes(aPluginXPIUrlsArray, aPluginHashes, -+ aPluginXPIUrlsArray.length, this); - }, - - // XPI progress listener stuff - onStateChange: function (aIndex, aState, aValue) - { - // get the pid to return to the wizard - var pid = this.pluginPidArray[aIndex]; - var errorMsg; -Index: toolkit/mozapps/plugins/content/pluginInstallerWizard.js -=================================================================== ---- toolkit/mozapps/plugins/content/pluginInstallerWizard.js 2007-07-16 11:06:06.000000000 +0200 -+++ toolkit/mozapps/plugins/content/pluginInstallerWizard.js 2007-07-16 11:06:26.000000000 +0200 -@@ -319,31 +319,35 @@ - this.canAdvance(false); - this.canRewind(false); - - // since the user can choose what plugins to install, we need to store - // which ones were choosen, as nsIXPInstallManager returns an index and not the - // mimetype. So store the pids. - - var pluginURLArray = new Array(); -+ var pluginHashArray = new Array(); - var pluginPidArray = new Array(); - - for (pluginInfoItem in this.mPluginInfoArray){ - var pluginItem = this.mPluginInfoArray[pluginInfoItem]; - - // only push to the array if it has an XPILocation, else nsIXPInstallManager - // will complain. - if (pluginItem.toBeInstalled && pluginItem.XPILocation && pluginItem.licenseAccepted) { - pluginURLArray.push(pluginItem.XPILocation); -+ pluginHashArray.push(pluginItem.XPIHash); - pluginPidArray.push(pluginItem.pid); - } - } - - if (pluginURLArray.length > 0) -- PluginInstallService.startPluginInsallation(pluginURLArray, pluginPidArray); -+ PluginInstallService.startPluginInsallation(pluginURLArray, -+ pluginHashArray, -+ pluginPidArray); - else - this.advancePage(null, true, false, false); - } - - /* - 0 starting download - 1 download finished - 2 starting installation -@@ -594,16 +598,17 @@ - } - - function PluginInfo(aResult) { - this.name = aResult.name; - this.pid = aResult.pid; - this.version = aResult.version; - this.IconUrl = aResult.IconUrl; - this.XPILocation = aResult.XPILocation; -+ this.XPIHash = aResult.XPIHash; - this.InstallerShowsUI = aResult.InstallerShowsUI; - this.manualInstallationURL = aResult.manualInstallationURL; - this.requestedMimetype = aResult.requestedMimetype; - this.licenseURL = aResult.licenseURL; - this.needsRestart = (aResult.needsRestart == "true"); - - this.error = null; - this.toBeInstalled = true; diff --git a/www/firefox15/files/patch-security-coreconf-FreeBSD.mk b/www/firefox15/files/patch-security-coreconf-FreeBSD.mk deleted file mode 100644 index 0ede2ae5d1da..000000000000 --- a/www/firefox15/files/patch-security-coreconf-FreeBSD.mk +++ /dev/null @@ -1,28 +0,0 @@ ---- security/coreconf/FreeBSD.mk.orig Fri Jan 20 18:36:11 2006 -+++ security/coreconf/FreeBSD.mk -@@ -45,8 +45,12 @@ - ifeq ($(OS_TEST),alpha) - CPU_ARCH = alpha - else -+ifeq ($(OS_TEST),amd64) -+CPU_ARCH = amd64 -+else - CPU_ARCH = x86 - endif -+endif - - OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK - -@@ -73,7 +77,11 @@ - DLL_SUFFIX = so.1.0 - endif - --MKSHLIB = $(CC) $(DSO_LDOPTS) -+ifneq (,$(filter alpha ia64,$(OS_TEST))) -+MKSHLIB = $(CC) -Wl,-Bsymbolic -lc $(DSO_LDOPTS) -o $@ -+else -+MKSHLIB = $(CC) -Wl,-Bsymbolic $(DSO_LDOPTS) -o $@ -+endif - ifdef MAPFILE - MKSHLIB += -Wl,--version-script,$(MAPFILE) - endif diff --git a/www/firefox15/files/patch-sysnss b/www/firefox15/files/patch-sysnss deleted file mode 100644 index f39b53d5891e..000000000000 --- a/www/firefox15/files/patch-sysnss +++ /dev/null @@ -1,273 +0,0 @@ ---- Makefile.in.orig Tue Dec 19 14:07:36 2006 -+++ Makefile.in -@@ -110,8 +110,6 @@ - # - # tier 1 - 3rd party individual libraries - # --tier_1_dirs += dbm -- - ifndef MOZ_NATIVE_JPEG - tier_1_dirs += jpeg - endif ---- security/manager/ssl/src/Makefile.in.orig Tue Aug 2 22:24:18 2005 -+++ security/manager/ssl/src/Makefile.in -@@ -123,7 +123,7 @@ - - # Use local includes because they are inserted before INCLUDES - # so that Mozilla's nss.h is used, not glibc's --LOCAL_INCLUDES += -I$(DIST)/public/nss \ -+LOCAL_INCLUDES += -I$(LOCALBASE)/include/nss/nss \ - $(NULL) - - EXTRA_DSO_LDOPTS += \ ---- config/config.mk.orig Thu Apr 6 09:28:13 2006 -+++ config/config.mk -@@ -144,7 +144,6 @@ - - NSS_LIBS = \ - $(LIBS_DIR) \ -- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \ - -lsmime3 \ - -lssl3 \ - -lnss3 \ -@@ -163,13 +162,7 @@ - endif - endif - --NSS_DEP_LIBS = \ -- $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \ -- $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \ -- $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \ -- $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \ -- $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \ -- $(NULL) -+NSS_DEP_LIBS = - - MOZ_UNICHARUTIL_LIBS = $(DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX) - MOZ_REGISTRY_LIBS = $(DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) ---- security/manager/ssl/src/nsNSSComponent.cpp.orig Thu Aug 25 23:41:50 2005 -+++ security/manager/ssl/src/nsNSSComponent.cpp -@@ -119,6 +119,10 @@ - #include "p12plcy.h" - } - -+#include <sys/types.h> -+#include <sys/stat.h> -+#include <errno.h> -+ - #ifdef PR_LOGGING - PRLogModuleInfo* gPIPNSSLog = nsnull; - #endif -@@ -689,6 +693,7 @@ - - const char *possible_ckbi_locations[] = { - NS_GRE_DIR, -+ NS_UNIX_LIB_DIR, - NS_XPCOM_CURRENT_PROCESS_DIR - }; - -@@ -702,7 +707,7 @@ - continue; - } - -- char *fullModuleName = nsnull; -+ char *fullModuleName; - #ifdef XP_MAC - nsCAutoString nativePath; - mozFile->AppendNative(NS_LITERAL_CSTRING("Essential Files")); -@@ -714,6 +719,14 @@ - mozFile->GetNativePath(processDir); - fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi"); - #endif -+ if (fullModuleName == nsnull) -+ continue; -+ struct stat sb; -+ if (stat(fullModuleName, &sb)) { -+ if (errno != ENOENT) -+ perror(fullModuleName); -+ continue; -+ } - /* If a module exists with the same name, delete it. */ - NS_ConvertUCS2toUTF8 modNameUTF8(modName); - int modType; ---- security/manager/Makefile.in.orig Tue Dec 19 14:07:37 2006 -+++ security/manager/Makefile.in -@@ -52,21 +52,12 @@ - SSL3_LIB \ - SOFTOKEN3_LIB \ - SOFTOKEN3_CHK \ -- LOADABLE_ROOT_MODULE \ - HAVE_FREEBL_LIBS \ - HAVE_FREEBL_LIBS_32 \ - HAVE_FREEBL_LIBS_32INT64 \ - HAVE_FREEBL_LIBS_64 \ - $(NULL) - --LOADABLE_ROOT_MODULE = $(DLL_PREFIX)nssckbi$(DLL_SUFFIX) -- --NSS3_LIB = $(DLL_PREFIX)nss3$(DLL_SUFFIX) --SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX) --SSL3_LIB = $(DLL_PREFIX)ssl3$(DLL_SUFFIX) --SOFTOKEN3_LIB = $(DLL_PREFIX)softokn3$(DLL_SUFFIX) --SOFTOKEN3_CHK = $(DLL_PREFIX)softokn3.chk -- - # Default - HAVE_FREEBL_LIBS = 1 - -@@ -190,11 +181,6 @@ - - .nss.cleaned: .nss.checkout - $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean -- $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean --ifndef SKIP_CHK -- $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean -- $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean --endif - touch $@ - - .nss.checkout: -@@ -212,89 +198,6 @@ - $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) - ifeq ($(OS_ARCH),WINNT) - cd $(DIST)/lib; cp -f $(LIB_PREFIX)dbm$(MOZ_BITS).$(LIB_SUFFIX) $(LIB_PREFIX)dbm.$(LIB_SUFFIX) --else -- cd $(DIST)/lib; cp -f $(LIB_PREFIX)mozdbm_s.$(LIB_SUFFIX) $(LIB_PREFIX)dbm.$(LIB_SUFFIX); $(RANLIB) $(LIB_PREFIX)dbm.$(LIB_SUFFIX) --endif -- $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) --ifndef SKIP_CHK -- $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) -- $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) --endif --ifndef DISABLE_DIST_GRE -- $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(GRE_DIST) --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(GRE_DIST) --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(GRE_DIST) -- $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(GRE_DIST) -- $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(GRE_DIST) -- $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(GRE_DIST) --ifdef HAVE_FREEBL_LIBS --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(GRE_DIST) --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(GRE_DIST) --endif --ifdef HAVE_FREEBL_LIBS_32 --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(GRE_DIST) -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(GRE_DIST) --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(GRE_DIST) -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(GRE_DIST) --endif --ifdef HAVE_FREEBL_LIBS_32INT64 --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(GRE_DIST) --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(GRE_DIST) --endif --ifdef HAVE_FREEBL_LIBS_64 --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(GRE_DIST) -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(GRE_DIST) --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(GRE_DIST) -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(GRE_DIST) --endif --endif --ifndef _SKIP_OLD_GRE_INSTALL -- $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DIST)/bin --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin -- $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin -- $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin -- $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin --ifdef HAVE_FREEBL_LIBS --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DIST)/bin --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin --endif --ifdef HAVE_FREEBL_LIBS_32 --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DIST)/bin -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DIST)/bin --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DIST)/bin -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DIST)/bin --endif --ifdef HAVE_FREEBL_LIBS_32INT64 --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(DIST)/bin --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(DIST)/bin --endif --ifdef HAVE_FREEBL_LIBS_64 --ifndef SKIP_CHK -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(DIST)/bin -- $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(DIST)/bin --endif -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(DIST)/bin -- $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(DIST)/bin --endif - endif - $(MAKE) -C boot $@ - $(MAKE) -C ssl $@ -@@ -304,42 +207,6 @@ - endif - - install:: -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DESTDIR)$(mozappdir) --ifndef SKIP_CHK -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DESTDIR)$(mozappdir) --endif -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DESTDIR)$(mozappdir) --ifdef HAVE_FREEBL_LIBS --ifndef SKIP_CHK -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DESTDIR)$(mozappdir) --endif -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DESTDIR)$(mozappdir) --endif --ifdef HAVE_FREEBL_LIBS_32 --ifndef SKIP_CHK -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DESTDIR)$(mozappdir) --endif -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DESTDIR)$(mozappdir) --endif --ifdef HAVE_FREEBL_LIBS_32INT64 --ifndef SKIP_CHK -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT64_CHK) $(DESTDIR)$(mozappdir) --endif -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT64_LIB) $(DESTDIR)$(mozappdir) --endif --ifdef HAVE_FREEBL_LIBS_64 --ifndef SKIP_CHK -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_64INT_CHK) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_64FPU_CHK) $(DESTDIR)$(mozappdir) --endif -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_64INT_LIB) $(DESTDIR)$(mozappdir) -- $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_64FPU_LIB) $(DESTDIR)$(mozappdir) --endif - $(MAKE) -C boot $@ - $(MAKE) -C ssl $@ - $(MAKE) -C locales $@ -@@ -355,11 +222,6 @@ - $(MAKE) -C pki $@ - endif - $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean -- $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean --ifndef SKIP_CHK -- $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean -- $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean --endif - - echo-requires-recursive:: - $(MAKE) -C boot $@ diff --git a/www/firefox15/files/patch-toolkit_xre_nsXREDirProvider.cpp b/www/firefox15/files/patch-toolkit_xre_nsXREDirProvider.cpp deleted file mode 100644 index f9436ec317ac..000000000000 --- a/www/firefox15/files/patch-toolkit_xre_nsXREDirProvider.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- toolkit/xre/nsXREDirProvider.cpp.orig Sat Jan 27 15:13:33 2007 -+++ toolkit/xre/nsXREDirProvider.cpp -@@ -836,6 +836,7 @@ - - char* appNameFolder = nsnull; - char profileFolderName[MAXPATHLEN] = "."; -+ char temp[MAXPATHLEN]; - - // Offset 1 for the outermost folder to make it hidden (i.e. using the ".") - char* writing = profileFolderName + 1; -@@ -845,7 +846,6 @@ - rv = localDir->AppendNative(nsDependentCString(profileFolderName)); - NS_ENSURE_SUCCESS(rv, rv); - -- char temp[MAXPATHLEN]; - GetProfileFolderName(temp, gAppData->name); - appNameFolder = temp; - } diff --git a/www/firefox15/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp b/www/firefox15/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp deleted file mode 100644 index 7f8e55f536df..000000000000 --- a/www/firefox15/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp +++ /dev/null @@ -1,29 +0,0 @@ ---- uriloader/exthandler/unix/nsGNOMERegistry.cpp.orig Fri Dec 24 04:30:00 2004 -+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp Fri Dec 24 04:34:05 2004 -@@ -143,7 +143,7 @@ - PR_END_MACRO - - // Attempt to open libgconf -- gconfLib = LoadVersionedLibrary("gconf-2", ".4"); -+ gconfLib = PR_LoadLibrary("libgconf-2.so"); - ENSURE_LIB(gconfLib); - - GET_LIB_FUNCTION(gconf, gconf_client_get_default); -@@ -151,7 +151,7 @@ - GET_LIB_FUNCTION(gconf, gconf_client_get_bool); - - // Attempt to open libgnome -- gnomeLib = LoadVersionedLibrary("gnome-2", ".0"); -+ gnomeLib = PR_LoadLibrary("libgnome-2.so"); - ENSURE_LIB(gnomeLib); - - GET_LIB_FUNCTION(gnome, gnome_url_show); -@@ -160,7 +160,7 @@ - GET_LIB_FUNCTION(gnome, gnome_program_get); - - // Attempt to open libgnomevfs -- vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0"); -+ vfsLib = PR_LoadLibrary("libgnomevfs-2.so"); - ENSURE_LIB(vfsLib); - - GET_LIB_FUNCTION(vfs, gnome_vfs_mime_type_from_name); diff --git a/www/firefox15/files/patch-xpcom-reflect-xptcall-public-xptcstubsdecl.inc b/www/firefox15/files/patch-xpcom-reflect-xptcall-public-xptcstubsdecl.inc deleted file mode 100644 index 9a41bbfc4602..000000000000 --- a/www/firefox15/files/patch-xpcom-reflect-xptcall-public-xptcstubsdecl.inc +++ /dev/null @@ -1,11 +0,0 @@ ---- xpcom/reflect/xptcall/public/xptcstubsdecl.inc.orig Tue Mar 16 03:07:25 2004 -+++ xpcom/reflect/xptcall/public/xptcstubsdecl.inc Tue Jun 15 12:52:36 2004 -@@ -8,7 +8,7 @@ - * 1 is AddRef - * 2 is Release - */ --#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__)) -+#if !defined(__ia64) - NS_IMETHOD Stub3(); - NS_IMETHOD Stub4(); - NS_IMETHOD Stub5(); diff --git a/www/firefox15/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/www/firefox15/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in deleted file mode 100644 index deffe766bed3..000000000000 --- a/www/firefox15/files/patch-xpcom-reflect-xptcall-src-md-unix-Makefile.in +++ /dev/null @@ -1,54 +0,0 @@ ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig Tue Nov 14 13:10:24 2006 -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in -@@ -66,6 +66,9 @@ - ifeq (86,$(findstring 86,$(OS_TEST))) - CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp - endif -+ifeq (amd64,$(OS_TEST)) -+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp -+endif - endif - # - # New code for Linux, et. al., with gcc -@@ -82,7 +85,7 @@ - endif - endif - # IA64 Linux --ifneq (,$(filter Linux,$(OS_ARCH))) -+ifneq (,$(filter Linux FreeBSD,$(OS_ARCH))) - ifneq (,$(findstring ia64,$(OS_TEST))) - CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp - ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s -@@ -129,9 +132,15 @@ - ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s - endif - # -+# FreeBSD/Alpha -+# -+ifeq ($(OS_ARCH)$(OS_TEST),FreeBSDalpha) -+CPPSRCS := xptcinvoke_freebsd_alpha.cpp xptcstubs_freebsd_alpha.cpp -+endif -+# - # Linux/Alpha - # --ifneq (,$(filter Linuxalpha FreeBSDalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) -+ifneq (,$(filter Linuxalpha NetBSDalpha,$(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_linux_alpha.cpp xptcstubs_linux_alpha.cpp - endif - # -@@ -322,6 +331,15 @@ - ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc) - CPPSRCS := xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp - ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s -+endif -+# -+# FreeBSD/SPARC64 -+# -+ifeq ($(OS_ARCH),FreeBSD) -+ifneq (,$(findstring sparc,$(OS_TEST))) -+CPPSRCS := xptcinvoke_sparc64_freebsd.cpp xptcstubs_sparc64_freebsd.cpp -+ASFILES := xptcinvoke_asm_sparc64_freebsd.s xptcstubs_asm_sparcv9_solaris.s -+endif - endif - # - # Solaris/SPARC diff --git a/www/firefox15/files/patch-xptcall-alpha b/www/firefox15/files/patch-xptcall-alpha deleted file mode 100644 index 29631a98e61e..000000000000 --- a/www/firefox15/files/patch-xptcall-alpha +++ /dev/null @@ -1,459 +0,0 @@ ---- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp.orig Tue May 27 01:37:25 2003 -+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_freebsd_alpha.cpp Tue May 27 01:37:00 2003 -@@ -0,0 +1,184 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Netscape Public License -+ * Version 1.1 (the "License"); you may not use this file except in -+ * compliance with the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/NPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the NPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the NPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+/* Platform specific code to invoke XPCOM methods on native objects */ -+ -+/* contributed by Glen Nakamura <glen.nakamura@usa.net> */ -+ -+#include "xptcprivate.h" -+ -+/* Prototype specifies unmangled function name and disables unused warning */ -+static void -+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) -+__asm__("invoke_copy_to_stack") __attribute__((unused)); -+ -+static void -+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) -+{ -+ const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer -+ -+ for(PRUint32 i = 0; i < paramCount; i++, d++, s++) -+ { -+ if(s->IsPtrData()) -+ { -+ *d = (PRUint64)s->ptr; -+ continue; -+ } -+ switch(s->type) -+ { -+ case nsXPTType::T_I8 : *d = (PRUint64)s->val.i8; break; -+ case nsXPTType::T_I16 : *d = (PRUint64)s->val.i16; break; -+ case nsXPTType::T_I32 : *d = (PRUint64)s->val.i32; break; -+ case nsXPTType::T_I64 : *d = (PRUint64)s->val.i64; break; -+ case nsXPTType::T_U8 : *d = (PRUint64)s->val.u8; break; -+ case nsXPTType::T_U16 : *d = (PRUint64)s->val.u16; break; -+ case nsXPTType::T_U32 : *d = (PRUint64)s->val.u32; break; -+ case nsXPTType::T_U64 : *d = (PRUint64)s->val.u64; break; -+ case nsXPTType::T_FLOAT : -+ if(i < NUM_ARG_REGS) -+ { -+ // convert floats to doubles if they are to be passed -+ // via registers so we can just deal with doubles later -+ union { PRUint64 u64; double d; } t; -+ t.d = (double)s->val.f; -+ *d = t.u64; -+ } -+ else -+ // otherwise copy to stack normally -+ *d = (PRUint64)s->val.u32; -+ break; -+ case nsXPTType::T_DOUBLE : *d = (PRUint64)s->val.u64; break; -+ case nsXPTType::T_BOOL : *d = (PRUint64)s->val.b; break; -+ case nsXPTType::T_CHAR : *d = (PRUint64)s->val.c; break; -+ case nsXPTType::T_WCHAR : *d = (PRUint64)s->val.wc; break; -+ default: -+ // all the others are plain pointer types -+ *d = (PRUint64)s->val.p; -+ break; -+ } -+ } -+} -+ -+/* -+ * XPTC_PUBLIC_API(nsresult) -+ * XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, -+ * PRUint32 paramCount, nsXPTCVariant* params, void* vt) -+ */ -+__asm__( -+ "#### XPTC_InvokeByIndex ####\n" -+".text\n\t" -+ ".align 5\n\t" -+ ".globl XPTC_InvokeByIndex\n\t" -+ ".ent XPTC_InvokeByIndex\n" -+"XPTC_InvokeByIndex:\n\t" -+ ".frame $15,32,$26,0\n\t" -+ ".mask 0x4008000,-32\n\t" -+ "ldgp $29,0($27)\n" -+"$XPTC_InvokeByIndex..ng:\n\t" -+ "subq $30,32,$30\n\t" -+ "stq $26,0($30)\n\t" -+ "stq $15,8($30)\n\t" -+ "bis $30,$30,$15\n\t" -+ ".prologue 1\n\t" -+ -+ /* -+ * Allocate enough stack space to hold the greater of 6 or "paramCount"+1 -+ * parameters. (+1 for "this" pointer) Room for at least 6 parameters -+ * is required for storage of those passed via registers. -+ */ -+ -+ "bis $31,5,$2\n\t" /* count = MAX(5, "paramCount") */ -+ "cmplt $2,$18,$1\n\t" -+ "cmovne $1,$18,$2\n\t" -+ "s8addq $2,16,$1\n\t" /* room for count+1 params (8 bytes each) */ -+ "bic $1,15,$1\n\t" /* stack space is rounded up to 0 % 16 */ -+ "subq $30,$1,$30\n\t" -+ -+ "stq $16,0($30)\n\t" /* save "that" (as "this" pointer) */ -+ "stq $17,16($15)\n\t" /* save "methodIndex" */ -+ -+ "addq $30,8,$16\n\t" /* pass stack pointer */ -+ "bis $18,$18,$17\n\t" /* pass "paramCount" */ -+ "bis $19,$19,$18\n\t" /* pass "params" */ -+ "bsr $26,$invoke_copy_to_stack..ng\n\t" /* call invoke_copy_to_stack */ -+ -+ /* -+ * Copy the first 6 parameters to registers and remove from stack frame. -+ * Both the integer and floating point registers are set for each parameter -+ * except the first which is the "this" pointer. (integer only) -+ * The floating point registers are all set as doubles since the -+ * invoke_copy_to_stack function should have converted the floats. -+ */ -+ "ldq $16,0($30)\n\t" /* integer registers */ -+ "ldq $17,8($30)\n\t" -+ "ldq $18,16($30)\n\t" -+ "ldq $19,24($30)\n\t" -+ "ldq $20,32($30)\n\t" -+ "ldq $21,40($30)\n\t" -+ "ldt $f17,8($30)\n\t" /* floating point registers */ -+ "ldt $f18,16($30)\n\t" -+ "ldt $f19,24($30)\n\t" -+ "ldt $f20,32($30)\n\t" -+ "ldt $f21,40($30)\n\t" -+ -+ "addq $30,48,$30\n\t" /* remove params from stack */ -+ -+ /* -+ * Call the virtual function with the constructed stack frame. -+ */ -+ "bis $16,$16,$1\n\t" /* load "this" */ -+ "ldq $2,16($15)\n\t" /* load "methodIndex" */ -+ "ldq $1,0($1)\n\t" /* load vtable */ -+#if 0 -+ "s8addq $2,16,$2\n\t" /* vtable index = "methodIndex" * 8 + 16 */ -+#else -+ "mulq $2, 8, $2\n\t" -+ "addq $2, 0, $2\n\t" /* vtable index = "methodIndex" * 16 + 24 */ -+#endif -+ "addq $1,$2,$1\n\t" -+ "ldq $27,0($1)\n\t" /* load address of function */ -+ "jsr $26,($27),0\n\t" /* call virtual function */ -+ "ldgp $29,0($26)\n\t" -+ -+ "bis $15,$15,$30\n\t" -+ "ldq $26,0($30)\n\t" -+ "ldq $15,8($30)\n\t" -+ "addq $30,32,$30\n\t" -+ "ret $31,($26),1\n\t" -+ ".end XPTC_InvokeByIndex" -+ ); -+ ---- xpcom/reflect/xptcall/src/md/unix/xptcstubs_freebsd_alpha.cpp.orig Tue May 27 01:37:30 2003 -+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_freebsd_alpha.cpp Tue May 27 01:37:04 2003 -@@ -0,0 +1,269 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* ***** BEGIN LICENSE BLOCK ***** -+ * Version: NPL 1.1/GPL 2.0/LGPL 2.1 -+ * -+ * The contents of this file are subject to the Netscape Public License -+ * Version 1.1 (the "License"); you may not use this file except in -+ * compliance with the License. You may obtain a copy of the License at -+ * http://www.mozilla.org/NPL/ -+ * -+ * Software distributed under the License is distributed on an "AS IS" basis, -+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -+ * for the specific language governing rights and limitations under the -+ * License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1999 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * Alternatively, the contents of this file may be used under the terms of -+ * either the GNU General Public License Version 2 or later (the "GPL"), or -+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), -+ * in which case the provisions of the GPL or the LGPL are applicable instead -+ * of those above. If you wish to allow use of your version of this file only -+ * under the terms of either the GPL or the LGPL, and not to allow others to -+ * use your version of this file under the terms of the NPL, indicate your -+ * decision by deleting the provisions above and replace them with the notice -+ * and other provisions required by the GPL or the LGPL. If you do not delete -+ * the provisions above, a recipient may use your version of this file under -+ * the terms of any one of the NPL, the GPL or the LGPL. -+ * -+ * ***** END LICENSE BLOCK ***** */ -+ -+/* Implement shared vtbl methods. */ -+ -+/* contributed by Glen Nakamura <glen.nakamura@usa.net> */ -+ -+#include <sys/types.h> -+#include <machine/cpu.h> -+#include "xptcprivate.h" -+ -+/* Prototype specifies unmangled function name and disables unused warning */ -+static nsresult -+PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) -+__asm__("PrepareAndDispatch") __attribute__((unused)); -+ -+static nsresult -+PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args) -+{ -+ const PRUint8 PARAM_BUFFER_COUNT = 16; -+ const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer -+ -+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; -+ nsXPTCMiniVariant* dispatchParams = NULL; -+ nsIInterfaceInfo* iface_info = NULL; -+ const nsXPTMethodInfo* info; -+ PRUint8 paramCount; -+ PRUint8 i; -+ nsresult result = NS_ERROR_FAILURE; -+ -+ NS_ASSERTION(self,"no self"); -+ -+ self->GetInterfaceInfo(&iface_info); -+ NS_ASSERTION(iface_info,"no interface info"); -+ -+ iface_info->GetMethodInfo(PRUint16(methodIndex), &info); -+ NS_ASSERTION(info,"no interface info"); -+ -+ paramCount = info->GetParamCount(); -+ -+ // setup variant array pointer -+ if(paramCount > PARAM_BUFFER_COUNT) -+ dispatchParams = new nsXPTCMiniVariant[paramCount]; -+ else -+ dispatchParams = paramBuffer; -+ NS_ASSERTION(dispatchParams,"no place for params"); -+ -+ // args[0] to args[NUM_ARG_REGS] hold floating point register values -+ PRUint64* ap = args + NUM_ARG_REGS; -+ for(i = 0; i < paramCount; i++, ap++) -+ { -+ const nsXPTParamInfo& param = info->GetParam(i); -+ const nsXPTType& type = param.GetType(); -+ nsXPTCMiniVariant* dp = &dispatchParams[i]; -+ -+ if(param.IsOut() || !type.IsArithmetic()) -+ { -+ dp->val.p = (void*) *ap; -+ continue; -+ } -+ // else -+ switch(type) -+ { -+ case nsXPTType::T_I8 : dp->val.i8 = (PRInt8) *ap; break; -+ case nsXPTType::T_I16 : dp->val.i16 = (PRInt16) *ap; break; -+ case nsXPTType::T_I32 : dp->val.i32 = (PRInt32) *ap; break; -+ case nsXPTType::T_I64 : dp->val.i64 = (PRInt64) *ap; break; -+ case nsXPTType::T_U8 : dp->val.u8 = (PRUint8) *ap; break; -+ case nsXPTType::T_U16 : dp->val.u16 = (PRUint16) *ap; break; -+ case nsXPTType::T_U32 : dp->val.u32 = (PRUint32) *ap; break; -+ case nsXPTType::T_U64 : dp->val.u64 = (PRUint64) *ap; break; -+ case nsXPTType::T_FLOAT : -+ if(i < NUM_ARG_REGS) -+ { -+ // floats passed via registers are stored as doubles -+ // in the first NUM_ARG_REGS entries in args -+ dp->val.u64 = (PRUint64) args[i]; -+ dp->val.f = (float) dp->val.d; // convert double to float -+ } -+ else -+ dp->val.u32 = (PRUint32) *ap; -+ break; -+ case nsXPTType::T_DOUBLE : -+ // doubles passed via registers are also stored -+ // in the first NUM_ARG_REGS entries in args -+ dp->val.u64 = (i < NUM_ARG_REGS) ? args[i] : *ap; -+ break; -+ case nsXPTType::T_BOOL : dp->val.b = (PRBool) *ap; break; -+ case nsXPTType::T_CHAR : dp->val.c = (char) *ap; break; -+ case nsXPTType::T_WCHAR : dp->val.wc = (PRUnichar) *ap; break; -+ default: -+ NS_ASSERTION(0, "bad type"); -+ break; -+ } -+ } -+ -+ result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); -+ -+ NS_RELEASE(iface_info); -+ -+ if(dispatchParams != paramBuffer) -+ delete [] dispatchParams; -+ -+ return result; -+} -+ -+/* -+ * SharedStub() -+ * Collects arguments and calls PrepareAndDispatch. The "methodIndex" is -+ * passed to this function via $1 to preserve the argument registers. -+ */ -+__asm__( -+ "#### SharedStub ####\n" -+".text\n\t" -+ ".align 5\n\t" -+ ".ent SharedStub\n" -+"SharedStub:\n\t" -+ ".frame $30,96,$26,0\n\t" -+ ".mask 0x4000000,-96\n\t" -+ "ldgp $29,0($27)\n" -+"$SharedStub..ng:\n\t" -+ "subq $30,96,$30\n\t" -+ "stq $26,0($30)\n\t" -+ ".prologue 1\n\t" -+ -+ /* -+ * Store arguments passed via registers to the stack. -+ * Floating point registers are stored as doubles and converted -+ * to floats in PrepareAndDispatch if necessary. -+ */ -+ "stt $f17,16($30)\n\t" /* floating point registers */ -+ "stt $f18,24($30)\n\t" -+ "stt $f19,32($30)\n\t" -+ "stt $f20,40($30)\n\t" -+ "stt $f21,48($30)\n\t" -+ "stq $17,56($30)\n\t" /* integer registers */ -+ "stq $18,64($30)\n\t" -+ "stq $19,72($30)\n\t" -+ "stq $20,80($30)\n\t" -+ "stq $21,88($30)\n\t" -+ -+ /* -+ * Call PrepareAndDispatch function. -+ */ -+ "bis $1,$1,$17\n\t" /* pass "methodIndex" */ -+ "addq $30,16,$18\n\t" /* pass "args" */ -+ "bsr $26,$PrepareAndDispatch..ng\n\t" -+ -+ "ldq $26,0($30)\n\t" -+ "addq $30,96,$30\n\t" -+ "ret $31,($26),1\n\t" -+ ".end SharedStub" -+ ); -+ -+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ -+/* -+ * nsresult nsXPTCStubBase::Stub##n() -+ * Sets register $1 to "methodIndex" and jumps to SharedStub. -+ */ -+#define STUB_ENTRY(n) \ -+__asm__( \ -+ "#### Stub"#n" ####\n" \ -+".text\n\t" \ -+ ".align 5\n\t" \ -+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev\n\t" \ -+ ".ent _ZN14nsXPTCStubBase5Stub"#n"Ev\n" \ -+"_ZN14nsXPTCStubBase5Stub"#n"Ev:\n\t" \ -+ ".frame $30,0,$26,0\n\t" \ -+ "ldgp $29,0($27)\n" \ -+"$_ZN14nsXPTCStubBase5Stub"#n"Ev..ng:\n\t" \ -+ ".prologue 1\n\t" \ -+ "lda $1,"#n"\n\t" \ -+ "br $31,$SharedStub..ng\n\t" \ -+ ".end _ZN14nsXPTCStubBase5Stub"#n"Ev" \ -+ ); \ -+__asm__( \ -+ "#### Stub"#n" ####\n" \ -+".text\n\t" \ -+ ".align 5\n\t" \ -+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev\n\t" \ -+ ".ent _ZN14nsXPTCStubBase6Stub"#n"Ev\n" \ -+"_ZN14nsXPTCStubBase6Stub"#n"Ev:\n\t" \ -+ ".frame $30,0,$26,0\n\t" \ -+ "ldgp $29,0($27)\n" \ -+"$_ZN14nsXPTCStubBase6Stub"#n"Ev..ng:\n\t" \ -+ ".prologue 1\n\t" \ -+ "lda $1,"#n"\n\t" \ -+ "br $31,$SharedStub..ng\n\t" \ -+ ".end _ZN14nsXPTCStubBase6Stub"#n"Ev" \ -+ ); \ -+__asm__( \ -+ "#### Stub"#n" ####\n" \ -+".text\n\t" \ -+ ".align 5\n\t" \ -+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev\n\t" \ -+ ".ent _ZN14nsXPTCStubBase7Stub"#n"Ev\n" \ -+"_ZN14nsXPTCStubBase7Stub"#n"Ev:\n\t" \ -+ ".frame $30,0,$26,0\n\t" \ -+ "ldgp $29,0($27)\n" \ -+"$_ZN14nsXPTCStubBase7Stub"#n"Ev..ng:\n\t" \ -+ ".prologue 1\n\t" \ -+ "lda $1,"#n"\n\t" \ -+ "br $31,$SharedStub..ng\n\t" \ -+ ".end _ZN14nsXPTCStubBase7Stub"#n"Ev" \ -+ ); -+#else -+/* -+ * nsresult nsXPTCStubBase::Stub##n() -+ * Sets register $1 to "methodIndex" and jumps to SharedStub. -+ */ -+#define STUB_ENTRY(n) \ -+nsresult nsXPTCStubBase::Stub##n() \ -+{ \ -+ nsresult result; \ -+__asm__ __volatile__( \ -+ "ldah $29,0($27)\n\t" \ -+ "lda $29,0($29)\n\t" \ -+ "lda $1, "#n"\n\t" \ -+ "br $31, $SharedStub..ng\n\t" \ -+ "mov $0, %0\n\t" \ -+ : "=r" (result) \ -+ ); \ -+ return result; \ -+} -+#endif -+ -+#define SENTINEL_ENTRY(n) \ -+nsresult nsXPTCStubBase::Sentinel##n() \ -+{ \ -+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ -+ return NS_ERROR_NOT_IMPLEMENTED; \ -+} -+ -+#include "xptcstubsdef.inc" -+ diff --git a/www/firefox15/files/patch-xptcall-sparc64 b/www/firefox15/files/patch-xptcall-sparc64 deleted file mode 100644 index 9599a8a71336..000000000000 --- a/www/firefox15/files/patch-xptcall-sparc64 +++ /dev/null @@ -1,327 +0,0 @@ ---- /dev/null Mon May 26 13:22:00 2003 -+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_freebsd.cpp Mon May 26 04:12:55 2003 -@@ -0,0 +1,123 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * -+ * The contents of this file are subject to the Mozilla Public -+ * License Version 1.1 (the "License"); you may not use this file -+ * except in compliance with the License. You may obtain a copy of -+ * the License at http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS -+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * rights and limitations under the License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is Netscape -+ * Communications Corporation. Portions created by Netscape are -+ * Copyright (C) 2001 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ * Stuart Parmenter <pavlov@netscape.com> -+ */ -+ -+/* Implement shared vtbl methods. */ -+ -+#include "xptcprivate.h" -+ -+#if defined(sparc) || defined(__sparc__) -+ -+extern "C" nsresult -+PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args) -+{ -+ -+#define PARAM_BUFFER_COUNT 16 -+ -+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; -+ nsXPTCMiniVariant* dispatchParams = NULL; -+ nsIInterfaceInfo* iface_info = NULL; -+ const nsXPTMethodInfo* info; -+ PRUint8 paramCount; -+ PRUint8 i; -+ nsresult result = NS_ERROR_FAILURE; -+ -+ NS_ASSERTION(self,"no self"); -+ -+ self->GetInterfaceInfo(&iface_info); -+ NS_ASSERTION(iface_info,"no interface info"); -+ -+ iface_info->GetMethodInfo(PRUint16(methodIndex), &info); -+ NS_ASSERTION(info,"no interface info"); -+ -+ paramCount = info->GetParamCount(); -+ -+ // setup variant array pointer -+ if(paramCount > PARAM_BUFFER_COUNT) -+ dispatchParams = new nsXPTCMiniVariant[paramCount]; -+ else -+ dispatchParams = paramBuffer; -+ NS_ASSERTION(dispatchParams,"no place for params"); -+ -+ PRUint64* ap = args; -+ for(i = 0; i < paramCount; i++, ap++) -+ { -+ const nsXPTParamInfo& param = info->GetParam(i); -+ const nsXPTType& type = param.GetType(); -+ nsXPTCMiniVariant* dp = &dispatchParams[i]; -+ -+ if(param.IsOut() || !type.IsArithmetic()) -+ { -+ dp->val.p = (void*) *ap; -+ continue; -+ } -+ // else -+ switch(type) -+ { -+ case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break; -+ case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break; -+ case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break; -+ case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break; -+ case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*) ap); break; -+ case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break; -+ case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*) ap); break; -+ case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break; -+ case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break; -+ case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break; -+ case nsXPTType::T_BOOL : dp->val.b = *((PRInt64*) ap); break; -+ case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*) ap); break; -+ case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break; -+ default: -+ NS_ASSERTION(0, "bad type"); -+ break; -+ } -+ } -+ -+ result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); -+ -+ NS_RELEASE(iface_info); -+ -+ if(dispatchParams != paramBuffer) -+ delete [] dispatchParams; -+ -+ return result; -+} -+ -+extern "C" int SharedStub(int, int*); -+ -+#define STUB_ENTRY(n) \ -+nsresult nsXPTCStubBase::Stub##n() \ -+{ \ -+ int dummy; /* defeat tail-call optimization */ \ -+ return SharedStub(n, &dummy); \ -+} -+ -+#define SENTINEL_ENTRY(n) \ -+nsresult nsXPTCStubBase::Sentinel##n() \ -+{ \ -+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ -+ return NS_ERROR_NOT_IMPLEMENTED; \ -+} -+ -+#include "xptcstubsdef.inc" -+ -+#endif /* sparc || __sparc__ */ ---- /dev/null Mon May 26 13:22:00 2003 -+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_freebsd.s Mon May 26 04:06:09 2003 -@@ -0,0 +1,104 @@ -+/* -*- Mode: asm; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * -+ * The contents of this file are subject to the Mozilla Public -+ * License Version 1.1 (the "License"); you may not use this file -+ * except in compliance with the License. You may obtain a copy of -+ * the License at http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS -+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * rights and limitations under the License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is Netscape -+ * Communications Corporation. Portions created by Netscape are -+ * Copyright (C) 2001 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ * Stuart Parmenter <pavlov@netscape.com> -+ * Chris Seawood <cls@seawood.org> -+ */ -+ -+/* -+ Platform specific code to invoke XPCOM methods on native objects -+ for sparcv9 Solaris. -+ -+ See the SPARC Compliance Definition (SCD) Chapter 3 -+ for more information about what is going on here, including -+ the use of BIAS (0x7ff). -+ The SCD is available from http://www.sparc.com/. -+*/ -+ -+ .global XPTC_InvokeByIndex -+ .type XPTC_InvokeByIndex, #function -+ -+/* -+ XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, -+ PRUint32 paramCount, nsXPTCVariant* params); -+ -+*/ -+XPTC_InvokeByIndex: -+ save %sp,-(128 + 64),%sp ! room for the register window and -+ ! struct pointer, rounded up to 0 % 64 -+ sll %i2,4,%l0 ! assume the worst case -+ ! paramCount * 2 * 8 bytes -+ cmp %l0, 0 ! are there any args? If not, -+ be .invoke ! no need to copy args to stack -+ nop -+ -+ sub %sp,%l0,%sp ! create the additional stack space -+ add %sp,0x7ff+136,%o0 ! step past the register window, the -+ ! struct result pointer and the 'this' slot -+ mov %i2,%o1 ! paramCount -+ call invoke_copy_to_stack -+ mov %i3,%o2 ! params -+ -+! -+! load arguments from stack into the outgoing registers -+! BIAS is 0x7ff (2047) -+! -+ -+! load the %o1..5 64bit (extended word) output registers registers -+ ldx [%sp + 0x7ff + 136],%o1 ! %i1 -+ ldx [%sp + 0x7ff + 144],%o2 ! %i2 -+ ldx [%sp + 0x7ff + 152],%o3 ! %i3 -+ ldx [%sp + 0x7ff + 160],%o4 ! %i4 -+ ldx [%sp + 0x7ff + 168],%o5 ! %i5 -+ -+! load the even number double registers starting with %d2 -+ ldd [%sp + 0x7ff + 136],%f2 -+ ldd [%sp + 0x7ff + 144],%f4 -+ ldd [%sp + 0x7ff + 152],%f6 -+ ldd [%sp + 0x7ff + 160],%f8 -+ ldd [%sp + 0x7ff + 168],%f10 -+ ldd [%sp + 0x7ff + 176],%f12 -+ ldd [%sp + 0x7ff + 184],%f14 -+ ldd [%sp + 0x7ff + 192],%f16 -+ ldd [%sp + 0x7ff + 200],%f18 -+ ldd [%sp + 0x7ff + 208],%f20 -+ ldd [%sp + 0x7ff + 216],%f22 -+ ldd [%sp + 0x7ff + 224],%f24 -+ ldd [%sp + 0x7ff + 232],%f26 -+ ldd [%sp + 0x7ff + 240],%f28 -+ ldd [%sp + 0x7ff + 248],%f30 -+ -+! -+! calculate the target address from the vtable -+! -+.invoke: -+ sll %i1,3,%l0 ! index *= 8 -+! add %l0,16,%l0 ! there are 2 extra entries in the vTable (16bytes) -+ ldx [%i0],%l1 ! *that --> address of vtable -+ ldx [%l0 + %l1],%l0 ! that->vtable[index * 8 + 16] --> address -+ -+ jmpl %l0,%o7 ! call the routine -+ mov %i0,%o0 ! move 'this' pointer to out register -+ -+ mov %o0,%i0 ! propagate return value -+ ret -+ restore -+ -+ .size XPTC_InvokeByIndex, .-XPTC_InvokeByIndex ---- /dev/null Mon May 26 14:00:00 2003 -+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_freebsd.cpp Mon May 26 14:00:49 2003 -@@ -0,0 +1,91 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- -+ * -+ * The contents of this file are subject to the Mozilla Public -+ * License Version 1.1 (the "License"); you may not use this file -+ * except in compliance with the License. You may obtain a copy of -+ * the License at http://www.mozilla.org/MPL/ -+ * -+ * Software distributed under the License is distributed on an "AS -+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -+ * implied. See the License for the specific language governing -+ * rights and limitations under the License. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is Netscape -+ * Communications Corporation. Portions created by Netscape are -+ * Copyright (C) 2001 Netscape Communications Corporation. All -+ * Rights Reserved. -+ * -+ * Contributor(s): -+ * Stuart Parmenter <pavlov@netscape.com> -+ * Chris Seawood <cls@seawood.org> -+ */ -+ -+ -+/* Platform specific code to invoke XPCOM methods on native objects */ -+ -+#include "xptcprivate.h" -+ -+#if !defined(__sparc) && !defined(__sparc__) -+#error "This code is for Sparc only" -+#endif -+ -+/* Prototype specifies unmangled function name */ -+extern "C" PRUint64 -+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s); -+ -+extern "C" PRUint64 -+invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) -+{ -+ /* -+ We need to copy the parameters for this function to locals and use them -+ from there since the parameters occupy the same stack space as the stack -+ we're trying to populate. -+ */ -+ PRUint64 *l_d = d; -+ nsXPTCVariant *l_s = s; -+ PRUint64 l_paramCount = paramCount; -+ PRUint64 regCount = 0; // return the number of registers to load from the stack -+ -+ for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++) -+ { -+ if (regCount < 5) regCount++; -+ -+ if (l_s->IsPtrData()) -+ { -+ *l_d = (PRUint64)l_s->ptr; -+ continue; -+ } -+ switch (l_s->type) -+ { -+ case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break; -+ case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break; -+ case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break; -+ case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break; -+ -+ case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break; -+ case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break; -+ case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break; -+ case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break; -+ -+ /* in the case of floats, we want to put the bits in to the -+ 64bit space right justified... floats in the paramter array on -+ sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip -+ the space that would be occupied by %f0, %f2, etc. -+ */ -+ case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break; -+ case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break; -+ case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break; -+ case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break; -+ case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break; -+ -+ default: -+ // all the others are plain pointer types -+ *((void**)l_d) = l_s->val.p; -+ break; -+ } -+ } -+ -+ return regCount; -+} diff --git a/www/firefox15/pkg-descr b/www/firefox15/pkg-descr deleted file mode 100644 index 4f5cfbf2caa9..000000000000 --- a/www/firefox15/pkg-descr +++ /dev/null @@ -1,12 +0,0 @@ -Firefox is an award winning, free, open-source web browser for many platforms -and is based on the Mozilla codebase. It is small, fast and easy to use, and -offers many advanced features: - o Popup Blocking - o Tabbed Browsing - o Live Bookmarks (ie. RSS) - o Extensions - o Themes - o FastFind - o Improved Security - -WWW: http://www.mozilla.com/firefox/ diff --git a/www/firefox15/pkg-message b/www/firefox15/pkg-message deleted file mode 100644 index 9e0a4dd2e9ff..000000000000 --- a/www/firefox15/pkg-message +++ /dev/null @@ -1,32 +0,0 @@ -====================================================================== - -SMB issues: -Network group, machine, and share browsing does not work correctly. - -SFTP: -Only sftp access using public key authentication works. To easily -setup public key authentication to "remote_host": - -ssh-keygen -t dsa -cat ~/.ssh/id_dsa.pub | ssh remote_host "cat >> .ssh/authorized_keys" - -The SSH sever on remote_host must allow pub key authentication. - -====================================================================== - -Any bug reports should be addressed to the maintainers at: - gnome@FreeBSD.org -You may also Cc: freebsd-ports@FreeBSD.org. Please do not send -bug reports to any other addresses. - -Please include the following information with any bug report: -* Output from 'uname -a'. -* Date/time stamp from www/firefox/Makefile. -* Where/when did the problem occur: configuring, building, or - running firefox -* How can you reproduce the problem? - -Thank you for your help in testing and reporting bugs, and we hope you -enjoy using Firefox. -The Maintainers (gnome@) -====================================================================== diff --git a/www/phpadsnew/Makefile b/www/phpadsnew/Makefile deleted file mode 100644 index d394c9ebdb6a..000000000000 --- a/www/phpadsnew/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# New ports collection makefile for: phpAdsNew -# Date created: 2005-05-08 -# Whom: Meno Abels <meno.abels@adviser.com> -# -# $FreeBSD$ -# - -PORTNAME= phpAdsNew -DISTVERSION= 2.0.9 -CATEGORIES= www -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= phpadsnew - -MAINTAINER= ports@FreeBSD.org -COMMENT= An open-source ad server - -NO_BUILD= yes -USE_PHP= mysql pcre zlib - -SUB_LIST+= "MYADSDIR=${MYADSDIR}" \ - "PKGNAME=${PKGNAME}" - -DEPRECATED= replaced by www/openx -EXPIRATION_DATE= 2008-04-30 - -# Unfortunately can't make WITH_SUPHP part of the OPTIONS selection, -# since it has to be processed before just about anything else. - -WANT_PHP_WEB= yes - -LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX} - -# MYADSUSR is only used WITH_SUPHP -MYADSDIR?= www/phpadsnew -MYADSGRP?= ${WWWGRP} -CFGFILE= config.inc.php - -PLIST= ${WRKDIR}/plist -PLIST_SUB+= MYADSDIR=${MYADSDIR} MYADSGRP=${MYADSGRP} - -.SILENT: - -do-build: - @${DO_NADA} - -pre-everything:: - ${ECHO_MSG} "" - ${ECHO_MSG} "You may use the following additional build option:" - ${ECHO_MSG} "" - ${ECHO_MSG} " WITH_SUPHP=yes Install appropriately for use with" - ${ECHO_MSG} " the www/suphp port [default: no]" - ${ECHO_MSG} "" - -post-patch: - ${MV} ${WRKSRC}/${CFGFILE} ${WRKSRC}/${CFGFILE}.sample - cd ${WRKSRC} && \ - if ${TEST} -d "misc/backwards compatibility" ; then \ - ${MV} "misc/backwards compatibility" "misc/backwards_compatibility" ; \ - fi ; \ - ${FIND} . ! -type d ! -name ${CFGFILE}.sample | ${SORT} | \ - ${SED} -e "s,^\.,%%MYADSDIR%%," >${PLIST} ; \ - ${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \ - ${FIND} . -type d | ${SORT} -r | ${SED} \ - -e "s,^\.$$,@unexec ${RMDIR} %D/%%MYADSDIR%% 2>/dev/null || true," \ - -e "s,^\.,@dirrm %%MYADSDIR%%," >>${PLIST} - -pre-install: -.if defined(WITH_SUPHP) - ${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL -.endif - -do-install: install-app install-conf - -install-app: - cd ${WRKSRC} && \ - for src in $$( ${FIND} . ! -name .cvsignore ) ; do \ - dst=${PREFIX}/${MYADSDIR}$${src#.} ; \ - if ${TEST} -d "$$src" ; then \ - ${MKDIR} "$$dst" ; \ - else \ - ${INSTALL_DATA} "$$src" "$$dst" ; \ - fi \ - done - -install-conf: install-app - cd ${PREFIX}/${MYADSDIR} ; \ - ${CHMOD} 0640 ${CFGFILE}.sample ; \ - ${CHGRP} ${MYADSGRP} ${CFGFILE}.sample ; \ - if ${TEST} ! -f ${CFGFILE} ; then \ - ${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \ - fi - -post-install: -.if defined(WITH_SUPHP) - ${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL -.endif - -.include <bsd.port.mk> diff --git a/www/phpadsnew/distinfo b/www/phpadsnew/distinfo deleted file mode 100644 index 16bf06e2e937..000000000000 --- a/www/phpadsnew/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (phpAdsNew-2.0.9.tar.gz) = 0af4f40a4c377af99429e8568e70ee86 -SHA256 (phpAdsNew-2.0.9.tar.gz) = f6ab659547c9f1a14a77ecc622586676b2fcffb90e429e94276bf773ec58ea59 -SIZE (phpAdsNew-2.0.9.tar.gz) = 2381410 diff --git a/www/phpadsnew/pkg-descr b/www/phpadsnew/pkg-descr deleted file mode 100644 index 4036a0a8c1df..000000000000 --- a/www/phpadsnew/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -phpAdsNew is an open-source ad server, with an integrated banner -management interface and tracking system for gathering statistics. -With phpAdsNew you can easily rotate paid banners and your own -in-house advertisements. You can even integrate banners from third -party advertising companies. - -WWW: http://www.phpadsnew.com/ diff --git a/www/phpadsnew/pkg-plist-chunk b/www/phpadsnew/pkg-plist-chunk deleted file mode 100644 index 0003974fc80a..000000000000 --- a/www/phpadsnew/pkg-plist-chunk +++ /dev/null @@ -1,7 +0,0 @@ -@mode 640 -@group %%MYADSGRP%% -@unexec if cmp -s %D/%%MYADSDIR%%/config.inc.php.sample %D/%%MYADSDIR%%/config.inc.php ; then rm -f %D/%%MYADSDIR%%/config.inc.php ; fi -%%MYADSDIR%%/config.inc.php.sample -@exec [ ! -f %B/config.inc.php ] && cp -p %B/%f %B/config.inc.php || true -@mode -@group diff --git a/x11-wm/Makefile b/x11-wm/Makefile index ae85abe44cf7..6981d34c2dd0 100644 --- a/x11-wm/Makefile +++ b/x11-wm/Makefile @@ -121,7 +121,6 @@ SUBDIR += tvtwm SUBDIR += twm SUBDIR += ude - SUBDIR += uwm SUBDIR += vtwm SUBDIR += w9wm SUBDIR += waimea @@ -147,6 +146,5 @@ SUBDIR += xfce4-wm SUBDIR += xmonad SUBDIR += xmonad-contrib - SUBDIR += yawm .include <bsd.port.subdir.mk> diff --git a/x11-wm/uwm/Makefile b/x11-wm/uwm/Makefile deleted file mode 100644 index 98150787d39a..000000000000 --- a/x11-wm/uwm/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -# New ports collection makefile for: uwm -# Date created: 2000-10-16 -# Whom: trevor -# -# based on the NetBSD package -# $NetBSD: Makefile,v 1.2 2000/02/02 08:07:07 itohy Exp $ -# $FreeBSD$ -# - -PORTNAME= uwm -PORTVERSION= 19881027 -PORTREVISION= 1 -CATEGORIES= x11-wm -MASTER_SITES= ${MASTER_SITE_NETBSD} -DISTNAME= X.V11R3uwm - -MAINTAINER= ports@FreeBSD.org -COMMENT= X11R3 window manager - -MAN1= uwm.1 -PLIST= ${WRKDIR}/pkg-plist -USE_IMAKE= yes -REINPLACE_ARGS= -i'' -E -WRKSRC= ${WRKDIR}/X.V11R3/clients/uwm - -DEPRECATED= Version branch long since retired -EXPIRATION_DATE= 2007-10-27 - -post-patch: - ${REINPLACE_CMD} 's:/usr/lib/X11:${PREFIX}/lib/X11:g' ${WRKSRC}/uwm.man - -pre-install: - ${ECHO_CMD} bin/uwm > ${PLIST} - ${ECHO_CMD} lib/X11/uwm/system.uwmrc >> ${PLIST} - ${ECHO_CMD} @dirrm lib/X11/uwm >> ${PLIST} - -post-install: - ${MKDIR} ${PREFIX}/lib/X11/uwm - ${INSTALL_DATA} ${WRKSRC}/default.uwmrc \ - ${PREFIX}/lib/X11/uwm/system.uwmrc - -.include <bsd.port.mk> diff --git a/x11-wm/uwm/distinfo b/x11-wm/uwm/distinfo deleted file mode 100644 index 1e1fb27c3334..000000000000 --- a/x11-wm/uwm/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (X.V11R3uwm.tar.gz) = 373f6526106d80c03103259adbf3a47a -SIZE (X.V11R3uwm.tar.gz) = 114262 -SHA256 (X.V11R3uwm.tar.gz) = 17b7fb8fe95be396b78627b7926ade3e8d41b2df38b2be83696b5335c96085d1 diff --git a/x11-wm/uwm/files/patch-aa b/x11-wm/uwm/files/patch-aa deleted file mode 100644 index 3208c76049a1..000000000000 --- a/x11-wm/uwm/files/patch-aa +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-aa,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- Imakefile.orig Mon Oct 24 23:54:50 1988 -+++ Imakefile Wed Dec 22 13:54:20 1999 -@@ -1,3 +1,5 @@ -+ UWMDIR = $(LIBDIR)/uwm -+ TOP_INCLUDES = -I../.. -I$(INCROOT) $(TOP_X_INCLUDES) - DEFINES = -DSYSFILE=\"$(UWMDIR)$(PATHSEP)system.uwmrc\" - LOCAL_LIBRARIES = $(XLIB) - SYS_LIBRARIES = -ll diff --git a/x11-wm/uwm/files/patch-ab b/x11-wm/uwm/files/patch-ab deleted file mode 100644 index bc830712df6b..000000000000 --- a/x11-wm/uwm/files/patch-ab +++ /dev/null @@ -1,146 +0,0 @@ -$FreeBSD$ -$NetBSD: patch-ab,v 1.2 2000/01/19 07:24:07 itohy Exp $ - ---- uwm.c.orig Sun Oct 23 13:21:55 1988 -+++ uwm.c Wed Sep 25 14:53:13 2002 -@@ -41,9 +41,18 @@ - - #include "uwm.h" - #include <ctype.h> -+#include <signal.h> -+ -+#ifdef CSRG_BASED -+#undef MIN -+#undef MAX -+#include <sys/param.h> -+#if defined(BSD) && BSD >= 199306 -+#define HAVE_MKSTEMP -+#endif -+#endif - - #ifdef PROFIL --#include <signal.h> - /* - * Dummy handler for profiling. - */ -@@ -53,6 +62,27 @@ - } - #endif - -+#ifdef SIGCHLD -+#include <sys/wait.h> -+/* -+ * clear (probably inherited) children which are dead or will die. -+ */ -+clear_children() -+{ -+ int status, pid; -+ -+ do { -+#ifdef CSRG_BASED -+ pid = wait3(&status, WNOHANG, (struct rusage *) 0); -+#else /* SVR4 */ -+ pid = waitpid(-1, &status, WNOHANG); -+#endif -+ } while (pid != 0 && pid != -1); -+ -+ signal(SIGCHLD, clear_children); -+} -+#endif -+ - #define gray_width 16 - #define gray_height 16 - static char gray_bits[] = { -@@ -103,7 +133,6 @@ - GC gc; /* graphics context for gray background */ - XImage grayimage; /* for gray background */ - XGCValues xgc; /* to create font GCs */ -- char *malloc(); - Bool fallbackMFont = False, /* using default GC font for menus, */ - fallbackPFont = False, /* popups, */ - fallbackIFont = False; /* icons */ -@@ -115,6 +144,10 @@ - #ifdef PROFIL - signal(SIGTERM, ptrap); - #endif -+#ifdef SIGCHLD -+ /* no zombies */ -+ clear_children(); -+#endif - - /* - * Set up internal defaults. -@@ -369,7 +402,7 @@ - if (IFontInfo == NULL) { - fprintf(stderr, "uwm: Unable to open icon font '%s', using server default.\n", - IFontName); -- IFontInfo = XQueryFont(dpy, DefaultGC(dpy, scr)->gid); -+ IFontInfo = XQueryFont(dpy, XGContextFromGC(DefaultGC(dpy, scr))); - fallbackIFont = True; - } - PFontInfo = XLoadQueryFont(dpy, PFontName); -@@ -379,7 +412,7 @@ - if (fallbackIFont) - PFontInfo = IFontInfo; - else -- PFontInfo = XQueryFont(dpy, DefaultGC(dpy, scr)->gid); -+ PFontInfo = XQueryFont(dpy, XGContextFromGC(DefaultGC(dpy, scr))); - fallbackPFont = True; - } - MFontInfo = XLoadQueryFont(dpy, MFontName); -@@ -389,7 +422,7 @@ - if (fallbackIFont || fallbackPFont) - MFontInfo = fallbackPFont ? PFontInfo : IFontInfo; - else -- MFontInfo = XQueryFont(dpy, DefaultGC(dpy, scr)->gid); -+ MFontInfo = XQueryFont(dpy, XGContextFromGC(DefaultGC(dpy, scr))); - fallbackMFont = True; - } - -@@ -685,7 +718,11 @@ - */ - InitBindings() - { -+#ifdef HAVE_MKSTEMP -+ int fd; -+#else - char *mktemp(); -+#endif - char *tempfile; /* Temporary filename. */ - register FILE *fp; /* Temporary file pointer. */ - register char **ptr; /* Default bindings string array pointer. */ -@@ -699,15 +736,26 @@ - exit (1); - } - strcpy (tempfile, TEMPFILE); -+#ifdef HAVE_MKSTEMP -+ if ((fd = mkstemp(tempfile)) < 0 || (fp = fdopen(fd, "r+")) == NULL) { -+ perror("uwm: cannot create temp file"); -+ exit(1); -+ } -+#else - sfilename = mktemp(tempfile); - if ((fp = fopen(tempfile, "w")) == NULL) { - perror("uwm: cannot create temp file"); - exit(1); - } -+#endif - for (ptr = DefaultBindings; *ptr; ptr++) { - fputs(*ptr, fp); - fputc('\n', fp); - } -+#ifdef HAVE_MKSTEMP -+ rewind(fp); -+ yyin = fp; -+#else - fclose(fp); - - /* -@@ -717,6 +765,7 @@ - perror("uwm: cannot open temp file"); - exit(1); - } -+#endif - Lineno = 1; - yyparse(); - fclose(yyin); diff --git a/x11-wm/uwm/files/patch-ac b/x11-wm/uwm/files/patch-ac deleted file mode 100644 index 4f6765f0ddbe..000000000000 --- a/x11-wm/uwm/files/patch-ac +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- uwm.h.orig Mon Oct 24 19:08:24 1988 -+++ uwm.h Thu Dec 23 00:27:02 1999 -@@ -39,6 +39,12 @@ - - #include <errno.h> - #include <stdio.h> -+#ifdef CSRG_BASED -+#include <unistd.h> -+#endif -+#ifndef X_NOT_STDC_ENV -+#include <stdlib.h> -+#endif - #include <X11/Xos.h> - #include <X11/Xlib.h> - #include <X11/Xutil.h> diff --git a/x11-wm/uwm/files/patch-ad b/x11-wm/uwm/files/patch-ad deleted file mode 100644 index aad8ffe3dd49..000000000000 --- a/x11-wm/uwm/files/patch-ad +++ /dev/null @@ -1,152 +0,0 @@ -$FreeBSD$ -$NetBSD: patch-ad,v 1.3 1999/12/23 23:12:50 itohy Exp $ - ---- gram.y.orig Thu Sep 22 13:14:31 1988 -+++ gram.y Wed Sep 25 14:48:16 2002 -@@ -60,8 +60,6 @@ - static char *mcolors[2]; /* Color values used in menus. */ - MenuLink *menu_link; /* Temporary menu link pointer. */ - --char *calloc(); -- - %} - - %union { -@@ -117,18 +115,18 @@ - case IsString: - if ($3 == C_STRING) { - strcpy(KeywordTable[$1].sptr, -- yylval.sval); -+ $<sval>2); - } else { - yyerror("illegal construct"); - } -- free(yylval.sval); -+ free($<sval>2); - break; - case IsNumeric: - if ($3 == C_STRING) { - *(KeywordTable[$1].nptr) = -- y_atoi(yylval.sval); -+ y_atoi($<sval>2); - } else yyerror("illegal construct"); -- free(yylval.sval); -+ free($<sval>2); - break; - case IsBoolTrue: - case IsBoolFalse: -@@ -197,12 +195,12 @@ - ml_ptr = $3; - } - | STRING -- { $$ = C_STRING; } -+ { $$ = C_STRING; $<sval>0 = $1; } - ; - - boolvar: STRING - { -- ki = keywordlookup(yylval.sval); -+ ki = keywordlookup($1); - switch (KeywordTable[ki].type) { - case IsBoolTrue: - *(KeywordTable[ki].bptr) = TRUE; -@@ -220,7 +218,7 @@ - ; - - keyword: STRING { -- $$ = keywordlookup(yylval.sval); -+ $$ = keywordlookup($1); - } - ; - -@@ -246,9 +244,9 @@ - { $$ = CheckButtonState($1); } - ; - --kmask: STRING { $$ = keyexprlookup(yylval.sval); } -+kmask: STRING { $$ = keyexprlookup($1); } - --contmask: STRING { $$ = contexprlookup(yylval.sval); } -+contmask: STRING { $$ = contexprlookup($1); } - - buttmodexpr: buttmodifier - { $$ = $1; } -@@ -257,7 +255,7 @@ - ; - - buttmodifier: STRING -- { $$ = buttexprlookup(yylval.sval); } -+ { $$ = buttexprlookup($1); } - ; - - menuname: STRING -@@ -304,7 +302,7 @@ - - menuaction: STRING - { -- ki = keywordlookup(yylval.sval); -+ ki = keywordlookup($1); - if ((ki != -1) && - (KeywordTable[ki].type != IsFunction) && - (KeywordTable[ki].type != IsQuitFunction) && -@@ -350,7 +348,7 @@ - } - ; - --strings: STRING { $$ = yylval.sval; } -+strings: STRING { $$ = $1; } - | strings STRING - { $$ = strconcat($1, $2); } - ; -@@ -387,7 +385,7 @@ - } - ; - --color: STRING { $$ = yylval.sval; } -+color: STRING { $$ = $1; } - | /* empty */ { $$ = NULL; } - ; - %% -@@ -503,7 +501,6 @@ - strconcat(s1, s2) - char *s1, *s2; - { -- char *malloc(); - char *p; - - p = malloc(strlen(s1) + strlen(s2) + 2); -@@ -572,6 +569,8 @@ - setbinding(ICON, index, mask, name); - if (context & WINDOW) - setbinding(WINDOW, index, mask, name); -+ if (name) -+ free(name); - } - - /* -@@ -599,12 +598,13 @@ - char *mname; /* Pointer to menu name, if needed. */ - { - Binding *ptr; -+ extern char *stash(); - - ptr = AllocBinding(); - ptr->context = cont; - ptr->mask = m; - ptr->func = KeywordTable[i].fptr; -- ptr->menuname = mname; -+ ptr->menuname = mname ? stash(mname) : NULL; - - switch (m & (LeftMask | MiddleMask | RightMask)) { - case LeftMask: -@@ -771,9 +771,8 @@ - else { - for(ptr = list; ptr->next; ptr = ptr->next) /* NULL */; - ptr->next = link; -- ptr = ptr->next; -- ptr->next = NULL; - } -+ link->next = NULL; - return(list); - } - diff --git a/x11-wm/uwm/files/patch-ae b/x11-wm/uwm/files/patch-ae deleted file mode 100644 index e5a469286452..000000000000 --- a/x11-wm/uwm/files/patch-ae +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ae,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- GetButton.c.orig Mon Oct 24 19:08:17 1988 -+++ GetButton.c Wed Dec 22 13:59:28 1999 -@@ -255,7 +255,8 @@ - /* - * We convert the key pressed event to ascii. - */ -- nbytes = XLookupString(kp_event, kbd_str, STRLEN, NULL); -+ nbytes = XLookupString(kp_event, kbd_str, STRLEN, (KeySym *) NULL, -+ (XComposeStatus *) NULL); - - /* - * If kbd_str is a "non-string", then don't do anything. diff --git a/x11-wm/uwm/files/patch-af b/x11-wm/uwm/files/patch-af deleted file mode 100644 index d0081b90fe62..000000000000 --- a/x11-wm/uwm/files/patch-af +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-af,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- Kill.c.orig Thu Sep 8 00:28:28 1988 -+++ Kill.c Thu Dec 23 00:54:08 1999 -@@ -11,7 +11,7 @@ - int button; /* Button event detail. */ - int x, y; /* Event mouse position. */ - { -- Window *assoc; -+ Window assoc; - - if (IsIcon(window, x, y, TRUE, &assoc)) - XKillClient(dpy, assoc); diff --git a/x11-wm/uwm/files/patch-ag b/x11-wm/uwm/files/patch-ag deleted file mode 100644 index d89e6ab69c71..000000000000 --- a/x11-wm/uwm/files/patch-ag +++ /dev/null @@ -1,25 +0,0 @@ -$NetBSD: patch-ag,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- Restart.c.orig Sat Feb 27 07:38:11 1988 -+++ Restart.c Thu Dec 23 00:39:16 1999 -@@ -46,6 +46,8 @@ - XButtonEvent button_event; - int percentage; - int i; -+ extern char **environ; -+ char **oenv; - - percentage = VOLUME_PERCENTAGE(Volume); - XBell(dpy, percentage); -@@ -55,7 +57,10 @@ - * Gag, rely on operating system to close connection because we don't - * to mess ourselves up in case the exec fails. - */ -- execvp(*Argv, Argv, Environ); -+ oenv = environ; -+ environ = Environ; -+ execvp(*Argv, Argv); -+ environ = oenv; - for (i = 0; i < 4; i++) { - XBell(dpy, percentage); - percentage += 10; diff --git a/x11-wm/uwm/files/patch-ah b/x11-wm/uwm/files/patch-ah deleted file mode 100644 index fe779b52d26a..000000000000 --- a/x11-wm/uwm/files/patch-ah +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-ah,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- default.uwmrc.orig Fri Sep 23 23:08:13 1988 -+++ default.uwmrc Thu Dec 23 07:59:56 1999 -@@ -38,7 +38,6 @@ - f.circleup= meta :root: right down - f.circledown= m|s :: left down - f.menu= :root: middle down : "WindowOps" --f.menu= m|s :: middle down : "WindowOps" - f.menu= m|s :: middle down : "Preferences" - f.circleup= m|s :: right down - f.iconify= m|c :window|icon: left down -@@ -78,8 +77,8 @@ - Click Loud: !"xset c 8&" - Click Soft: !"xset c on&" - Click Off: !"xset c off&" --Lock On: !"xset l on&" --Lock Off: !"xset l off&" -+Lock On: !"xset led on&" -+Lock Off: !"xset led off&" - Mouse Fast: !"xset m 4 2&" - Mouse Normal: !"xset m 2 5&" - Mouse Slow: !"xset m 1 1&" diff --git a/x11-wm/uwm/files/patch-ai b/x11-wm/uwm/files/patch-ai deleted file mode 100644 index 63cac0965bca..000000000000 --- a/x11-wm/uwm/files/patch-ai +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-ai,v 1.1.1.1 1999/12/23 03:10:59 itohy Exp $ - ---- Bindings.c.orig Fri Sep 23 23:08:11 1988 -+++ Bindings.c Thu Dec 23 07:59:56 1999 -@@ -63,7 +63,6 @@ - "f.circleup=m:r:r d", - "f.circledown=m|s::l d", - "f.menu=:r:m d:\"WindowOps\"", --"f.menu=m|s::m d:\"WindowOps\"", - "f.menu=m|s::m d:\"Preferences\"", - "f.circleup=m|s::r d", - "f.iconify=m|c:w|i:l d", -@@ -102,8 +101,8 @@ - "Click Loud:!\"xset c 8&\"", - "Click Soft:!\"xset c on&\"", - "Click Off:!\"xset c off&\"", --"Lock On:!\"xset l on&\"", --"Lock Off:!\"xset l off&\"", -+"Lock On:!\"xset led on&\"", -+"Lock Off:!\"xset led off&\"", - "Mouse Fast:!\"xset m 4 2&\"", - "Mouse Normal:!\"xset m 2 5&\"", - "Mouse Slow:!\"xset m 1 1&\"", diff --git a/x11-wm/uwm/files/patch-aj b/x11-wm/uwm/files/patch-aj deleted file mode 100644 index a2b090396e92..000000000000 --- a/x11-wm/uwm/files/patch-aj +++ /dev/null @@ -1,42 +0,0 @@ -$FreeBSD$ -$NetBSD: patch-aj,v 1.1 2000/01/19 07:24:07 itohy Exp $ - ---- Menu.c.orig Sat Oct 1 09:41:13 1988 -+++ Menu.c Wed Sep 25 14:50:55 2002 -@@ -84,6 +84,14 @@ - char **oldenviron; - extern char **environ, **newenviron; - -+#ifdef SIGCHLD -+ /* -+ * Children are now handled in uvm.c, but make sure -+ * uwm blocks :-) for compatibility with other systems. -+ */ -+ -+ signal(SIGCHLD, SIG_DFL); -+#endif - oldenviron = environ; - environ = newenviron; - if ((pid = vfork()) == 0) { -@@ -105,8 +113,11 @@ - ; - if (w == -1) - status = -1; -- signal(SIGINT, istat); -- signal(SIGQUIT, qstat); -+ signal(SIGINT, (void *)istat); -+ signal(SIGQUIT, (void *)qstat); -+#ifdef SIGCHLD -+ clear_children(); -+#endif - return(status); - } - -@@ -129,7 +140,6 @@ - char *hlname; /* Pointer to hi-liter name. */ - char *strbuf; /* String buffer for IsTextNL. */ - Bool checkMotion = TRUE; /* To Restore Cursor Position */ -- char *malloc(); - int funcbutton; /* function button for window select */ - - /* diff --git a/x11-wm/uwm/files/patch-lex.l b/x11-wm/uwm/files/patch-lex.l deleted file mode 100644 index bd0abf63ffd7..000000000000 --- a/x11-wm/uwm/files/patch-lex.l +++ /dev/null @@ -1,12 +0,0 @@ -$FreeBSD$ - ---- lex.l.orig Sun Oct 23 13:20:00 1988 -+++ lex.l Wed Sep 25 14:50:06 2002 -@@ -81,7 +81,6 @@ - char *s; - { - char *ptr; -- char *malloc(); - - ptr = malloc(strlen(s) + 1); - if (ptr == NULL) { diff --git a/x11-wm/uwm/pkg-descr b/x11-wm/uwm/pkg-descr deleted file mode 100644 index ca43e3fd4ae6..000000000000 --- a/x11-wm/uwm/pkg-descr +++ /dev/null @@ -1,11 +0,0 @@ -This is a small, simple window manager, contributed to X11R3 by DEC. - -The behavior of uwm can be customized by configuration files. - -Since uwm does not decorate windows, it may not be obvious that it has started. -By default, middle-clicking on the root window with the middle mouse button -will bring up a menu of window operations. Pressing a mouse button while -holding an Alt key will raise or lower the window under the pointer, or (when -done on the root window) circulate windows up or down. - -Trevor Johnson diff --git a/x11-wm/yawm/Makefile b/x11-wm/yawm/Makefile deleted file mode 100644 index 87c7a2d49290..000000000000 --- a/x11-wm/yawm/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# New ports collection makefile for: yawm -# Date created: 2002-03-10 -# Whom: trevor -# -# $FreeBSD$ -# - -PORTNAME= yawm -PORTVERSION= 0.0.1 -PORTREVISION= 2 -CATEGORIES= x11-wm -MASTER_SITES= ftp://ftp.sai.msu.su/pub/X11/win_man/ -DISTNAME= yawm-0.0.1-a4 - -MAINTAINER= ports@FreeBSD.org -COMMENT= Has title bars, iconizing, maximizing, taskbar, placement, clock - -GNU_CONFIGURE= yes -PLIST= ${WRKDIR}/pkg-plist -#USE_GMAKE= yes -USE_XORG= x11 -DOCS= AUTHORS COPYING ChangeLog - -DEPRECATED= project no longer exists -EXPIRATION_DATE= 2007-10-27 - -pre-install: - ${ECHO_CMD} bin/yawm > ${PLIST} -.if !defined(NOPORTDOCS) -.for i in ${DOCS} - ${ECHO_CMD} share/doc/yawm/${i} >> ${PLIST} -.endfor - ${ECHO_CMD} @dirrm share/doc/yawm >> ${PLIST} -.endif - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/yawm ${PREFIX}/bin -.if !defined(NOPORTDOCS) - ${MKDIR} ${DOCSDIR} -.for i in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} -.endfor -.endif - -.include <bsd.port.mk> diff --git a/x11-wm/yawm/distinfo b/x11-wm/yawm/distinfo deleted file mode 100644 index d57b961748c5..000000000000 --- a/x11-wm/yawm/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (yawm-0.0.1-a4.tar.gz) = ac6d3115b51def428db4d48433bbe23f -SHA256 (yawm-0.0.1-a4.tar.gz) = 7b38487a6ff0a610cb2b1fb8b6195abb4adfb79d32a03e8080efa8ffcc193ccc -SIZE (yawm-0.0.1-a4.tar.gz) = 41793 diff --git a/x11-wm/yawm/pkg-descr b/x11-wm/yawm/pkg-descr deleted file mode 100644 index f7b690037c15..000000000000 --- a/x11-wm/yawm/pkg-descr +++ /dev/null @@ -1,5 +0,0 @@ -Yet Another Window Manager is based on aewm. It has title bars, -iconizing, maximizing, automatic placement, focus-follows-mouse, -and a taskbar with a window list and clock. - -Author: Linus Nilsson <d96ln#efd.lth.se> |