From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 01:22:31 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C7695A84 for ; Sun, 24 Feb 2013 01:22:31 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 6B5DAD69 for ; Sun, 24 Feb 2013 01:22:30 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1O1MUXC048415 for ; Sun, 24 Feb 2013 01:22:30 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1O1MP9h047337 for freebsd-gecko@freebsd.org; Sun, 24 Feb 2013 01:22:25 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Sun, 24 Feb 2013 01:22:25 GMT Message-Id: <201302240122.r1O1MP9h047337@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1187 - in trunk: mail/thunderbird mail/thunderbird/files www/seamonkey-i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 01:22:31 -0000 Author: jbeich Date: Sun Feb 24 01:22:24 2013 New Revision: 1187 Log: sync fixup Modified: trunk/mail/thunderbird/Makefile trunk/mail/thunderbird/distinfo trunk/mail/thunderbird/files/patch-bug807492 trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp trunk/www/seamonkey-i18n/distinfo Modified: trunk/mail/thunderbird/Makefile ============================================================================== --- trunk/mail/thunderbird/Makefile Sat Feb 23 23:41:44 2013 (r1186) +++ trunk/mail/thunderbird/Makefile Sun Feb 24 01:22:24 2013 (r1187) @@ -38,6 +38,7 @@ USE_BZIP2= yes USE_GMAKE= yes USE_GL= gl +USE_DOS2UNIX= mozilla/media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \ Modified: trunk/mail/thunderbird/distinfo ============================================================================== --- trunk/mail/thunderbird/distinfo Sat Feb 23 23:41:44 2013 (r1186) +++ trunk/mail/thunderbird/distinfo Sun Feb 24 01:22:24 2013 (r1187) @@ -1,4 +1,4 @@ SHA256 (thunderbird-19.0b1.source.tar.bz2) = e200382789f1af417065a0f523902b660e1b7e03e31e3059adcc98db827df158 SIZE (thunderbird-19.0b1.source.tar.bz2) = 121440940 -SHA256 (enigmail-1.5.0.tar.gz) = 51f55573448586718c8d7e664329d519b02c4b28af4910bcb550961ace9a9e71 -SIZE (enigmail-1.5.0.tar.gz) = 1216071 +SHA256 (enigmail-1.5.1.tar.gz) = 234ca3c8f7c74afb64ebdaa4762e358f35a72c1f8de007b992497fc2db803af0 +SIZE (enigmail-1.5.1.tar.gz) = 1213954 Modified: trunk/mail/thunderbird/files/patch-bug807492 ============================================================================== --- trunk/mail/thunderbird/files/patch-bug807492 Sat Feb 23 23:41:44 2013 (r1186) +++ trunk/mail/thunderbird/files/patch-bug807492 Sun Feb 24 01:22:24 2013 (r1187) @@ -446,25 +446,15 @@ index bcb1ec0..bb73591 100644 --- mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h +++ mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h -@@ -28,17 +28,17 @@ - * - * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $FreeBSD: src/sys/sys/queue.h,v 1.58 2004/04/07 04:19:49 imp Exp $ - */ - - #ifndef _SYS_QUEUE_H_ - #define _SYS_QUEUE_H_ - +@@ -33,5 +33,5 @@ + #define _SYS_QUEUE_H_ + -#ifndef DARWIN +#if !defined(BSD) && !defined(DARWIN) #include #define __offsetof offsetof #endif - - #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ - for ((var) = STAILQ_FIRST((head)); \ - (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ - (var) = (tvar)) + diff --git media/mtransport/third_party/nrappkit/src/util/util.c media/mtransport/third_party/nrappkit/src/util/util.c index 3aced8b..be020bb 100644 --- mozilla/media/mtransport/third_party/nrappkit/src/util/util.c Modified: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp Sat Feb 23 23:41:44 2013 (r1186) +++ trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp Sun Feb 24 01:22:24 2013 (r1187) @@ -1,16 +1,16 @@ --- mozilla/media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp~ +++ mozilla/media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp @@ -21,6 +21,13 @@ Scott McMurray - #include "constants.hpp" - #include - -+#ifdef __FreeBSD__ -+# include -+# if __FreeBSD_version < 900506 -+# define getchar boost_getchar -+# endif -+#endif -+ - namespace boost { - namespace detail { - //This only works on unsigned data types + #include "constants.hpp" + #include + ++#ifdef __FreeBSD__ ++# include ++# if __FreeBSD_version < 900506 ++# define getchar boost_getchar ++# endif ++#endif ++ + namespace boost { + namespace detail { + //This only works on unsigned data types Modified: trunk/www/seamonkey-i18n/distinfo ============================================================================== --- trunk/www/seamonkey-i18n/distinfo Sat Feb 23 23:41:44 2013 (r1186) +++ trunk/www/seamonkey-i18n/distinfo Sun Feb 24 01:22:24 2013 (r1187) @@ -1,46 +1,46 @@ -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ca.langpack.xpi) = 6d50618890ce0e027a267a660acd5077bd92204ff51a633935dd2e14755bf548 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ca.langpack.xpi) = 774381 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.cs.langpack.xpi) = 8fccf87607c994fa17fbfe702b540bbb12b07634b2c04b37e0a557d2abe3f48f -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.cs.langpack.xpi) = 780635 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.de.langpack.xpi) = a505f3a527772e0fbabeeec22f9b897f884baf6f37387008cbb2f8f5a59fd122 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.de.langpack.xpi) = 803512 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.en-GB.langpack.xpi) = c212ae7470dde686171a22ebc2f453e24dbc983f56f232fe9bf5df32986f09fb -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.en-GB.langpack.xpi) = 749207 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.en-US.langpack.xpi) = 5a769a47423138f6906d33f286dc537127bd67d19a234b9c025c7427feeac52f -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.en-US.langpack.xpi) = 750320 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.es-AR.langpack.xpi) = 3886c630c357018a753e7811bfff7a2a0b8feb384cb1154cb054125429e7d6a5 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.es-AR.langpack.xpi) = 822641 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.es-ES.langpack.xpi) = 36f2f9b492bb090ef558e3cf2e50c0d4e67f8d438745fcf23828af611d880d24 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.es-ES.langpack.xpi) = 771022 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.fi.langpack.xpi) = 3f167297e49ea07e30c0a9344a78ecc36d41bf52645f826b87d721d21a8b70b9 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.fi.langpack.xpi) = 769725 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.fr.langpack.xpi) = 2ef7cef1d5c10c19c007991873d4862d0f7be58852e40210393c8ecb84d4efde -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.fr.langpack.xpi) = 779197 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.hu.langpack.xpi) = 3c5692c45a0b5c5f57c05611d639b02974756fc00f344c66a507cd6b700ce46b -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.hu.langpack.xpi) = 814029 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.it.langpack.xpi) = 4b6ad130c007c39f77d4f0e4993e9d6972b80561f8d8535a8eed35c685a3fc80 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.it.langpack.xpi) = 720238 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ja-JP-mac.langpack.xpi) = bbda684ee88b8d6b10fc92fd78802b614b6ea476c36f8513a2316114ba6fbaf1 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ja-JP-mac.langpack.xpi) = 852408 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ja.langpack.xpi) = 49527887f98b0f7a0b062888474502067ffa65a1f82b54ead13ffd5eafd2f8d3 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ja.langpack.xpi) = 827550 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.lt.langpack.xpi) = 13870b04fdec8cff3b482ee1662ce9a4a18f8830902726e6ed4ed294862bf683 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.lt.langpack.xpi) = 793490 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.nb-NO.langpack.xpi) = b7e1d4cb09c7b178ceef9e46f21df0f01ecf605a253f419827d9ff1628edb4ac -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.nb-NO.langpack.xpi) = 768618 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.nl.langpack.xpi) = 7024a0e51f718e2b6d7780e16c173600abf9b7b15cd5a26ec32e20111a44fa76 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.nl.langpack.xpi) = 765521 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.pl.langpack.xpi) = c4e02b93829255fdf11b8d41ce406bf152f18187e4c4a5cd274add7c99413b2e -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.pl.langpack.xpi) = 815325 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.pt-PT.langpack.xpi) = e682683f36279888792b2a0bea5efb19c81f1c4577f3ee0860263ac4be29945a -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.pt-PT.langpack.xpi) = 801658 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ru.langpack.xpi) = 1d7f61ffb9fc39941ab6f4c33a72ce11799c6124b57a93cca37949b2e87bf018 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.ru.langpack.xpi) = 873512 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.sk.langpack.xpi) = 8ee2cbbe409af42d49d5867f1f099bd38db6c9fdb8b71b6d43433707c30ab913 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.sk.langpack.xpi) = 807146 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.sv-SE.langpack.xpi) = 10ca3e4aa7d6c6d9386ec336e1164d013459d4792989fb74d5ebdfe6034ba4ab -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.sv-SE.langpack.xpi) = 792884 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.tr.langpack.xpi) = b2f4e90228c06c85686b5f8d0fbf37105aceba9ce581930937892bb359a882b3 -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.tr.langpack.xpi) = 831669 -SHA256 (xpi/seamonkey-i18n-2.15/seamonkey-2.15.uk.langpack.xpi) = a047bed31c246951a43edf4889dc69c882612bf389f505b612d62457d0246cdd -SIZE (xpi/seamonkey-i18n-2.15/seamonkey-2.15.uk.langpack.xpi) = 831595 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ca.langpack.xpi) = e02e367cfa1cf2e3962410765f9978ba87d432638fa0676f4d419f762a78c669 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ca.langpack.xpi) = 777209 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.cs.langpack.xpi) = 96649b94ecaaf22fac7c9674b8db37a4b8c82784fc0b7ce9ad77a9958c68c45b +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.cs.langpack.xpi) = 782322 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.de.langpack.xpi) = c9a2b8be76b7f70b91c5dca606ccb9c9c3d465da1a3aa1ce67a613b508d925b8 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.de.langpack.xpi) = 805627 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.en-GB.langpack.xpi) = 5da43319f2d63a7c8256ea1cb7d26ea0c680afde5ccb4e3995f94702d552d73e +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.en-GB.langpack.xpi) = 751439 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.en-US.langpack.xpi) = 916e77dca508bd02dab76991cf2b4a6a1cbf8ce9357e93c6d93ccb377c651230 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.en-US.langpack.xpi) = 752024 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.es-AR.langpack.xpi) = 4b7dfa49f05760cb6722a9544a09c3202073f40cfafd3282a1ffdf423058d72a +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.es-AR.langpack.xpi) = 824333 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.es-ES.langpack.xpi) = 0023c3c49089cb15794c6723cece84b5f4032f35d961852821c23d1177ad170f +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.es-ES.langpack.xpi) = 772662 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.fi.langpack.xpi) = 41612f0ef771daba34d38896239f1446679b1c411dc9053f9153bf7910ae4437 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.fi.langpack.xpi) = 772027 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.fr.langpack.xpi) = 0461b666df8cc0f28024df329d87f8a3403c6581535ffa4996a34d9d2b0a1e38 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.fr.langpack.xpi) = 781405 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.hu.langpack.xpi) = 7b65c00bda86527c167cb763bbc9b2f2ba4b20109f8c8735f377fac5b081db15 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.hu.langpack.xpi) = 816446 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.it.langpack.xpi) = 7719d2255f43ab085747153ed770e26cdc173e764bbd8ba1afb22bd5223ed24b +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.it.langpack.xpi) = 721930 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ja-JP-mac.langpack.xpi) = 284c7b0b8c6170bf7f1de4ebd7b9e6c56707815b8fa2ff1c17bc6201442c4bbd +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ja-JP-mac.langpack.xpi) = 854852 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ja.langpack.xpi) = 12fbad03a2b868491fc83c5ddc00fe0f6ea9c9a0c3c2a670ef714889750df23a +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ja.langpack.xpi) = 829870 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.lt.langpack.xpi) = 851a3d6d1e82482d6998c2f7f22f8c5ffc5e95f1a05a23b49a661a5c3df695d8 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.lt.langpack.xpi) = 795358 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.nb-NO.langpack.xpi) = 264bac89d8cb25b9c0c6e20b816ecfe3811746026be242f47b90b4ea8f09152f +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.nb-NO.langpack.xpi) = 772249 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.nl.langpack.xpi) = b0db8fc017f807bf3b011b79cb8040b3e53bc77522cc8803ec0af4b927876060 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.nl.langpack.xpi) = 767742 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.pl.langpack.xpi) = 3ef35349ceb6603c91882707b36453511de3eb9ce5910f25f712ae497dd700ed +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.pl.langpack.xpi) = 813178 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.pt-PT.langpack.xpi) = f3fa3d272772898a4daa74a7b135198f99f8b060574ffb02849ccd78d043a880 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.pt-PT.langpack.xpi) = 805319 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ru.langpack.xpi) = 49d580909b61526ac271472826b2b659b85aaf419cb21977cdd185eba531e3f5 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.ru.langpack.xpi) = 875919 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.sk.langpack.xpi) = 3c420a328427db54528dbf168ae6389da581cda45c17d75c7eaa098714552bda +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.sk.langpack.xpi) = 808953 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.sv-SE.langpack.xpi) = 4fb1abdf5018e8d4037403ac22a35ac22850904609d8d7b27c5601b835c08284 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.sv-SE.langpack.xpi) = 795061 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.tr.langpack.xpi) = fc600b1adde387315e060c31a7a6c5394f6804aa7cb050655cfb25111dda96a1 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.tr.langpack.xpi) = 834967 +SHA256 (xpi/seamonkey-i18n-2.16/seamonkey-2.16.uk.langpack.xpi) = 8c7d5af2ea2c2b751ca12e175cc78bec7ac84eeb378c3c9c54c62d9659a7d440 +SIZE (xpi/seamonkey-i18n-2.16/seamonkey-2.16.uk.langpack.xpi) = 835210 From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 01:22:41 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7ACB5A91 for ; Sun, 24 Feb 2013 01:22:41 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 209C2D6A for ; Sun, 24 Feb 2013 01:22:40 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1O1MeP6051516 for ; Sun, 24 Feb 2013 01:22:40 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1O1MZ29050696 for freebsd-gecko@freebsd.org; Sun, 24 Feb 2013 01:22:35 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Sun, 24 Feb 2013 01:22:35 GMT Message-Id: <201302240122.r1O1MZ29050696@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1188 - in trunk: mail/thunderbird-esr-i18n mail/thunderbird-i18n www/firefox-esr-i18n www/firefox-i18n www/seamonkey-i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 01:22:41 -0000 Author: jbeich Date: Sun Feb 24 01:22:34 2013 New Revision: 1188 Log: make do-extract less verbose Modified: trunk/mail/thunderbird-esr-i18n/Makefile trunk/mail/thunderbird-i18n/Makefile trunk/www/firefox-esr-i18n/Makefile trunk/www/firefox-i18n/Makefile trunk/www/seamonkey-i18n/Makefile Modified: trunk/mail/thunderbird-esr-i18n/Makefile ============================================================================== --- trunk/mail/thunderbird-esr-i18n/Makefile Sun Feb 24 01:22:24 2013 (r1187) +++ trunk/mail/thunderbird-esr-i18n/Makefile Sun Feb 24 01:22:34 2013 (r1188) @@ -53,7 +53,7 @@ @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} ${WRKSRC} @for lang in ${THUNDERBIRD_I18N_}; do \ - if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\ + if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\ then \ exit 1; \ fi; \ Modified: trunk/mail/thunderbird-i18n/Makefile ============================================================================== --- trunk/mail/thunderbird-i18n/Makefile Sun Feb 24 01:22:24 2013 (r1187) +++ trunk/mail/thunderbird-i18n/Makefile Sun Feb 24 01:22:34 2013 (r1188) @@ -52,7 +52,7 @@ @${RM} -rf ${WRKDIR} @${MKDIR} ${WRKDIR} ${WRKSRC} @for lang in ${THUNDERBIRD_I18N_}; do \ - if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\ + if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@thunderbird.mozilla.org);\ then \ exit 1; \ fi; \ Modified: trunk/www/firefox-esr-i18n/Makefile ============================================================================== --- trunk/www/firefox-esr-i18n/Makefile Sun Feb 24 01:22:24 2013 (r1187) +++ trunk/www/firefox-esr-i18n/Makefile Sun Feb 24 01:22:34 2013 (r1188) @@ -51,7 +51,7 @@ do-extract: @${MKDIR} ${WRKSRC} @for lang in ${FIREFOX_I18N_}; do \ - if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\ + if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\ then \ exit 1; \ fi; \ Modified: trunk/www/firefox-i18n/Makefile ============================================================================== --- trunk/www/firefox-i18n/Makefile Sun Feb 24 01:22:24 2013 (r1187) +++ trunk/www/firefox-i18n/Makefile Sun Feb 24 01:22:34 2013 (r1188) @@ -50,7 +50,7 @@ do-extract: @${MKDIR} ${WRKSRC} @for lang in ${FIREFOX_I18N_}; do \ - if ! (${EXTRACT_CMD} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\ + if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$lang.xpi -d ${WRKSRC}/langpack-$$lang@firefox.mozilla.org);\ then \ exit 1; \ fi; \ Modified: trunk/www/seamonkey-i18n/Makefile ============================================================================== --- trunk/www/seamonkey-i18n/Makefile Sun Feb 24 01:22:24 2013 (r1187) +++ trunk/www/seamonkey-i18n/Makefile Sun Feb 24 01:22:34 2013 (r1188) @@ -49,7 +49,7 @@ do-extract: @${MKDIR} ${WRKSRC} @for lang in ${SEAMONKEY_I18N_}; do \ - if ! (${EXTRACT_CMD} ${_DISTDIR}/seamonkey-${PORTVERSION}.$$lang.langpack.xpi -d ${WRKSRC}/langpack-$$lang@seamonkey.mozilla.org);\ + if ! (${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/seamonkey-${PORTVERSION}.$$lang.langpack.xpi -d ${WRKSRC}/langpack-$$lang@seamonkey.mozilla.org);\ then \ exit 1; \ fi; \ From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 03:54:23 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 82CED5E1 for ; Sun, 24 Feb 2013 03:54:23 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id D8A9A11F1 for ; Sun, 24 Feb 2013 03:54:22 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1O3sK5P050681 for ; Sun, 24 Feb 2013 03:54:20 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1O3sFMO049640 for freebsd-gecko@freebsd.org; Sun, 24 Feb 2013 03:54:15 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Sun, 24 Feb 2013 03:54:15 GMT Message-Id: <201302240354.r1O3sFMO049640@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1189 - in trunk/www: firefox-nightly/files firefox/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 03:54:23 -0000 Author: jbeich Date: Sun Feb 24 03:54:15 2013 New Revision: 1189 Log: r1183 followup: more freebsd 9.0 fixes from upstream Added: trunk/www/firefox-nightly/files/patch-bug836824 trunk/www/firefox/files/patch-bug827521 trunk/www/firefox/files/patch-bug836824 Deleted: trunk/www/firefox-nightly/files/patch-media-libsoundtouch-src-cpu_detect_x86.cpp trunk/www/firefox/files/patch-media-libsoundtouch-src-cpu_detect_x86.cpp Added: trunk/www/firefox-nightly/files/patch-bug836824 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/firefox-nightly/files/patch-bug836824 Sun Feb 24 03:54:15 2013 (r1189) @@ -0,0 +1,33 @@ +commit 35107a0 (HEAD) +Author: Paul Adenot +Date: Mon Feb 4 20:21:19 2013 +0100 + + Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r= +--- + media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++ + media/libsoundtouch/src/cpu_detect_x86.cpp | 5 ++++- + 2 files changed, 28 insertions(+), 1 deletion(-) + +diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp +index a42008e..7a31aa9 100644 +--- media/libsoundtouch/src/cpu_detect_x86.cpp ++++ media/libsoundtouch/src/cpu_detect_x86.cpp +@@ -101,7 +101,7 @@ uint detectCPUextensions(void) + + uint res = 0; + +-#if defined(__GNUC__) ++#if defined(__GNUC__) && defined(HAVE_CPUID_H) + // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. + uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. + +@@ -112,6 +112,9 @@ uint detectCPUextensions(void) + if (edx & bit_SSE) res = res | SUPPORT_SSE; + if (edx & bit_SSE2) res = res | SUPPORT_SSE2; + ++#elif defined(__GNUC__) ++ // No cpuid.h --> no cpuid support ++ return 0; + #else + // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required + // for __cpuid intrinsic support. Deleted: trunk/www/firefox-nightly/files/patch-media-libsoundtouch-src-cpu_detect_x86.cpp ============================================================================== --- trunk/www/firefox-nightly/files/patch-media-libsoundtouch-src-cpu_detect_x86.cpp Sun Feb 24 03:54:15 2013 (r1188) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,14 +0,0 @@ ---- media/libsoundtouch/src/cpu_detect_x86.cpp~ -+++ media/libsoundtouch/src/cpu_detect_x86.cpp -@@ -101,7 +101,10 @@ uint detectCPUextensions(void) - - uint res = 0; - --#if defined(__GNUC__) -+#if defined(__clang__) && __clang_minor__ == 0 -+ // No __get_cpuid() on FreeBSD 9.0 with Clang 3.0 -+ return 0; -+#elif defined(__GNUC__) - // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. - uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. - Added: trunk/www/firefox/files/patch-bug827521 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/firefox/files/patch-bug827521 Sun Feb 24 03:54:15 2013 (r1189) @@ -0,0 +1,147 @@ +commit ab46441 +Author: Graeme McCutcheon +Date: Thu Jan 10 14:37:30 2013 +0000 + + Bug 827521 - Work around spurious operator ambiguity errors in buggy versions of Clang. r=longsonr +--- + .../svg/content/src/SVGAnimatedPreserveAspectRatio.cpp | 17 ++++++++--------- + .../svg/content/src/SVGAnimatedPreserveAspectRatio.h | 7 +++---- + content/svg/content/src/SVGPreserveAspectRatio.h | 17 +++++++++++++---- + 3 files changed, 24 insertions(+), 17 deletions(-) + +diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +index 6593461..56956b2 100644 +--- content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp ++++ content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +@@ -54,7 +54,7 @@ GetAlignForString(const nsAString &aAlignString) + { + for (uint32_t i = 0 ; i < ArrayLength(sAlignStrings) ; i++) { + if (aAlignString.EqualsASCII(sAlignStrings[i])) { +- return (i + SVG_PRESERVEASPECTRATIO_NONE); ++ return (i + SVG_ALIGN_MIN_VALID); + } + } + +@@ -65,12 +65,11 @@ static void + GetAlignString(nsAString& aAlignString, uint16_t aAlign) + { + NS_ASSERTION( +- aAlign >= SVG_PRESERVEASPECTRATIO_NONE && +- aAlign <= SVG_PRESERVEASPECTRATIO_XMAXYMAX, ++ aAlign >= SVG_ALIGN_MIN_VALID && aAlign <= SVG_ALIGN_MAX_VALID, + "Unknown align"); + + aAlignString.AssignASCII( +- sAlignStrings[aAlign - SVG_PRESERVEASPECTRATIO_NONE]); ++ sAlignStrings[aAlign - SVG_ALIGN_MIN_VALID]); + } + + static uint16_t +@@ -78,7 +77,7 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice) + { + for (uint32_t i = 0 ; i < ArrayLength(sMeetOrSliceStrings) ; i++) { + if (aMeetOrSlice.EqualsASCII(sMeetOrSliceStrings[i])) { +- return (i + SVG_MEETORSLICE_MEET); ++ return (i + SVG_MEETORSLICE_MIN_VALID); + } + } + +@@ -89,12 +88,12 @@ static void + GetMeetOrSliceString(nsAString& aMeetOrSliceString, uint16_t aMeetOrSlice) + { + NS_ASSERTION( +- aMeetOrSlice >= SVG_MEETORSLICE_MEET && +- aMeetOrSlice <= SVG_MEETORSLICE_SLICE, ++ aMeetOrSlice >= SVG_MEETORSLICE_MIN_VALID && ++ aMeetOrSlice <= SVG_MEETORSLICE_MAX_VALID, + "Unknown meetOrSlice"); + + aMeetOrSliceString.AssignASCII( +- sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MEET]); ++ sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MIN_VALID]); + } + + already_AddRefed +@@ -226,7 +225,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString( + GetAlignString(tmpString, mBaseVal.mAlign); + aValueAsString.Append(tmpString); + +- if (mBaseVal.mAlign != SVG_PRESERVEASPECTRATIO_NONE) { ++ if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) { + + aValueAsString.AppendLiteral(" "); + GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice); +diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.h content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +index 61cfba7..b08fb60 100644 +--- content/svg/content/src/SVGAnimatedPreserveAspectRatio.h ++++ content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +@@ -42,8 +42,7 @@ public: + void SetBaseValue(const SVGPreserveAspectRatio &aValue, + nsSVGElement *aSVGElement); + nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) { +- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE || +- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) { ++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) { + return NS_ERROR_FAILURE; + } + SetBaseValue(SVGPreserveAspectRatio( +@@ -53,8 +52,8 @@ public: + return NS_OK; + } + nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) { +- if (aMeetOrSlice < SVG_MEETORSLICE_MEET || +- aMeetOrSlice > SVG_MEETORSLICE_SLICE) { ++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID || ++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) { + return NS_ERROR_FAILURE; + } + SetBaseValue(SVGPreserveAspectRatio( +diff --git content/svg/content/src/SVGPreserveAspectRatio.h content/svg/content/src/SVGPreserveAspectRatio.h +index 066ad52..ebe724e 100644 +--- content/svg/content/src/SVGPreserveAspectRatio.h ++++ content/svg/content/src/SVGPreserveAspectRatio.h +@@ -28,6 +28,11 @@ enum SVGAlign MOZ_ENUM_TYPE(uint8_t) { + SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10 + }; + ++// These constants represent the range of valid enum values for the ++// parameter. They exclude the sentinel _UNKNOWN value. ++const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE; ++const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX; ++ + // Meet-or-slice Types + enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) { + SVG_MEETORSLICE_UNKNOWN = 0, +@@ -35,6 +40,11 @@ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) { + SVG_MEETORSLICE_SLICE = 2 + }; + ++// These constants represent the range of valid enum values for the ++// parameter. They exclude the sentinel _UNKNOWN value. ++const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET; ++const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE; ++ + class SVGAnimatedPreserveAspectRatio; + + class SVGPreserveAspectRatio MOZ_FINAL +@@ -57,8 +67,7 @@ public: + {} + + nsresult SetAlign(uint16_t aAlign) { +- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE || +- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) ++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) + return NS_ERROR_FAILURE; + mAlign = static_cast(aAlign); + return NS_OK; +@@ -69,8 +78,8 @@ public: + } + + nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) { +- if (aMeetOrSlice < SVG_MEETORSLICE_MEET || +- aMeetOrSlice > SVG_MEETORSLICE_SLICE) ++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID || ++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) + return NS_ERROR_FAILURE; + mMeetOrSlice = static_cast(aMeetOrSlice); + return NS_OK; Added: trunk/www/firefox/files/patch-bug836824 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/firefox/files/patch-bug836824 Sun Feb 24 03:54:15 2013 (r1189) @@ -0,0 +1,33 @@ +commit 35107a0 (HEAD) +Author: Paul Adenot +Date: Mon Feb 4 20:21:19 2013 +0100 + + Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r= +--- + media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++ + media/libsoundtouch/src/cpu_detect_x86.cpp | 5 ++++- + 2 files changed, 28 insertions(+), 1 deletion(-) + +diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp +index a42008e..7a31aa9 100644 +--- media/libsoundtouch/src/cpu_detect_x86.cpp ++++ media/libsoundtouch/src/cpu_detect_x86.cpp +@@ -101,7 +101,7 @@ uint detectCPUextensions(void) + + uint res = 0; + +-#if defined(__GNUC__) ++#if defined(__GNUC__) && defined(HAVE_CPUID_H) + // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. + uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. + +@@ -112,6 +112,9 @@ uint detectCPUextensions(void) + if (edx & bit_SSE) res = res | SUPPORT_SSE; + if (edx & bit_SSE2) res = res | SUPPORT_SSE2; + ++#elif defined(__GNUC__) ++ // No cpuid.h --> no cpuid support ++ return 0; + #else + // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required + // for __cpuid intrinsic support. Deleted: trunk/www/firefox/files/patch-media-libsoundtouch-src-cpu_detect_x86.cpp ============================================================================== --- trunk/www/firefox/files/patch-media-libsoundtouch-src-cpu_detect_x86.cpp Sun Feb 24 03:54:15 2013 (r1188) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,14 +0,0 @@ ---- media/libsoundtouch/src/cpu_detect_x86.cpp~ -+++ media/libsoundtouch/src/cpu_detect_x86.cpp -@@ -101,7 +101,10 @@ uint detectCPUextensions(void) - - uint res = 0; - --#if defined(__GNUC__) -+#if defined(__clang__) && __clang_minor__ == 0 -+ // No __get_cpuid() on FreeBSD 9.0 with Clang 3.0 -+ return 0; -+#elif defined(__GNUC__) - // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. - uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. - From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 04:00:11 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 651CE73D for ; Sun, 24 Feb 2013 04:00:11 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id EE63D121C for ; Sun, 24 Feb 2013 04:00:10 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1O409Nq095482 for ; Sun, 24 Feb 2013 04:00:09 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1O404XW095097 for freebsd-gecko@freebsd.org; Sun, 24 Feb 2013 04:00:04 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Sun, 24 Feb 2013 04:00:04 GMT Message-Id: <201302240400.r1O404XW095097@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1190 - trunk/mail/thunderbird MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 04:00:11 -0000 Author: jbeich Date: Sun Feb 24 04:00:04 2013 New Revision: 1190 Log: there was never thunderbird 19.0 released Modified: trunk/mail/thunderbird/Makefile Modified: trunk/mail/thunderbird/Makefile ============================================================================== --- trunk/mail/thunderbird/Makefile Sun Feb 24 03:54:15 2013 (r1189) +++ trunk/mail/thunderbird/Makefile Sun Feb 24 04:00:04 2013 (r1190) @@ -2,7 +2,7 @@ # $FreeBSD: head/mail/thunderbird/Makefile 310165 2013-01-09 23:28:19Z flo $ PORTNAME= thunderbird -DISTVERSION= 19.0 +DISTVERSION= 19.0b1 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 05:40:24 2013 Return-Path: Delivered-To: gecko@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AA530E7C; Sun, 24 Feb 2013 05:40:24 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8384E15C7; Sun, 24 Feb 2013 05:40:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1O5eOON032011; Sun, 24 Feb 2013 05:40:24 GMT (envelope-from edwin@freefall.freebsd.org) Received: (from edwin@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1O5eOl3032007; Sun, 24 Feb 2013 05:40:24 GMT (envelope-from edwin) Date: Sun, 24 Feb 2013 05:40:24 GMT Message-Id: <201302240540.r1O5eOl3032007@freefall.freebsd.org> To: edwin@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org, gecko@FreeBSD.org From: edwin@FreeBSD.org Subject: Re: ports/176315: security/nss broken on FreeBSD 8 due to wrong compiler flags X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 05:40:24 -0000 Synopsis: security/nss broken on FreeBSD 8 due to wrong compiler flags Responsible-Changed-From-To: freebsd-ports-bugs->gecko Responsible-Changed-By: edwin Responsible-Changed-When: Sun Feb 24 05:40:24 UTC 2013 Responsible-Changed-Why: Over to maintainer (via the GNATS Auto Assign Tool) http://www.freebsd.org/cgi/query-pr.cgi?pr=176315 From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 12:52:07 2013 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4D291621; Sun, 24 Feb 2013 12:52:07 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0DA1FA1; Sun, 24 Feb 2013 12:52:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1U9b3e-00082G-G0; Sun, 24 Feb 2013 15:51:59 +0300 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=M67/D8JGFfEe7w6VsspZijObRVgrvdBcuWnsEPaCDu4=; b=TpwtjQ3o0rgOaTAYAM/ifNQuBLy1GeOEOC8w48SbJFhkDyHgv8ei6JXnyCTq9I3EyP9YXBtb0922gIv7yJmKR4e+3oweD9kFNCGxXw492BRnO6rHs0rYAaoolP6CvJ04RDUmsMcmgqjv+Ckayxo9Yvn7zaYpdf3hFgF0vBRl7xU=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1U9b1B-0002sY-0j; Sun, 24 Feb 2013 12:49:27 +0000 From: Jan Beich To: ashish@FreeBSD.org (Ashish SHUKLA) Subject: Re: www/firefox failing to compile on 9.0-RELEASE (amd64) with system clang In-Reply-To: <86r4k7p19j.fsf@chateau.d.if> (Ashish SHUKLA's message of "Sat, 23 Feb 2013 19:42:40 +0530") Date: Sun, 24 Feb 2013 22:49:42 +1000 References: <86r4k7p19j.fsf@chateau.d.if> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1U9b1B-0002sY-0j@internal.tormail.org> Cc: gecko@FreeBSD.org X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 12:52:07 -0000 ashish@FreeBSD.org (Ashish SHUKLA) writes: > /wrkdirs/usr/ports/www/firefox/work/mozilla-release/security/manager/ssl/src/JARSignatureVerification.cpp:573:12: error: use of undeclared identifier 'gPIPNSSLog' > PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Failed to decode PKCS#7 item: %s", > ^ > /usr/local/include/nspr/prlog.h:177:23: note: expanded from: > if (PR_LOG_TEST(_module,_level)) { \ > ^ > /usr/local/include/nspr/prlog.h:166:7: note: expanded from: > ((_module)->level >= (_level)) > ^ Enable LOGGING again or wait for the following to land in ports repo. http://lists.freebsd.org/pipermail/freebsd-gecko/2013-February/003118.html From owner-freebsd-gecko@FreeBSD.ORG Sun Feb 24 13:29:46 2013 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from chateau.d.if (localhost [IPv6:::1]) by hub.freebsd.org (Postfix) with ESMTP id 7CF1D929; Sun, 24 Feb 2013 13:29:44 +0000 (UTC) (envelope-from ashish@freebsd.org) Received: from chateau.d.if (localhost [IPv6:::1]); by chateau.d.if (OpenSMTPD) with ESMTP id 1f58ecd9; Sun, 24 Feb 2013 18:59:31 +0530 (IST) From: ashish@FreeBSD.org (Ashish SHUKLA) To: Jan Beich Subject: Re: www/firefox failing to compile on 9.0-RELEASE (amd64) with system clang Organization: The FreeBSD Project References: <86r4k7p19j.fsf@chateau.d.if> <1U9b1B-0002sY-0j@internal.tormail.org> X-Face: )vGQ9yK7Y$Flebu1C>(B\gYBm)[$zfKM+p&TT[[JWl6:]S>cc$%-z7-`46Zf0B*syL.C]oCq[upTG~zuS0.$"_%)|Q@$hA=9{3l{%u^h3jJ^Zl; t7 X-Uptime: 6:58PM up 3:15, 11 users, load averages: 0.01, 0.02, 0.00 X-Operating-System: FreeBSD/FreeBSD 9.1-RC3/amd64 X-OpenPGP-Fingerprint: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 X-Attribution: =?utf-8?B?4KSG4KS24KWA4KS3?= Organisation: The FreeBSD Project X-Hashcash: 1:20:130224:gecko@freebsd.org::GmYObHnW6hF6QYkH:000000000000000000000000000000000000000000005RV3 X-Hashcash: 1:20:130224:jbeich@tormail.org::JQ+nQWmVop4t/6yF:00000000000000000000000000000000000000000007cvI Date: Sun, 24 Feb 2013 18:59:25 +0530 In-Reply-To: <1U9b1B-0002sY-0j@internal.tormail.org> (Jan Beich's message of "Sun, 24 Feb 2013 22:49:42 +1000") Message-ID: <86hal1rgay.fsf@chateau.d.if> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (amd64-portbld-freebsd9.1) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEWpqal/f39tbW1jY2Md HR2goKCenp6UlJROTk7////9/f35+fnT09ORJdieAAACVklEQVQ4jXXUP2vbQBQA8AvUTkgz5OzY Z0iGWhpS6BSrkECn0mvx0MEJ6AjtYrfoBCVDlD8naJYmNlRfwZq8+mkKlIZaGpJSYmP7Q/XkJDrJ Td8i/H68u3vHPaPufwLdf32AMA4A6GcAgvAamY1pOJiDIFqicTwLswDhfr3uxfFtkAY/GFHPMwzD 8zpnACmIOnE6js7rQb+v4NJrG9od0C+QgpHMy5jBewV+UDSMWiw1Y4fWfyV7+NGFzDsYa3pth9LJ Q4XvXxFHcJRvHOmygn5NAEabnDcQQguarnfoiwSCJ99jmKKcphsZONmWsDK9Ro7cvZOCtQdg8nje egLhc2LNlkLmsezzTFUUy5w18ocox/f0LaLgJy0zO75zk+9pp85GAj36xjqhdI0y3tq2m4dqqcWX zQWBTz8L1irvolXV4J+3q7eCDgVnttjNq6X8H+9KOZsuNk1uCzx8pSp+E9HImfJOTLdcGqo+YKnG EIovizkEn48V7BO+ch2DXcD4ENSpWiU+q8hjjbgTBZCXnZtyj0Ws4Q1Q0B2WXFtYZo65Bbyeeldw RS6qFueM80LlLA29YlVwGRYvFD+kwI/0O+A2PlpOP9GwslUVciHuYGechuBTp922YiDZCrghTknm XSyOM+D3aoRZlo0Jb42zY7DN4p2x4AeZ+QAYutx1sHwTHzMT5cMNduQ9yW3GczN4KZ86kb0c9O8T yXDeFqpl2fryPEAYGXIlezAPXYh2NgVr/gvdoHIuDwuPwOhcWE8f8mmICq41eATkn8x0kuRTIKcB wE9+/QUtiiAnYcaN7wAAAABJRU5ErkJggg== MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Cc: gecko@FreeBSD.org X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2013 13:29:46 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jan Beich writes: > ashish@FreeBSD.org (Ashish SHUKLA) writes: >> /wrkdirs/usr/ports/www/firefox/work/mozilla-release/security/manager/ssl= /src/JARSignatureVerification.cpp:573:12: error: use of undeclared identifi= er 'gPIPNSSLog' >> PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Failed to decode PKCS#7 item: %s", >> ^ >> /usr/local/include/nspr/prlog.h:177:23: note: expanded from: >> if (PR_LOG_TEST(_module,_level)) { \ >> ^ >> /usr/local/include/nspr/prlog.h:166:7: note: expanded from: >> ((_module)->level >=3D (_level)) >> ^ > Enable LOGGING again or wait for the following to land in ports repo. > http://lists.freebsd.org/pipermail/freebsd-gecko/2013-February/003118.html Hi Jan, Thanks, flo mentioned it to me yesterday on IRC, and it worked after disabl= ing DEBUG. Thanks =2D-=20 Ashish SHUKLA | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0 Sent from my Emacs --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBCgAGBQJRKhW5AAoJEMdGz6nnT6Swx4YQAMALsViwoZ7eUTXxGJP9N7l+ 1Z4B9uMhHQGMoC9TReKvCPqO5gmxkWZGFXuE2H8vkj6U/JU0P8NJFSdLoJCXe6TS t2PmDyMG9EGA3IL6ldOrB/sBsD3A6BlmQs5l8VThwiYun8iIP6yrs3OkNcAvaarA Mol/YhJfLrP7TzIUXNQV0jnedzSY4bBIMYwjBTZSxr/vpOPHwFpnHksYExJBKGQD mQ7R0x45kLKBSZB3bfSvdylWaBcRnf4f/4QCDO3ws+EeDhajdhgYztCspQrdypc4 VCUK4wY30aMAdWHkGWTgqbF2vfAz5fCxsx6zN7kV36SU0tBSqhPxZkfD/r562RXd vVoHZLio4883lTDyeIb7sTJSD5WHQ8HdoK7m2/a6CZAec5Fkl7v5pBNDCZew33Oy 1b93Vp9Bu1voEDMQYZ+YjkUDDdXQIhwKgiB1GrEGtZh/XThVLbPdk7W79CqBB1TJ FFXSUSJb5H26QGs+xb6dfw7GXrV05I1FFbxnhqBL8DXOm1ERSltmir+jxAqPjdhH jETMuIi2KLychYvW2tdxCzNtwdQkdhLBClAdeiMr+xksoZo2qOJd0BH44zduhGEg mWs+tZgivhILeAMgyiwsQ+XUj6JpDh4ZJoEnLDiH5d3Umlit+/Sso0icdioe/Shq 58N4FwHWwytta6EeHs99 =y/Xg -----END PGP SIGNATURE----- --=-=-=-- From owner-freebsd-gecko@FreeBSD.ORG Mon Feb 25 11:07:04 2013 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 93C8A391 for ; Mon, 25 Feb 2013 11:07:04 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 87231EA3 for ; Mon, 25 Feb 2013 11:07:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1PB749O066924 for ; Mon, 25 Feb 2013 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1PB74Wh066922 for gecko@FreeBSD.org; Mon, 25 Feb 2013 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 25 Feb 2013 11:07:04 GMT Message-Id: <201302251107.r1PB74Wh066922@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: gecko@FreeBSD.org Subject: Current problem reports assigned to gecko@FreeBSD.org X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 11:07:04 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ports/176315 gecko security/nss broken on FreeBSD 8 due to wrong compiler o ports/175421 gecko workaround: www/firefox is MAKE_JOBS_SAFE but never us o ports/170402 gecko www/linux-firefox: crash with flashplugin o ports/170310 gecko mail/thunderbird: coredump/crash when used with OpenLD o ports/169729 gecko www/firefox-esr "make package" produces package with z o ports/169366 gecko www/xpi-* ports need re-install after each Firefox upd o ports/168091 gecko Mk/bsd.gecko.mk error: USE_FIREFOX doesn't work correc f ports/165263 gecko mail/thunderbird: core dumping most time when users ar o ports/164239 gecko [PATCH] mail/thunderbird: crash with nss_ldap o ports/160387 gecko security/ca_root_nss: Allow user to trust extra local f ports/155949 gecko www/firefox: firefox 4, WITH_PGO, better Text against o ports/144044 gecko [PATCH] www/firefox: Makefile.webplugins target order 12 problems total. From owner-freebsd-gecko@FreeBSD.ORG Mon Feb 25 16:39:28 2013 Return-Path: Delivered-To: gecko@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 28009AD0; Mon, 25 Feb 2013 16:39:28 +0000 (UTC) (envelope-from flo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id DCB55847; Mon, 25 Feb 2013 16:39:27 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1PGdRqB049945; Mon, 25 Feb 2013 16:39:27 GMT (envelope-from flo@freefall.freebsd.org) Received: (from flo@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1PGdRur049941; Mon, 25 Feb 2013 16:39:27 GMT (envelope-from flo) Date: Mon, 25 Feb 2013 16:39:27 GMT Message-Id: <201302251639.r1PGdRur049941@freefall.freebsd.org> To: etteldor@gmail.com, flo@FreeBSD.org, gecko@FreeBSD.org From: flo@FreeBSD.org Subject: Re: ports/176315: security/nss broken on FreeBSD 8 due to wrong compiler flags X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 16:39:28 -0000 Synopsis: security/nss broken on FreeBSD 8 due to wrong compiler flags State-Changed-From-To: open->closed State-Changed-By: flo State-Changed-When: Mon Feb 25 16:39:26 UTC 2013 State-Changed-Why: This was fixed a few days ago. Please update your ports tree and try again. http://www.freebsd.org/cgi/query-pr.cgi?pr=176315 From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 26 04:18:45 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2CDA6328 for ; Tue, 26 Feb 2013 04:18:45 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 657FDB16 for ; Tue, 26 Feb 2013 04:18:44 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1Q4IaHf067615 for ; Tue, 26 Feb 2013 04:18:36 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1Q4IUh4065675 for freebsd-gecko@freebsd.org; Tue, 26 Feb 2013 04:18:30 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Tue, 26 Feb 2013 04:18:30 GMT Message-Id: <201302260418.r1Q4IUh4065675@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1191 - in trunk: mail/thunderbird/files www/firefox-nightly/files www/firefox/files www/seamonkey/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 04:18:45 -0000 Author: jbeich Date: Tue Feb 26 04:18:30 2013 New Revision: 1191 Log: (wip) allow pulseaudio with webrtc Added: trunk/mail/thunderbird/files/patch-bug844818 trunk/www/firefox-nightly/files/patch-bug844818 trunk/www/firefox/files/patch-bug844818 trunk/www/seamonkey/files/patch-bug844818 Modified: trunk/mail/thunderbird/files/patch-bug807492 trunk/www/firefox-nightly/files/patch-bug807492 trunk/www/firefox/files/patch-bug807492 trunk/www/seamonkey/files/patch-bug807492 Modified: trunk/mail/thunderbird/files/patch-bug807492 ============================================================================== --- trunk/mail/thunderbird/files/patch-bug807492 Sun Feb 24 04:00:04 2013 (r1190) +++ trunk/mail/thunderbird/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) @@ -750,7 +750,7 @@ index 9ca9f7c..d5c4ab9 100644 --- mozilla/media/webrtc/trunk/src/build/common.gypi +++ mozilla/media/webrtc/trunk/src/build/common.gypi -@@ -101,16 +101,23 @@ +@@ -101,16 +101,21 @@ 'enable_protobuf%': 1, 'include_tests%': 1, @@ -760,10 +760,8 @@ 'clang_use_chrome_plugins%': 0, }], + ['OS=="linux" or OS=="solaris" or os_bsd==1', { -+ 'include_alsa_audio%': 1, + 'include_v4l2_video_capture%': 1, + }, { -+ 'include_alsa_audio%': 0, + 'include_v4l2_video_capture%': 0, + }], ], # conditions @@ -803,68 +801,6 @@ 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], -diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -index 8457737..4d0f322 100644 ---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -@@ -41,21 +41,25 @@ - 'audio_device_utility.h', - 'audio_device_impl.cc', - 'audio_device_impl.h', - 'audio_device_config.h', - 'dummy/audio_device_dummy.h', - 'dummy/audio_device_utility_dummy.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['include_alsa_audio==1', { - 'include_dirs': [ - 'linux', - ], -- }], # OS==linux -+ 'defines': [ -+ # avoiding pointless ifdef churn -+ 'WEBRTC_LINUX', -+ ], -+ }], # include_alsa_audio==1 - ['OS=="mac"', { - 'include_dirs': [ - 'mac', - ], - }], # OS==mac - ['OS=="win"', { - 'include_dirs': [ - 'win', -@@ -111,24 +115,26 @@ - 'link_settings': { - 'libraries': [ - '-llog', - '-lOpenSLES', - ], - }, - }], - ['OS=="linux"', { -- 'defines': [ -- 'LINUX_ALSA', -- ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, -+ }], -+ ['include_alsa_audio==1', { -+ 'defines': [ -+ 'LINUX_ALSA', -+ ], - 'conditions': [ - ['include_pulse_audio==1', { - 'defines': [ - 'LINUX_PULSE', - ], - 'sources': [ - 'linux/audio_device_pulse_linux.cc', - 'linux/audio_device_pulse_linux.h', diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc index 203f09a..0b0b70e 100644 --- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc Added: trunk/mail/thunderbird/files/patch-bug844818 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/mail/thunderbird/files/patch-bug844818 Tue Feb 26 04:18:30 2013 (r1191) @@ -0,0 +1,126 @@ +diff --git configure.in configure.in +index 7cd6e17..a1dbdf7 100644 +--- mozilla/configure.in ++++ mozilla/configure.in +@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th + fi + fi + ++# Keep libcubeb and audio_device backends in sync ++if test -n "$MOZ_ALSA"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0" ++fi ++if test -n "$MOZ_PULSEAUDIO"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0" ++fi ++ + # Don't try to compile sse4.1 code if toolchain doesn't support + if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then + EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" +diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +index 8457737..dfc83ff 100644 +--- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi ++++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +@@ -45,11 +45,15 @@ + 'dummy/audio_device_utility_dummy.h', + ], + 'conditions': [ +- ['OS=="linux"', { ++ ['include_alsa_audio==1 or include_pulse_audio==1', { + 'include_dirs': [ + 'linux', + ], +- }], # OS==linux ++ 'defines': [ ++ # avoid pointless rename ++ 'WEBRTC_LINUX', ++ ], ++ }], # include_alsa_audio==1 or include_pulse_audio==1 + ['OS=="mac"', { + 'include_dirs': [ + 'mac', +@@ -74,14 +78,8 @@ + }], + ['include_internal_audio_device==1', { + 'sources': [ +- 'linux/alsasymboltable_linux.cc', +- 'linux/alsasymboltable_linux.h', +- 'linux/audio_device_alsa_linux.cc', +- 'linux/audio_device_alsa_linux.h', + 'linux/audio_device_utility_linux.cc', + 'linux/audio_device_utility_linux.h', +- 'linux/audio_mixer_manager_alsa_linux.cc', +- 'linux/audio_mixer_manager_alsa_linux.h', + 'linux/latebindingsymboltable_linux.cc', + 'linux/latebindingsymboltable_linux.h', + 'mac/audio_device_mac.cc', +@@ -116,28 +114,36 @@ + }, + }], + ['OS=="linux"', { +- 'defines': [ +- 'LINUX_ALSA', +- ], + 'link_settings': { + 'libraries': [ + '-ldl', + ], + }, +- 'conditions': [ +- ['include_pulse_audio==1', { +- 'defines': [ +- 'LINUX_PULSE', +- ], +- 'sources': [ +- 'linux/audio_device_pulse_linux.cc', +- 'linux/audio_device_pulse_linux.h', +- 'linux/audio_mixer_manager_pulse_linux.cc', +- 'linux/audio_mixer_manager_pulse_linux.h', +- 'linux/pulseaudiosymboltable_linux.cc', +- 'linux/pulseaudiosymboltable_linux.h', +- ], +- }], ++ }], ++ ['include_alsa_audio==1', { ++ 'defines': [ ++ 'LINUX_ALSA', ++ ], ++ 'sources': [ ++ 'linux/alsasymboltable_linux.cc', ++ 'linux/alsasymboltable_linux.h', ++ 'linux/audio_device_alsa_linux.cc', ++ 'linux/audio_device_alsa_linux.h', ++ 'linux/audio_mixer_manager_alsa_linux.cc', ++ 'linux/audio_mixer_manager_alsa_linux.h', ++ ], ++ }], ++ ['include_pulse_audio==1', { ++ 'defines': [ ++ 'LINUX_PULSE', ++ ], ++ 'sources': [ ++ 'linux/audio_device_pulse_linux.cc', ++ 'linux/audio_device_pulse_linux.h', ++ 'linux/audio_mixer_manager_pulse_linux.cc', ++ 'linux/audio_mixer_manager_pulse_linux.h', ++ 'linux/pulseaudiosymboltable_linux.cc', ++ 'linux/pulseaudiosymboltable_linux.h', + ], + }], + ['OS=="mac"', { +diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi +index b504d3d..e2eb127 100644 +--- mozilla/media/webrtc/webrtc_config.gypi ++++ mozilla/media/webrtc/webrtc_config.gypi +@@ -9,7 +9,6 @@ + 'include_internal_video_render': 0, + 'clang_use_chrome_plugins': 0, + 'enable_protobuf': 0, +- 'include_pulse_audio': 0, + 'include_tests': 0, + 'use_system_libjpeg': 1, + 'use_system_libvpx': 1, Modified: trunk/www/firefox-nightly/files/patch-bug807492 ============================================================================== --- trunk/www/firefox-nightly/files/patch-bug807492 Sun Feb 24 04:00:04 2013 (r1190) +++ trunk/www/firefox-nightly/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) @@ -666,7 +666,7 @@ index 9ca9f7c..d5c4ab9 100644 --- media/webrtc/trunk/webrtc/build/common.gypi +++ media/webrtc/trunk/webrtc/build/common.gypi -@@ -119,16 +119,23 @@ +@@ -119,16 +119,21 @@ # flood of chromium-style warnings. Investigate enabling them: # http://code.google.com/p/webrtc/issues/detail?id=163 'clang_use_chrome_plugins%': 0, @@ -676,10 +676,8 @@ 'enable_android_opensl%': 0, }], + ['OS=="linux" or OS=="solaris" or os_bsd==1', { -+ 'include_alsa_audio%': 1, + 'include_v4l2_video_capture%': 1, + }, { -+ 'include_alsa_audio%': 0, + 'include_v4l2_video_capture%': 0, + }], ['OS=="ios"', { @@ -719,68 +717,6 @@ 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], -diff --git media/webrtc/trunk/src/modules/audio_device/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/audio_device.gypi -index 8457737..4d0f322 100644 ---- media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi -+++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi -@@ -40,21 +40,25 @@ - 'audio_device_utility.h', - 'audio_device_impl.cc', - 'audio_device_impl.h', - 'audio_device_config.h', - 'dummy/audio_device_dummy.h', - 'dummy/audio_device_utility_dummy.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['include_alsa_audio==1', { - 'include_dirs': [ - 'linux', - ], -- }], # OS==linux -+ 'defines': [ -+ # avoiding pointless ifdef churn -+ 'WEBRTC_LINUX', -+ ], -+ }], # include_alsa_audio==1 - ['OS=="ios"', { - 'include_dirs': [ - 'ios', - ], - }], # OS==ios - ['OS=="mac"', { - 'include_dirs': [ - 'mac', -@@ -129,24 +133,26 @@ - 'sources': [ - 'android/audio_device_jni_android.cc', - 'android/audio_device_jni_android.h', - ], - }], - ], - }], - ['OS=="linux"', { -- 'defines': [ -- 'LINUX_ALSA', -- ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, -+ }], -+ ['include_alsa_audio==1', { -+ 'defines': [ -+ 'LINUX_ALSA', -+ ], - 'conditions': [ - ['include_pulse_audio==1', { - 'defines': [ - 'LINUX_PULSE', - ], - 'sources': [ - 'linux/audio_device_pulse_linux.cc', - 'linux/audio_device_pulse_linux.h', diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc index 203f09a..0b0b70e 100644 --- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc Added: trunk/www/firefox-nightly/files/patch-bug844818 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/firefox-nightly/files/patch-bug844818 Tue Feb 26 04:18:30 2013 (r1191) @@ -0,0 +1,126 @@ +diff --git configure.in configure.in +index 7cd6e17..a1dbdf7 100644 +--- configure.in ++++ configure.in +@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th + fi + fi + ++# Keep libcubeb and audio_device backends in sync ++if test -n "$MOZ_ALSA"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0" ++fi ++if test -n "$MOZ_PULSEAUDIO"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0" ++fi ++ + # Don't try to compile sse4.1 code if toolchain doesn't support + if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then + EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" +diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi +index 8457737..dfc83ff 100644 +--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi ++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi +@@ -45,11 +45,15 @@ + 'dummy/audio_device_utility_dummy.h', + ], + 'conditions': [ +- ['OS=="linux"', { ++ ['include_alsa_audio==1 or include_pulse_audio==1', { + 'include_dirs': [ + 'linux', + ], +- }], # OS==linux ++ 'defines': [ ++ # avoid pointless rename ++ 'WEBRTC_LINUX', ++ ], ++ }], # include_alsa_audio==1 or include_pulse_audio==1 + ['OS=="ios"', { + 'include_dirs': [ + 'ios', +@@ -74,14 +78,8 @@ + }], + ['include_internal_audio_device==1', { + 'sources': [ +- 'linux/alsasymboltable_linux.cc', +- 'linux/alsasymboltable_linux.h', +- 'linux/audio_device_alsa_linux.cc', +- 'linux/audio_device_alsa_linux.h', + 'linux/audio_device_utility_linux.cc', + 'linux/audio_device_utility_linux.h', +- 'linux/audio_mixer_manager_alsa_linux.cc', +- 'linux/audio_mixer_manager_alsa_linux.h', + 'linux/latebindingsymboltable_linux.cc', + 'linux/latebindingsymboltable_linux.h', + 'mac/audio_device_mac.cc', +@@ -116,28 +114,36 @@ + }, + }], + ['OS=="linux"', { +- 'defines': [ +- 'LINUX_ALSA', +- ], + 'link_settings': { + 'libraries': [ + '-ldl', + ], + }, +- 'conditions': [ +- ['include_pulse_audio==1', { +- 'defines': [ +- 'LINUX_PULSE', +- ], +- 'sources': [ +- 'linux/audio_device_pulse_linux.cc', +- 'linux/audio_device_pulse_linux.h', +- 'linux/audio_mixer_manager_pulse_linux.cc', +- 'linux/audio_mixer_manager_pulse_linux.h', +- 'linux/pulseaudiosymboltable_linux.cc', +- 'linux/pulseaudiosymboltable_linux.h', +- ], +- }], ++ }], ++ ['include_alsa_audio==1', { ++ 'defines': [ ++ 'LINUX_ALSA', ++ ], ++ 'sources': [ ++ 'linux/alsasymboltable_linux.cc', ++ 'linux/alsasymboltable_linux.h', ++ 'linux/audio_device_alsa_linux.cc', ++ 'linux/audio_device_alsa_linux.h', ++ 'linux/audio_mixer_manager_alsa_linux.cc', ++ 'linux/audio_mixer_manager_alsa_linux.h', ++ ], ++ }], ++ ['include_pulse_audio==1', { ++ 'defines': [ ++ 'LINUX_PULSE', ++ ], ++ 'sources': [ ++ 'linux/audio_device_pulse_linux.cc', ++ 'linux/audio_device_pulse_linux.h', ++ 'linux/audio_mixer_manager_pulse_linux.cc', ++ 'linux/audio_mixer_manager_pulse_linux.h', ++ 'linux/pulseaudiosymboltable_linux.cc', ++ 'linux/pulseaudiosymboltable_linux.h', + ], + }], + ['OS=="mac"', { +diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi +index b504d3d..e2eb127 100644 +--- media/webrtc/webrtc_config.gypi ++++ media/webrtc/webrtc_config.gypi +@@ -9,7 +9,6 @@ + 'include_internal_video_render': 0, + 'clang_use_chrome_plugins': 0, + 'enable_protobuf': 0, +- 'include_pulse_audio': 0, + 'include_tests': 0, + 'use_system_libjpeg': 1, + 'use_system_libvpx': 1, Modified: trunk/www/firefox/files/patch-bug807492 ============================================================================== --- trunk/www/firefox/files/patch-bug807492 Sun Feb 24 04:00:04 2013 (r1190) +++ trunk/www/firefox/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) @@ -753,7 +753,7 @@ index 9ca9f7c..d5c4ab9 100644 --- media/webrtc/trunk/src/build/common.gypi +++ media/webrtc/trunk/src/build/common.gypi -@@ -101,16 +101,23 @@ +@@ -101,16 +101,21 @@ 'enable_protobuf%': 1, 'include_tests%': 1, @@ -763,10 +763,8 @@ 'clang_use_chrome_plugins%': 0, }], + ['OS=="linux" or OS=="solaris" or os_bsd==1', { -+ 'include_alsa_audio%': 1, + 'include_v4l2_video_capture%': 1, + }, { -+ 'include_alsa_audio%': 0, + 'include_v4l2_video_capture%': 0, + }], ], # conditions @@ -806,68 +804,6 @@ 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], -diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -index 8457737..4d0f322 100644 ---- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -+++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -@@ -41,21 +41,25 @@ - 'audio_device_utility.h', - 'audio_device_impl.cc', - 'audio_device_impl.h', - 'audio_device_config.h', - 'dummy/audio_device_dummy.h', - 'dummy/audio_device_utility_dummy.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['include_alsa_audio==1', { - 'include_dirs': [ - 'linux', - ], -- }], # OS==linux -+ 'defines': [ -+ # avoiding pointless ifdef churn -+ 'WEBRTC_LINUX', -+ ], -+ }], # include_alsa_audio==1 - ['OS=="mac"', { - 'include_dirs': [ - 'mac', - ], - }], # OS==mac - ['OS=="win"', { - 'include_dirs': [ - 'win', -@@ -111,24 +115,26 @@ - 'link_settings': { - 'libraries': [ - '-llog', - '-lOpenSLES', - ], - }, - }], - ['OS=="linux"', { -- 'defines': [ -- 'LINUX_ALSA', -- ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, -+ }], -+ ['include_alsa_audio==1', { -+ 'defines': [ -+ 'LINUX_ALSA', -+ ], - 'conditions': [ - ['include_pulse_audio==1', { - 'defines': [ - 'LINUX_PULSE', - ], - 'sources': [ - 'linux/audio_device_pulse_linux.cc', - 'linux/audio_device_pulse_linux.h', diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc index 203f09a..0b0b70e 100644 --- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc Added: trunk/www/firefox/files/patch-bug844818 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/firefox/files/patch-bug844818 Tue Feb 26 04:18:30 2013 (r1191) @@ -0,0 +1,126 @@ +diff --git configure.in configure.in +index 7cd6e17..a1dbdf7 100644 +--- configure.in ++++ configure.in +@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th + fi + fi + ++# Keep libcubeb and audio_device backends in sync ++if test -n "$MOZ_ALSA"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0" ++fi ++if test -n "$MOZ_PULSEAUDIO"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0" ++fi ++ + # Don't try to compile sse4.1 code if toolchain doesn't support + if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then + EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" +diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +index 8457737..dfc83ff 100644 +--- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi ++++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +@@ -45,11 +45,15 @@ + 'dummy/audio_device_utility_dummy.h', + ], + 'conditions': [ +- ['OS=="linux"', { ++ ['include_alsa_audio==1 or include_pulse_audio==1', { + 'include_dirs': [ + 'linux', + ], +- }], # OS==linux ++ 'defines': [ ++ # avoid pointless rename ++ 'WEBRTC_LINUX', ++ ], ++ }], # include_alsa_audio==1 or include_pulse_audio==1 + ['OS=="mac"', { + 'include_dirs': [ + 'mac', +@@ -74,14 +78,8 @@ + }], + ['include_internal_audio_device==1', { + 'sources': [ +- 'linux/alsasymboltable_linux.cc', +- 'linux/alsasymboltable_linux.h', +- 'linux/audio_device_alsa_linux.cc', +- 'linux/audio_device_alsa_linux.h', + 'linux/audio_device_utility_linux.cc', + 'linux/audio_device_utility_linux.h', +- 'linux/audio_mixer_manager_alsa_linux.cc', +- 'linux/audio_mixer_manager_alsa_linux.h', + 'linux/latebindingsymboltable_linux.cc', + 'linux/latebindingsymboltable_linux.h', + 'mac/audio_device_mac.cc', +@@ -116,28 +114,36 @@ + }, + }], + ['OS=="linux"', { +- 'defines': [ +- 'LINUX_ALSA', +- ], + 'link_settings': { + 'libraries': [ + '-ldl', + ], + }, +- 'conditions': [ +- ['include_pulse_audio==1', { +- 'defines': [ +- 'LINUX_PULSE', +- ], +- 'sources': [ +- 'linux/audio_device_pulse_linux.cc', +- 'linux/audio_device_pulse_linux.h', +- 'linux/audio_mixer_manager_pulse_linux.cc', +- 'linux/audio_mixer_manager_pulse_linux.h', +- 'linux/pulseaudiosymboltable_linux.cc', +- 'linux/pulseaudiosymboltable_linux.h', +- ], +- }], ++ }], ++ ['include_alsa_audio==1', { ++ 'defines': [ ++ 'LINUX_ALSA', ++ ], ++ 'sources': [ ++ 'linux/alsasymboltable_linux.cc', ++ 'linux/alsasymboltable_linux.h', ++ 'linux/audio_device_alsa_linux.cc', ++ 'linux/audio_device_alsa_linux.h', ++ 'linux/audio_mixer_manager_alsa_linux.cc', ++ 'linux/audio_mixer_manager_alsa_linux.h', ++ ], ++ }], ++ ['include_pulse_audio==1', { ++ 'defines': [ ++ 'LINUX_PULSE', ++ ], ++ 'sources': [ ++ 'linux/audio_device_pulse_linux.cc', ++ 'linux/audio_device_pulse_linux.h', ++ 'linux/audio_mixer_manager_pulse_linux.cc', ++ 'linux/audio_mixer_manager_pulse_linux.h', ++ 'linux/pulseaudiosymboltable_linux.cc', ++ 'linux/pulseaudiosymboltable_linux.h', + ], + }], + ['OS=="mac"', { +diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi +index b504d3d..e2eb127 100644 +--- media/webrtc/webrtc_config.gypi ++++ media/webrtc/webrtc_config.gypi +@@ -9,7 +9,6 @@ + 'include_internal_video_render': 0, + 'clang_use_chrome_plugins': 0, + 'enable_protobuf': 0, +- 'include_pulse_audio': 0, + 'include_tests': 0, + 'use_system_libjpeg': 1, + 'use_system_libvpx': 1, Modified: trunk/www/seamonkey/files/patch-bug807492 ============================================================================== --- trunk/www/seamonkey/files/patch-bug807492 Sun Feb 24 04:00:04 2013 (r1190) +++ trunk/www/seamonkey/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) @@ -750,7 +750,7 @@ index 9ca9f7c..d5c4ab9 100644 --- mozilla/media/webrtc/trunk/src/build/common.gypi +++ mozilla/media/webrtc/trunk/src/build/common.gypi -@@ -101,16 +101,23 @@ +@@ -101,16 +101,21 @@ 'enable_protobuf%': 1, 'include_tests%': 1, @@ -760,10 +760,8 @@ 'clang_use_chrome_plugins%': 0, }], + ['OS=="linux" or OS=="solaris" or os_bsd==1', { -+ 'include_alsa_audio%': 1, + 'include_v4l2_video_capture%': 1, + }, { -+ 'include_alsa_audio%': 0, + 'include_v4l2_video_capture%': 0, + }], ], # conditions @@ -803,68 +801,6 @@ 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], -diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -index 8457737..4d0f322 100644 ---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -@@ -41,21 +41,25 @@ - 'audio_device_utility.h', - 'audio_device_impl.cc', - 'audio_device_impl.h', - 'audio_device_config.h', - 'dummy/audio_device_dummy.h', - 'dummy/audio_device_utility_dummy.h', - ], - 'conditions': [ -- ['OS=="linux"', { -+ ['include_alsa_audio==1', { - 'include_dirs': [ - 'linux', - ], -- }], # OS==linux -+ 'defines': [ -+ # avoiding pointless ifdef churn -+ 'WEBRTC_LINUX', -+ ], -+ }], # include_alsa_audio==1 - ['OS=="mac"', { - 'include_dirs': [ - 'mac', - ], - }], # OS==mac - ['OS=="win"', { - 'include_dirs': [ - 'win', -@@ -111,24 +115,26 @@ - 'link_settings': { - 'libraries': [ - '-llog', - '-lOpenSLES', - ], - }, - }], - ['OS=="linux"', { -- 'defines': [ -- 'LINUX_ALSA', -- ], - 'link_settings': { - 'libraries': [ - '-ldl', - ], - }, -+ }], -+ ['include_alsa_audio==1', { -+ 'defines': [ -+ 'LINUX_ALSA', -+ ], - 'conditions': [ - ['include_pulse_audio==1', { - 'defines': [ - 'LINUX_PULSE', - ], - 'sources': [ - 'linux/audio_device_pulse_linux.cc', - 'linux/audio_device_pulse_linux.h', diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc index 203f09a..0b0b70e 100644 --- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc Added: trunk/www/seamonkey/files/patch-bug844818 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/seamonkey/files/patch-bug844818 Tue Feb 26 04:18:30 2013 (r1191) @@ -0,0 +1,126 @@ +diff --git configure.in configure.in +index 7cd6e17..a1dbdf7 100644 +--- mozilla/configure.in ++++ mozilla/configure.in +@@ -9106,6 +9106,18 @@ elif test "${OS_TARGET}" = "Android"; th + fi + fi + ++# Keep libcubeb and audio_device backends in sync ++if test -n "$MOZ_ALSA"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0" ++fi ++if test -n "$MOZ_PULSEAUDIO"; then ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1" ++else ++ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0" ++fi ++ + # Don't try to compile sse4.1 code if toolchain doesn't support + if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then + EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" +diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +index 8457737..dfc83ff 100644 +--- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi ++++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +@@ -45,11 +45,15 @@ + 'dummy/audio_device_utility_dummy.h', + ], + 'conditions': [ +- ['OS=="linux"', { ++ ['include_alsa_audio==1 or include_pulse_audio==1', { + 'include_dirs': [ + 'linux', + ], +- }], # OS==linux ++ 'defines': [ ++ # avoid pointless rename ++ 'WEBRTC_LINUX', ++ ], ++ }], # include_alsa_audio==1 or include_pulse_audio==1 + ['OS=="mac"', { + 'include_dirs': [ + 'mac', +@@ -74,14 +78,8 @@ + }], + ['include_internal_audio_device==1', { + 'sources': [ +- 'linux/alsasymboltable_linux.cc', +- 'linux/alsasymboltable_linux.h', +- 'linux/audio_device_alsa_linux.cc', +- 'linux/audio_device_alsa_linux.h', + 'linux/audio_device_utility_linux.cc', + 'linux/audio_device_utility_linux.h', +- 'linux/audio_mixer_manager_alsa_linux.cc', +- 'linux/audio_mixer_manager_alsa_linux.h', + 'linux/latebindingsymboltable_linux.cc', + 'linux/latebindingsymboltable_linux.h', + 'mac/audio_device_mac.cc', +@@ -116,28 +114,36 @@ + }, + }], + ['OS=="linux"', { +- 'defines': [ +- 'LINUX_ALSA', +- ], + 'link_settings': { + 'libraries': [ + '-ldl', + ], + }, +- 'conditions': [ +- ['include_pulse_audio==1', { +- 'defines': [ +- 'LINUX_PULSE', +- ], +- 'sources': [ +- 'linux/audio_device_pulse_linux.cc', +- 'linux/audio_device_pulse_linux.h', +- 'linux/audio_mixer_manager_pulse_linux.cc', +- 'linux/audio_mixer_manager_pulse_linux.h', +- 'linux/pulseaudiosymboltable_linux.cc', +- 'linux/pulseaudiosymboltable_linux.h', +- ], +- }], ++ }], ++ ['include_alsa_audio==1', { ++ 'defines': [ ++ 'LINUX_ALSA', ++ ], ++ 'sources': [ ++ 'linux/alsasymboltable_linux.cc', ++ 'linux/alsasymboltable_linux.h', ++ 'linux/audio_device_alsa_linux.cc', ++ 'linux/audio_device_alsa_linux.h', ++ 'linux/audio_mixer_manager_alsa_linux.cc', ++ 'linux/audio_mixer_manager_alsa_linux.h', ++ ], ++ }], ++ ['include_pulse_audio==1', { ++ 'defines': [ ++ 'LINUX_PULSE', ++ ], ++ 'sources': [ ++ 'linux/audio_device_pulse_linux.cc', ++ 'linux/audio_device_pulse_linux.h', ++ 'linux/audio_mixer_manager_pulse_linux.cc', ++ 'linux/audio_mixer_manager_pulse_linux.h', ++ 'linux/pulseaudiosymboltable_linux.cc', ++ 'linux/pulseaudiosymboltable_linux.h', + ], + }], + ['OS=="mac"', { +diff --git media/webrtc/webrtc_config.gypi media/webrtc/webrtc_config.gypi +index b504d3d..e2eb127 100644 +--- mozilla/media/webrtc/webrtc_config.gypi ++++ mozilla/media/webrtc/webrtc_config.gypi +@@ -9,7 +9,6 @@ + 'include_internal_video_render': 0, + 'clang_use_chrome_plugins': 0, + 'enable_protobuf': 0, +- 'include_pulse_audio': 0, + 'include_tests': 0, + 'use_system_libjpeg': 1, + 'use_system_libvpx': 1, From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 26 04:18:51 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 87ADF329 for ; Tue, 26 Feb 2013 04:18:51 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 0AE2CB17 for ; Tue, 26 Feb 2013 04:18:49 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1Q4InCQ074992 for ; Tue, 26 Feb 2013 04:18:49 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1Q4Ih5M069636 for freebsd-gecko@freebsd.org; Tue, 26 Feb 2013 04:18:43 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Tue, 26 Feb 2013 04:18:43 GMT Message-Id: <201302260418.r1Q4Ih5M069636@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1192 - in trunk: Mk mail/thunderbird mail/thunderbird/files www/firefox-nightly www/firefox-nightly/files www/seamonkey www/seamonkey/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 26 Feb 2013 04:53:00 +0000 X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 04:18:51 -0000 Author: jbeich Date: Tue Feb 26 04:18:43 2013 New Revision: 1192 Log: update Added: trunk/mail/thunderbird/files/patch-bug780432 trunk/mail/thunderbird/files/patch-bug824317 trunk/mail/thunderbird/files/patch-bug827521 trunk/mail/thunderbird/files/patch-bug836824 trunk/www/seamonkey/files/patch-bug780432 trunk/www/seamonkey/files/patch-bug824317 trunk/www/seamonkey/files/patch-bug827521 trunk/www/seamonkey/files/patch-bug836824 Deleted: trunk/mail/thunderbird/files/patch-alsapulse trunk/mail/thunderbird/files/patch-bug787804 trunk/mail/thunderbird/files/patch-bug817267 trunk/www/seamonkey/files/patch-alsapulse trunk/www/seamonkey/files/patch-bug787804 trunk/www/seamonkey/files/patch-bug817267 Modified: trunk/Mk/bsd.gecko.mk trunk/mail/thunderbird/Makefile trunk/mail/thunderbird/distinfo trunk/mail/thunderbird/files/patch-bug807492 trunk/mail/thunderbird/files/patch-bug826985 trunk/www/firefox-nightly/Makefile.hgrev trunk/www/firefox-nightly/distinfo trunk/www/firefox-nightly/files/patch-bug807492 trunk/www/seamonkey/Makefile trunk/www/seamonkey/distinfo trunk/www/seamonkey/files/patch-bug807492 trunk/www/seamonkey/files/patch-bug826985 Modified: trunk/Mk/bsd.gecko.mk ============================================================================== --- trunk/Mk/bsd.gecko.mk Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/Mk/bsd.gecko.mk Tue Feb 26 04:18:43 2013 (r1192) @@ -629,7 +629,7 @@ sqlite_LIB_DEPENDS= sqlite3:${PORTSDIR}/databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite -.if ${MOZILLA_VER:R:R} >= 20 || exists(${.CURDIR}/files/patch-bug787804) +.if ${MOZILLA_VER:R:R} >= 20 || ${MOZILLA:Mseamonkey*} sqlite_EXTRACT_AFTER_ARGS= --exclude mozilla*/db/sqlite3 .endif Modified: trunk/mail/thunderbird/Makefile ============================================================================== --- trunk/mail/thunderbird/Makefile Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/mail/thunderbird/Makefile Tue Feb 26 04:18:43 2013 (r1192) @@ -2,25 +2,29 @@ # $FreeBSD: head/mail/thunderbird/Makefile 310165 2013-01-09 23:28:19Z flo $ PORTNAME= thunderbird -DISTVERSION= 19.0b1 +PORTVERSION= 20.0.b1 +DISTVERSION= 2.17b1 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} -MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source -DISTFILES= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} -EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} +MASTER_SITE_SUBDIR= seamonkey/releases/${DISTVERSION}/source +DISTFILES= seamonkey-${DISTVERSION}.source${EXTRACT_SUFX} +EXTRACT_ONLY= seamonkey-${DISTVERSION}.source${EXTRACT_SUFX} +#MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source +#DISTFILES= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} +#EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org COMMENT= Mozilla Thunderbird is standalone mail and news that stands above BUILD_DEPENDS= nspr>=4.9.4:${PORTSDIR}/devel/nspr \ - nss>=3.14:${PORTSDIR}/security/nss \ + nss>=3.14.2:${PORTSDIR}/security/nss \ sqlite3>=3.7.14.1:${PORTSDIR}/databases/sqlite3 \ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \ cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \ unzip:${PORTSDIR}/archivers/unzip EM_VERSION= 1.5.1 -L_VERSION= 2.1b1 +L_VERSION= 2.2b1 USE_AUTOTOOLS= autoconf213:env USE_PYTHON_BUILD=-2.7 @@ -112,6 +116,7 @@ post-patch: @${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \ + -e '/^SQLITE_VERSION/s/=.*/=3.7.14.1/' \ ${MOZSRC}/configure.in ${WRKSRC}/configure.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/mail/app/nsMailApp.cpp Modified: trunk/mail/thunderbird/distinfo ============================================================================== --- trunk/mail/thunderbird/distinfo Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/mail/thunderbird/distinfo Tue Feb 26 04:18:43 2013 (r1192) @@ -1,4 +1,4 @@ -SHA256 (thunderbird-19.0b1.source.tar.bz2) = e200382789f1af417065a0f523902b660e1b7e03e31e3059adcc98db827df158 -SIZE (thunderbird-19.0b1.source.tar.bz2) = 121440940 +SHA256 (seamonkey-2.17b1.source.tar.bz2) = e9d1c8009e2706789cd45841dc73e866577143d53f5920dc9d5aa61837f2dfa6 +SIZE (seamonkey-2.17b1.source.tar.bz2) = 122818269 SHA256 (enigmail-1.5.1.tar.gz) = 234ca3c8f7c74afb64ebdaa4762e358f35a72c1f8de007b992497fc2db803af0 SIZE (enigmail-1.5.1.tar.gz) = 1213954 Deleted: trunk/mail/thunderbird/files/patch-alsapulse ============================================================================== --- trunk/mail/thunderbird/files/patch-alsapulse Tue Feb 26 04:18:43 2013 (r1191) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,122 +0,0 @@ -diff --git mozilla/configure.in mozilla/configure.in -index 5980b76..11f5f77 100644 ---- mozilla/configure.in -+++ mozilla/configure.in -@@ -5618,11 +5618,25 @@ dnl ======================================================== - - dnl If using sydneyaudio with Linux, ensure that the alsa library is available - if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then -+ MOZ_ALSA=1 -+fi -+ -+MOZ_ARG_ENABLE_BOOL(alsa, -+[ --enable-alsa Enable Alsa support (default on Linux)], -+MOZ_ALSA=1, -+MOZ_ALSA=) -+ -+if test -n "$MOZ_ALSA"; then -+ AC_DEFINE(MOZ_CUBEB) - PKG_CHECK_MODULES(MOZ_ALSA, alsa, , - [echo "$MOZ_ALSA_PKG_ERRORS" - AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) - fi - -+AC_SUBST(MOZ_ALSA) -+AC_SUBST(MOZ_ALSA_CFLAGS) -+AC_SUBST(MOZ_ALSA_LIBS) -+ - dnl ======================================================== - dnl = Enable PulseAudio - dnl ======================================================== -@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT) - AC_SUBST(MOZ_VP8_ENCODER) - AC_SUBST(MOZ_VP8) - AC_SUBST(MOZ_OGG) --AC_SUBST(MOZ_ALSA_LIBS) --AC_SUBST(MOZ_ALSA_CFLAGS) - AC_SUBST(VPX_AS) - AC_SUBST(VPX_ASFLAGS) - AC_SUBST(VPX_DASH_C_FLAG) -diff --git mozilla/media/libcubeb/src/Makefile.in mozilla/media/libcubeb/src/Makefile.in -index 5ab4dd8..c8df26f 100644 ---- mozilla/media/libcubeb/src/Makefile.in -+++ mozilla/media/libcubeb/src/Makefile.in -@@ -24,10 +24,6 @@ endif - - ifeq ($(OS_TARGET),Android) - # No Android implementation of libcubeb yet. --else ifeq ($(OS_TARGET),Linux) --CSRCS = \ -- cubeb_alsa.c \ -- $(NULL) - endif - - ifeq ($(OS_TARGET),Darwin) -@@ -42,6 +38,12 @@ CSRCS = \ - $(NULL) - endif - -+ifdef MOZ_ALSA -+CSRCS = \ -+ cubeb_alsa.c \ -+ $(NULL) -+endif -+ - ifdef MOZ_PULSEAUDIO - CSRCS = \ - cubeb_pulse.c \ -diff --git mozilla/media/libsydneyaudio/src/Makefile.in mozilla/media/libsydneyaudio/src/Makefile.in -index 8dda8ce..b19641d 100644 ---- mozilla/media/libsydneyaudio/src/Makefile.in -+++ mozilla/media/libsydneyaudio/src/Makefile.in -@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) - CSRCS = \ - sydney_audio_android.c \ - $(NULL) --else ifeq ($(OS_ARCH),Linux) --CSRCS = \ -- sydney_audio_alsa.c \ -- $(NULL) - endif - - ifeq ($(OS_ARCH),WINNT) -@@ -68,6 +64,18 @@ CSRCS = \ - $(NULL) - endif - -+ifdef MOZ_ALSA -+CSRCS = \ -+ sydney_audio_alsa.c \ -+ $(NULL) -+endif -+ -+ifdef MOZ_PULSEAUDIO -+CSRCS = \ -+ sydney_audio_pulseaudio.c \ -+ $(NULL) -+endif -+ - ifeq ($(OS_ARCH),WINNT) - OS_LIBS += winmm.lib - endif -diff --git mozilla/toolkit/library/Makefile.in mozilla/toolkit/library/Makefile.in -index 43384e9..e46a6e3 100644 ---- mozilla/toolkit/library/Makefile.in -+++ mozilla/toolkit/library/Makefile.in -@@ -370,14 +370,11 @@ endif - - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) - --ifdef MOZ_SYDNEYAUDIO --ifeq ($(OS_ARCH),Linux) -+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO)) -+ifdef MOZ_ALSA - EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) - endif --endif -- - ifdef MOZ_PULSEAUDIO --ifdef MOZ_CUBEB - EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) - endif - endif Added: trunk/mail/thunderbird/files/patch-bug780432 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/mail/thunderbird/files/patch-bug780432 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,17 @@ +diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in +index 8dda8ce..b19641d 100644 +--- mozilla/media/libsydneyaudio/src/Makefile.in ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -68,6 +68,12 @@ ifdef MOZ_ALSA + $(NULL) + endif + ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif Deleted: trunk/mail/thunderbird/files/patch-bug787804 ============================================================================== --- trunk/mail/thunderbird/files/patch-bug787804 Tue Feb 26 04:18:43 2013 (r1191) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,3557 +0,0 @@ -commit 74997f1 -Author: Jan Varga -Date: Mon Dec 17 20:25:10 2012 +0100 - - Bug 787804 - Rewrite quota handling (eliminate test_quota.c). r=bent,asuth,vladan ---- - db/sqlite3/README.MOZILLA | 4 +- - db/sqlite3/src/sqlite.def | 1 + - db/sqlite3/src/test_quota.c | 2001 -------------------- - db/sqlite3/src/test_quota.h | 274 --- - dom/Makefile.in | 1 + - dom/dom-config.mk | 1 + - dom/file/FileStreamWrappers.cpp | 11 - - dom/file/LockedFile.cpp | 8 +- - dom/file/nsIFileStorage.h | 40 +- - dom/indexedDB/FileManager.cpp | 33 +- - dom/indexedDB/FileManager.h | 20 +- - dom/indexedDB/FileStream.cpp | 321 ---- - dom/indexedDB/FileStream.h | 140 -- - dom/indexedDB/IDBDatabase.cpp | 6 + - dom/indexedDB/IDBFactory.cpp | 28 +- - dom/indexedDB/IDBFactory.h | 8 +- - dom/indexedDB/IDBFileHandle.cpp | 25 +- - dom/indexedDB/IDBObjectStore.cpp | 10 +- - dom/indexedDB/IDBTransaction.cpp | 3 +- - dom/indexedDB/IndexedDatabaseInlines.h | 13 + - dom/indexedDB/IndexedDatabaseManager.cpp | 162 +- - dom/indexedDB/IndexedDatabaseManager.h | 11 +- - dom/indexedDB/Makefile.in | 2 - - dom/indexedDB/OpenDatabaseHelper.cpp | 104 +- - dom/indexedDB/OpenDatabaseHelper.h | 12 +- - dom/indexedDB/nsIStandardFileStream.idl | 60 - - dom/indexedDB/test/Makefile.in | 2 + - dom/indexedDB/test/file.js | 21 +- - dom/indexedDB/test/test_file_quota.html | 14 +- - dom/indexedDB/test/test_filehandle_quota.html | 5 +- - dom/quota/FileStreams.cpp | 123 ++ - dom/quota/FileStreams.h | 115 ++ - dom/quota/Makefile.in | 33 + - dom/quota/QuotaCommon.h | 23 + - dom/quota/QuotaManager.cpp | 294 +++ - dom/quota/QuotaManager.h | 147 ++ - layout/build/Makefile.in | 1 + - netwerk/base/src/Makefile.in | 1 + - netwerk/base/src/nsFileStreams.cpp | 103 +- - netwerk/base/src/nsFileStreams.h | 12 +- - storage/public/Makefile.in | 1 - - storage/public/mozIStorageService.idl | 13 +- - .../public/mozIStorageServiceQuotaManagement.idl | 99 - - storage/public/storage.h | 1 - - storage/src/TelemetryVFS.cpp | 35 +- - storage/src/mozStorageConnection.cpp | 85 +- - storage/src/mozStorageConnection.h | 27 +- - storage/src/mozStorageService.cpp | 168 +- - storage/src/mozStorageService.h | 3 - - toolkit/toolkit-makefiles.sh | 1 + - 50 files changed, 1239 insertions(+), 3387 deletions(-) - -diff --git dom/Makefile.in dom/Makefile.in -index 672e065..47cd253 100644 ---- mozilla/dom/Makefile.in -+++ mozilla/dom/Makefile.in -@@ -58,6 +58,7 @@ PARALLEL_DIRS += \ - media \ - messages \ - power \ -+ quota \ - settings \ - sms \ - mms \ -diff --git dom/dom-config.mk dom/dom-config.mk -index d0f46cc..1cf57ed 100644 ---- mozilla/dom/dom-config.mk -+++ mozilla/dom/dom-config.mk -@@ -8,6 +8,7 @@ DOM_SRCDIRS = \ - dom/encoding \ - dom/file \ - dom/power \ -+ dom/quota \ - dom/media \ - dom/network/src \ - dom/settings \ -diff --git dom/file/FileStreamWrappers.cpp dom/file/FileStreamWrappers.cpp -index 2283266..c4cf102 100644 ---- mozilla/dom/file/FileStreamWrappers.cpp -+++ mozilla/dom/file/FileStreamWrappers.cpp -@@ -8,7 +8,6 @@ - - #include "nsIFileStorage.h" - #include "nsISeekableStream.h" --#include "nsIStandardFileStream.h" - #include "mozilla/Attributes.h" - - #include "FileHelper.h" -@@ -246,16 +245,6 @@ FileOutputStreamWrapper::Close() - nsresult rv = NS_OK; - - if (!mFirstTime) { -- // We must flush buffers of the stream on the same thread on which we wrote -- // some data. -- nsCOMPtr sstream = do_QueryInterface(mFileStream); -- if (sstream) { -- rv = sstream->FlushBuffers(); -- if (NS_FAILED(rv)) { -- NS_WARNING("Failed to flush buffers of the stream!"); -- } -- } -- - NS_ASSERTION(PR_GetCurrentThread() == mWriteThread, - "Unsetting thread locals on wrong thread!"); - mFileHelper->mFileStorage->UnsetThreadLocals(); -diff --git dom/file/LockedFile.cpp dom/file/LockedFile.cpp -index 0fca730..926df91 100644 ---- mozilla/dom/file/LockedFile.cpp -+++ mozilla/dom/file/LockedFile.cpp -@@ -953,10 +953,10 @@ FinishHelper::Run() - } - - for (uint32_t index = 0; index < mParallelStreams.Length(); index++) { -- nsCOMPtr ostream = -+ nsCOMPtr stream = - do_QueryInterface(mParallelStreams[index]); - -- if (NS_FAILED(ostream->Close())) { -+ if (NS_FAILED(stream->Close())) { - NS_WARNING("Failed to close stream!"); - } - -@@ -964,9 +964,9 @@ FinishHelper::Run() - } - - if (mStream) { -- nsCOMPtr ostream = do_QueryInterface(mStream); -+ nsCOMPtr stream = do_QueryInterface(mStream); - -- if (NS_FAILED(ostream->Close())) { -+ if (NS_FAILED(stream->Close())) { - NS_WARNING("Failed to close stream!"); - } - -diff --git dom/file/nsIFileStorage.h dom/file/nsIFileStorage.h -index 92bb608..e985f0a 100644 ---- mozilla/dom/file/nsIFileStorage.h -+++ mozilla/dom/file/nsIFileStorage.h -@@ -10,14 +10,17 @@ - #include "nsISupports.h" - - #define NS_FILESTORAGE_IID \ -- {0xbba9c2ff, 0x85c9, 0x47c1, \ -- { 0xaf, 0xce, 0x0a, 0x7e, 0x6f, 0x21, 0x50, 0x95 } } -+ {0xa0801944, 0x2f1c, 0x4203, \ -+ { 0x9c, 0xaa, 0xaa, 0x47, 0xe0, 0x0c, 0x67, 0x92 } } - - class nsIFileStorage : public nsISupports - { - public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_FILESTORAGE_IID) - -+ virtual const nsACString& -+ StorageOrigin() = 0; -+ - virtual nsISupports* - StorageId() = 0; - -@@ -36,20 +39,23 @@ public: - - NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStorage, NS_FILESTORAGE_IID) - --#define NS_DECL_NSIFILESTORAGE \ -- virtual nsISupports* \ -- StorageId(); \ -- \ -- virtual bool \ -- IsStorageInvalidated(); \ -- \ -- virtual bool \ -- IsStorageShuttingDown(); \ -- \ -- virtual void \ -- SetThreadLocals(); \ -- \ -- virtual void \ -- UnsetThreadLocals(); -+#define NS_DECL_NSIFILESTORAGE \ -+ virtual const nsACString& \ -+ StorageOrigin() MOZ_OVERRIDE; \ -+ \ -+ virtual nsISupports* \ -+ StorageId() MOZ_OVERRIDE; \ -+ \ -+ virtual bool \ -+ IsStorageInvalidated() MOZ_OVERRIDE; \ -+ \ -+ virtual bool \ -+ IsStorageShuttingDown() MOZ_OVERRIDE; \ -+ \ -+ virtual void \ -+ SetThreadLocals() MOZ_OVERRIDE; \ -+ \ -+ virtual void \ -+ UnsetThreadLocals() MOZ_OVERRIDE; - - #endif // nsIFileStorage_h__ -diff --git dom/indexedDB/FileManager.cpp dom/indexedDB/FileManager.cpp -index 9db56e8..4ed6e9e 100644 ---- mozilla/dom/indexedDB/FileManager.cpp -+++ mozilla/dom/indexedDB/FileManager.cpp -@@ -7,8 +7,8 @@ - #include "FileManager.h" - - #include "mozIStorageConnection.h" --#include "mozIStorageServiceQuotaManagement.h" - #include "mozIStorageStatement.h" -+#include "nsIInputStream.h" - #include "nsISimpleEnumerator.h" - - #include "mozStorageCID.h" -@@ -18,6 +18,8 @@ - #include "IndexedDatabaseManager.h" - #include "OpenDatabaseHelper.h" - -+#include "IndexedDatabaseInlines.h" -+ - #define JOURNAL_DIRECTORY_NAME "journals" - - USING_INDEXEDDB_NAMESPACE -@@ -262,13 +264,11 @@ FileManager::GetFileForId(nsIFile* aDirectory, int64_t aId) - - // static - nsresult --FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, -- nsIFile* aDirectory, -+FileManager::InitDirectory(nsIFile* aDirectory, - nsIFile* aDatabaseFile, -- FactoryPrivilege aPrivilege) -+ const nsACString& aOrigin) - { - NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!"); -- NS_ASSERTION(aService, "Null service!"); - NS_ASSERTION(aDirectory, "Null directory!"); - NS_ASSERTION(aDatabaseFile, "Null database file!"); - -@@ -310,8 +310,8 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, - - if (hasElements) { - nsCOMPtr connection; -- rv = OpenDatabaseHelper::CreateDatabaseConnection( -- NullString(), aDatabaseFile, aDirectory, getter_AddRefs(connection)); -+ rv = OpenDatabaseHelper::CreateDatabaseConnection(aDatabaseFile, -+ aDirectory, NullString(), aOrigin, getter_AddRefs(connection)); - NS_ENSURE_SUCCESS(rv, rv); - - mozStorageTransaction transaction(connection, false); -@@ -377,12 +377,17 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, - } - } - -- if (aPrivilege == Chrome) { -- return NS_OK; -- } -+ return NS_OK; -+} -+ -+// static -+nsresult -+FileManager::GetUsage(nsIFile* aDirectory, uint64_t* aUsage) -+{ -+ uint64_t usage = 0; - - nsCOMPtr entries; -- rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries)); -+ nsresult rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries)); - NS_ENSURE_SUCCESS(rv, rv); - - bool hasMore; -@@ -402,9 +407,13 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, - continue; - } - -- rv = aService->UpdateQuotaInformationForFile(file); -+ int64_t fileSize; -+ rv = file->GetFileSize(&fileSize); - NS_ENSURE_SUCCESS(rv, rv); -+ -+ IncrementUsage(&usage, uint64_t(fileSize)); - } - -+ *aUsage = usage; - return NS_OK; - } -diff --git dom/indexedDB/FileManager.h dom/indexedDB/FileManager.h -index 2c72d0a..370d4a8 100644 ---- mozilla/dom/indexedDB/FileManager.h -+++ mozilla/dom/indexedDB/FileManager.h -@@ -24,10 +24,10 @@ class FileManager - friend class FileInfo; - - public: -- FileManager(const nsACString& aOrigin, -+ FileManager(const nsACString& aOrigin, FactoryPrivilege aPrivilege, - const nsAString& aDatabaseName) -- : mOrigin(aOrigin), mDatabaseName(aDatabaseName), mLastFileId(0), -- mInvalidated(false) -+ : mOrigin(aOrigin), mPrivilege(aPrivilege), mDatabaseName(aDatabaseName), -+ mLastFileId(0), mInvalidated(false) - { } - - ~FileManager() -@@ -40,6 +40,11 @@ public: - return mOrigin; - } - -+ const FactoryPrivilege& Privilege() const -+ { -+ return mPrivilege; -+ } -+ - const nsAString& DatabaseName() const - { - return mDatabaseName; -@@ -68,12 +73,15 @@ public: - static already_AddRefed GetFileForId(nsIFile* aDirectory, - int64_t aId); - -- static nsresult InitDirectory(mozIStorageServiceQuotaManagement* aService, -- nsIFile* aDirectory, nsIFile* aDatabaseFile, -- FactoryPrivilege aPrivilege); -+ static nsresult InitDirectory(nsIFile* aDirectory, -+ nsIFile* aDatabaseFile, -+ const nsACString& aOrigin); -+ -+ static nsresult GetUsage(nsIFile* aDirectory, uint64_t* aUsage); - - private: - nsCString mOrigin; -+ FactoryPrivilege mPrivilege; - nsString mDatabaseName; - - nsString mDirectoryPath; -diff --git dom/indexedDB/FileStream.cpp dom/indexedDB/FileStream.cpp -deleted file mode 100644 -index dddf5d5..0000000 ---- mozilla/dom/indexedDB/FileStream.cpp -+++ /dev/null -@@ -1,321 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this file, -- * You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#include "FileStream.h" -- --#include "nsIFile.h" -- --#include "nsThreadUtils.h" --#include "test_quota.h" -- --USING_INDEXEDDB_NAMESPACE -- --NS_IMPL_THREADSAFE_ADDREF(FileStream) --NS_IMPL_THREADSAFE_RELEASE(FileStream) -- --NS_INTERFACE_MAP_BEGIN(FileStream) -- NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardFileStream) -- NS_INTERFACE_MAP_ENTRY(nsISeekableStream) -- NS_INTERFACE_MAP_ENTRY(nsIInputStream) -- NS_INTERFACE_MAP_ENTRY(nsIOutputStream) -- NS_INTERFACE_MAP_ENTRY(nsIStandardFileStream) -- NS_INTERFACE_MAP_ENTRY(nsIFileMetadata) --NS_INTERFACE_MAP_END -- --NS_IMETHODIMP --FileStream::Seek(int32_t aWhence, int64_t aOffset) --{ -- // TODO: Add support for 64 bit file sizes, bug 752431 -- NS_ENSURE_TRUE(aOffset <= INT32_MAX, NS_ERROR_INVALID_ARG); -- -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- int whence; -- switch (aWhence) { -- case nsISeekableStream::NS_SEEK_SET: -- whence = SEEK_SET; -- break; -- case nsISeekableStream::NS_SEEK_CUR: -- whence = SEEK_CUR; -- break; -- case nsISeekableStream::NS_SEEK_END: -- whence = SEEK_END; -- break; -- default: -- return NS_ERROR_INVALID_ARG; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fseek(mQuotaFile, aOffset, whence); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Tell(int64_t* aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- long rc = sqlite3_quota_ftell(mQuotaFile); -- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR); -- -- *aResult = rc; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::SetEOF() --{ -- int64_t pos; -- nsresult rv = Tell(&pos); -- NS_ENSURE_SUCCESS(rv, rv); -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_ftruncate(mQuotaFile, pos); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- -- --NS_IMETHODIMP --FileStream::Close() --{ -- CleanUpOpen(); -- -- if (mQuotaFile) { -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fclose(mQuotaFile); -- mQuotaFile = nullptr; -- -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- } -- -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Available(uint64_t* aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- long rc = sqlite3_quota_file_available(mQuotaFile); -- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR); -- -- *aResult = rc; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Read(char* aBuf, uint32_t aCount, uint32_t* aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- size_t bytesRead = sqlite3_quota_fread(aBuf, 1, aCount, mQuotaFile); -- if (bytesRead < aCount && sqlite3_quota_ferror(mQuotaFile)) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- *aResult = bytesRead; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, -- uint32_t aCount, uint32_t* aResult) --{ -- NS_NOTREACHED("Don't call me!"); -- return NS_ERROR_NOT_IMPLEMENTED; --} -- --NS_IMETHODIMP --FileStream::IsNonBlocking(bool *aNonBlocking) --{ -- *aNonBlocking = false; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Write(const char* aBuf, uint32_t aCount, uint32_t *aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- size_t bytesWritten = sqlite3_quota_fwrite(aBuf, 1, aCount, mQuotaFile); -- if (bytesWritten < aCount) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- *aResult = bytesWritten; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Flush() --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fflush(mQuotaFile, 1); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval) --{ -- return NS_ERROR_NOT_IMPLEMENTED; --} -- --NS_IMETHODIMP --FileStream::WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval) --{ -- NS_NOTREACHED("Don't call me!"); -- return NS_ERROR_NOT_IMPLEMENTED; --} -- --NS_IMETHODIMP --FileStream::Init(nsIFile* aFile, const nsAString& aMode, int32_t aFlags) --{ -- NS_ASSERTION(!mQuotaFile && !mDeferredOpen, "Already initialized!"); -- -- nsresult rv = aFile->GetPath(mFilePath); -- NS_ENSURE_SUCCESS(rv, rv); -- -- mMode = aMode; -- mFlags = aFlags; -- -- if (mFlags & nsIStandardFileStream::FLAGS_DEFER_OPEN) { -- mDeferredOpen = true; -- return NS_OK; -- } -- -- return DoOpen(); --} -- --NS_IMETHODIMP --FileStream::GetSize(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- // TODO: Use sqlite3_quota_file_size() here, bug 760783 -- int64_t rc = sqlite3_quota_file_truesize(mQuotaFile); -- -- NS_ASSERTION(rc >= 0, "The file is not under quota management!"); -- -- *_retval = rc; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::GetLastModified(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- time_t mtime; -- int rc = sqlite3_quota_file_mtime(mQuotaFile, &mtime); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- *_retval = mtime * PR_MSEC_PER_SEC; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::FlushBuffers() --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fflush(mQuotaFile, 0); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- --nsresult --FileStream::DoOpen() --{ -- NS_ASSERTION(!mFilePath.IsEmpty(), "Must have a file path"); -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- quota_FILE* quotaFile = -- sqlite3_quota_fopen(NS_ConvertUTF16toUTF8(mFilePath).get(), -- NS_ConvertUTF16toUTF8(mMode).get()); -- -- CleanUpOpen(); -- -- if (!quotaFile) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- mQuotaFile = quotaFile; -- -- return NS_OK; --} -diff --git dom/indexedDB/FileStream.h dom/indexedDB/FileStream.h -deleted file mode 100644 -index 09648b1..0000000 ---- mozilla/dom/indexedDB/FileStream.h -+++ /dev/null -@@ -1,140 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this file, -- * You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#ifndef mozilla_dom_indexeddb_filestream_h__ --#define mozilla_dom_indexeddb_filestream_h__ -- --#include "IndexedDatabase.h" -- --#include "nsIFileStreams.h" --#include "nsIInputStream.h" --#include "nsIOutputStream.h" --#include "nsISeekableStream.h" --#include "nsIStandardFileStream.h" -- --class nsIFile; --struct quota_FILE; -- --BEGIN_INDEXEDDB_NAMESPACE -- --class FileStream : public nsISeekableStream, -- public nsIInputStream, -- public nsIOutputStream, -- public nsIStandardFileStream, -- public nsIFileMetadata --{ --public: -- FileStream() -- : mFlags(0), -- mDeferredOpen(false), -- mQuotaFile(nullptr) -- { } -- -- virtual ~FileStream() -- { -- Close(); -- } -- -- NS_DECL_ISUPPORTS -- NS_DECL_NSISEEKABLESTREAM -- NS_DECL_NSISTANDARDFILESTREAM -- NS_DECL_NSIFILEMETADATA -- -- // nsIInputStream -- NS_IMETHOD -- Close(); -- -- NS_IMETHOD -- Available(uint64_t* _retval); -- -- NS_IMETHOD -- Read(char* aBuf, uint32_t aCount, uint32_t* _retval); -- -- NS_IMETHOD -- ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, uint32_t aCount, -- uint32_t* _retval); -- -- NS_IMETHOD -- IsNonBlocking(bool* _retval); -- -- // nsIOutputStream -- -- // Close() already declared -- -- NS_IMETHOD -- Flush(); -- -- NS_IMETHOD -- Write(const char* aBuf, uint32_t aCount, uint32_t* _retval); -- -- NS_IMETHOD -- WriteFrom(nsIInputStream* aFromStream, uint32_t aCount, uint32_t* _retval); -- -- NS_IMETHOD -- WriteSegments(nsReadSegmentFun aReader, void* aClosure, uint32_t aCount, -- uint32_t* _retval); -- -- // IsNonBlocking() already declared -- --protected: -- /** -- * Cleans up data prepared in Init. -- */ -- void -- CleanUpOpen() -- { -- mFilePath.Truncate(); -- mDeferredOpen = false; -- } -- -- /** -- * Open the file. This is called either from Init -- * or from DoPendingOpen (if FLAGS_DEFER_OPEN is used when initializing this -- * stream). The default behavior of DoOpen is to open the file and save the -- * file descriptor. -- */ -- virtual nsresult -- DoOpen(); -- -- /** -- * If there is a pending open, do it now. It's important for this to be -- * inlined since we do it in almost every stream API call. -- */ -- nsresult -- DoPendingOpen() -- { -- if (!mDeferredOpen) { -- return NS_OK; -- } -- -- return DoOpen(); -- } -- -- /** -- * Data we need to do an open. -- */ -- nsString mFilePath; -- nsString mMode; -- -- /** -- * Flags describing our behavior. See the IDL file for possible values. -- */ -- int32_t mFlags; -- -- /** -- * Whether we have a pending open (see FLAGS_DEFER_OPEN in the IDL file). -- */ -- bool mDeferredOpen; -- -- /** -- * File descriptor for opened file. -- */ -- quota_FILE* mQuotaFile; --}; -- --END_INDEXEDDB_NAMESPACE -- --#endif // mozilla_dom_indexeddb_filestream_h__ -diff --git dom/indexedDB/IDBDatabase.cpp dom/indexedDB/IDBDatabase.cpp -index 63500b0..8842daf 100644 ---- mozilla/dom/indexedDB/IDBDatabase.cpp -+++ mozilla/dom/indexedDB/IDBDatabase.cpp -@@ -779,6 +779,12 @@ IDBDatabase::Close() - return NS_OK; - } - -+const nsACString& -+IDBDatabase::StorageOrigin() -+{ -+ return Origin(); -+} -+ - nsISupports* - IDBDatabase::StorageId() - { -diff --git dom/indexedDB/IDBFactory.cpp dom/indexedDB/IDBFactory.cpp -index 1007df1..c1f573e 100644 ---- mozilla/dom/indexedDB/IDBFactory.cpp -+++ mozilla/dom/indexedDB/IDBFactory.cpp -@@ -253,8 +253,26 @@ IDBFactory::Create(ContentParent* aContentParent, - } - - // static -+already_AddRefed -+IDBFactory::GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin) -+{ -+ nsCOMPtr uri; -+ nsresult rv = NS_NewFileURI(getter_AddRefs(uri), aDatabaseFile); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ nsCOMPtr fileUrl = do_QueryInterface(uri); -+ NS_ASSERTION(fileUrl, "This should always succeed!"); -+ -+ rv = fileUrl->SetQuery(NS_LITERAL_CSTRING("origin=") + aOrigin); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ return fileUrl.forget(); -+} -+ -+// static - already_AddRefed --IDBFactory::GetConnection(const nsAString& aDatabaseFilePath) -+IDBFactory::GetConnection(const nsAString& aDatabaseFilePath, -+ const nsACString& aOrigin) - { - NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!"); - NS_ASSERTION(StringEndsWith(aDatabaseFilePath, NS_LITERAL_STRING(".sqlite")), -@@ -271,13 +289,15 @@ IDBFactory::GetConnection(const nsAString& aDatabaseFilePath) - NS_ENSURE_SUCCESS(rv, nullptr); - NS_ENSURE_TRUE(exists, nullptr); - -- nsCOMPtr ss = -+ nsCOMPtr dbFileUrl = GetDatabaseFileURL(dbFile, aOrigin); -+ NS_ENSURE_TRUE(dbFileUrl, nullptr); -+ -+ nsCOMPtr ss = - do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID); - NS_ENSURE_TRUE(ss, nullptr); - - nsCOMPtr connection; -- rv = ss->OpenDatabaseWithVFS(dbFile, NS_LITERAL_CSTRING("quota"), -- getter_AddRefs(connection)); -+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection)); - NS_ENSURE_SUCCESS(rv, nullptr); - - // Turn on foreign key constraints and recursive triggers. -diff --git dom/indexedDB/IDBFactory.h dom/indexedDB/IDBFactory.h -index d5461f7..49dad42 100644 ---- mozilla/dom/indexedDB/IDBFactory.h -+++ mozilla/dom/indexedDB/IDBFactory.h -@@ -15,6 +15,8 @@ - #include "nsCycleCollectionParticipant.h" - - class nsIAtom; -+class nsIFile; -+class nsIFileURL; - class nsPIDOMWindow; - - namespace mozilla { -@@ -75,8 +77,12 @@ public: - static nsresult Create(ContentParent* aContentParent, - IDBFactory** aFactory); - -+ static already_AddRefed -+ GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin); -+ - static already_AddRefed -- GetConnection(const nsAString& aDatabaseFilePath); -+ GetConnection(const nsAString& aDatabaseFilePath, -+ const nsACString& aOrigin); - - static nsresult - LoadDatabaseInformation(mozIStorageConnection* aConnection, -diff --git dom/indexedDB/IDBFileHandle.cpp dom/indexedDB/IDBFileHandle.cpp -index e0340ff..f71fd56 100644 ---- mozilla/dom/indexedDB/IDBFileHandle.cpp -+++ mozilla/dom/indexedDB/IDBFileHandle.cpp -@@ -6,15 +6,14 @@ - - #include "IDBFileHandle.h" - --#include "nsIStandardFileStream.h" -- - #include "mozilla/dom/file/File.h" -+#include "mozilla/dom/quota/FileStreams.h" - #include "nsDOMClassInfoID.h" - --#include "FileStream.h" - #include "IDBDatabase.h" - - USING_INDEXEDDB_NAMESPACE -+USING_QUOTA_NAMESPACE - - namespace { - -@@ -68,22 +67,22 @@ IDBFileHandle::Create(IDBDatabase* aDatabase, - already_AddRefed - IDBFileHandle::CreateStream(nsIFile* aFile, bool aReadOnly) - { -- nsRefPtr stream = new FileStream(); -+ const nsACString& origin = mFileStorage->StorageOrigin(); -+ -+ nsCOMPtr result; - -- nsString streamMode; - if (aReadOnly) { -- streamMode.AssignLiteral("rb"); -+ nsRefPtr stream = FileInputStream::Create( -+ origin, aFile, -1, -1, nsIFileInputStream::DEFER_OPEN); -+ result = NS_ISUPPORTS_CAST(nsIFileInputStream*, stream); - } - else { -- streamMode.AssignLiteral("r+b"); -+ nsRefPtr stream = FileStream::Create( -+ origin, aFile, -1, -1, nsIFileStream::DEFER_OPEN); -+ result = NS_ISUPPORTS_CAST(nsIFileStream*, stream); - } -+ NS_ENSURE_TRUE(result, nullptr); - -- nsresult rv = stream->Init(aFile, streamMode, -- nsIStandardFileStream::FLAGS_DEFER_OPEN); -- NS_ENSURE_SUCCESS(rv, nullptr); -- -- nsCOMPtr result = -- NS_ISUPPORTS_CAST(nsIStandardFileStream*, stream); - return result.forget(); - } - -diff --git dom/indexedDB/IDBObjectStore.cpp dom/indexedDB/IDBObjectStore.cpp -index 746d473..1f16d26 100644 ---- mozilla/dom/indexedDB/IDBObjectStore.cpp -+++ mozilla/dom/indexedDB/IDBObjectStore.cpp -@@ -17,6 +17,7 @@ - #include "mozilla/dom/ContentParent.h" - #include "mozilla/dom/StructuredCloneTags.h" - #include "mozilla/dom/ipc/Blob.h" -+#include "mozilla/dom/quota/FileStreams.h" - #include "mozilla/storage.h" - #include "nsContentUtils.h" - #include "nsDOMClassInfo.h" -@@ -27,10 +28,8 @@ - #include "nsServiceManagerUtils.h" - #include "nsThreadUtils.h" - #include "snappy/snappy.h" --#include "test_quota.h" - - #include "AsyncConnectionHelper.h" --#include "FileStream.h" - #include "IDBCursor.h" - #include "IDBEvents.h" - #include "IDBFileHandle.h" -@@ -51,6 +50,7 @@ - USING_INDEXEDDB_NAMESPACE - using namespace mozilla::dom; - using namespace mozilla::dom::indexedDB::ipc; -+using mozilla::dom::quota::FileOutputStream; - - namespace { - -@@ -2734,9 +2734,9 @@ AddHelper::DoDatabaseWork(mozIStorageConnection* aConnection) - nativeFile = fileManager->GetFileForId(directory, id); - NS_ENSURE_TRUE(nativeFile, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- nsRefPtr outputStream = new FileStream(); -- rv = outputStream->Init(nativeFile, NS_LITERAL_STRING("wb"), 0); -- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ nsRefPtr outputStream = FileOutputStream::Create( -+ mObjectStore->Transaction()->Database()->Origin(), nativeFile); -+ NS_ENSURE_TRUE(outputStream, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - - rv = CopyData(inputStream, outputStream); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -diff --git dom/indexedDB/IDBTransaction.cpp dom/indexedDB/IDBTransaction.cpp -index fcef7cc..a5345e2 100644 ---- mozilla/dom/indexedDB/IDBTransaction.cpp -+++ mozilla/dom/indexedDB/IDBTransaction.cpp -@@ -352,7 +352,8 @@ IDBTransaction::GetOrCreateConnection(mozIStorageConnection** aResult) - - if (!mConnection) { - nsCOMPtr connection = -- IDBFactory::GetConnection(mDatabase->FilePath()); -+ IDBFactory::GetConnection(mDatabase->FilePath(), -+ mDatabase->Origin()); - NS_ENSURE_TRUE(connection, NS_ERROR_FAILURE); - - nsresult rv; -diff --git dom/indexedDB/IndexedDatabaseInlines.h dom/indexedDB/IndexedDatabaseInlines.h -index 62e65d6..f27d60c 100644 ---- mozilla/dom/indexedDB/IndexedDatabaseInlines.h -+++ mozilla/dom/indexedDB/IndexedDatabaseInlines.h -@@ -79,4 +79,17 @@ AppendConditionClause(const nsACString& aColumnName, - aResult += NS_LITERAL_CSTRING(" :") + aArgName; - } - -+inline void -+IncrementUsage(uint64_t* aUsage, uint64_t aDelta) -+{ -+ // Watch for overflow! -+ if ((UINT64_MAX - *aUsage) < aDelta) { -+ NS_WARNING("Usage exceeds the maximum!"); -+ *aUsage = UINT64_MAX; -+ } -+ else { -+ *aUsage += aDelta; -+ } -+} -+ - END_INDEXEDDB_NAMESPACE -diff --git dom/indexedDB/IndexedDatabaseManager.cpp dom/indexedDB/IndexedDatabaseManager.cpp -index e4ad647..88f09da 100644 ---- mozilla/dom/indexedDB/IndexedDatabaseManager.cpp -+++ mozilla/dom/indexedDB/IndexedDatabaseManager.cpp -@@ -22,6 +22,7 @@ - #include "nsITimer.h" - - #include "mozilla/dom/file/FileService.h" -+#include "mozilla/dom/quota/QuotaManager.h" - #include "mozilla/dom/TabContext.h" - #include "mozilla/LazyIdleThread.h" - #include "mozilla/Preferences.h" -@@ -36,7 +37,6 @@ - #include "nsThreadUtils.h" - #include "nsXPCOM.h" - #include "nsXPCOMPrivate.h" --#include "test_quota.h" - #include "xpcpublic.h" - - #include "AsyncConnectionHelper.h" -@@ -48,6 +48,8 @@ - #include "OpenDatabaseHelper.h" - #include "TransactionThreadPool.h" - -+#include "IndexedDatabaseInlines.h" -+ - // The amount of time, in milliseconds, that our IO thread will stay alive - // after the last event it processes. - #define DEFAULT_THREAD_TIMEOUT_MS 30000 -@@ -70,6 +72,7 @@ using namespace mozilla::services; - using namespace mozilla::dom; - using mozilla::Preferences; - using mozilla::dom::file::FileService; -+using mozilla::dom::quota::QuotaManager; - - static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); - -@@ -103,29 +106,6 @@ GetDatabaseBaseFilename(const nsAString& aFilename, - return true; - } - --class QuotaCallback MOZ_FINAL : public mozIStorageQuotaCallback --{ --public: -- NS_DECL_ISUPPORTS -- -- NS_IMETHOD -- QuotaExceeded(const nsACString& aFilename, -- int64_t aCurrentSizeLimit, -- int64_t aCurrentTotalSize, -- nsISupports* aUserData, -- int64_t* _retval) -- { -- if (IndexedDatabaseManager::QuotaIsLifted()) { -- *_retval = 0; -- return NS_OK; -- } -- -- return NS_ERROR_FAILURE; -- } --}; -- --NS_IMPL_THREADSAFE_ISUPPORTS1(QuotaCallback, mozIStorageQuotaCallback) -- - // Adds all databases in the hash to the given array. - template - PLDHashOperator -@@ -440,8 +420,8 @@ IndexedDatabaseManager::GetOrCreate() - NS_LITERAL_CSTRING("IndexedDB I/O"), - LazyIdleThread::ManualShutdown); - -- // We need one quota callback object to hand to SQLite. -- instance->mQuotaCallbackSingleton = new QuotaCallback(); -+ // Make sure that the quota manager is up. -+ NS_ENSURE_TRUE(QuotaManager::GetOrCreate(), nullptr); - - // Make a timer here to avoid potential failures later. We don't actually - // initialize the timer until shutdown. -@@ -996,37 +976,15 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin, - return NS_OK; - } - -- // First figure out the filename pattern we'll use. -- nsCOMPtr patternFile; -- rv = directory->Clone(getter_AddRefs(patternFile)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- rv = patternFile->Append(NS_LITERAL_STRING("*")); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsString pattern; -- rv = patternFile->GetPath(pattern); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // Now tell SQLite to start tracking this pattern for content. -- nsCOMPtr ss = -- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID); -- NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE); -- -- if (aPrivilege != Chrome) { -- rv = ss->SetQuotaForFilenamePattern(NS_ConvertUTF16toUTF8(pattern), -- GetIndexedDBQuotaMB() * 1024 * 1024, -- mQuotaCallbackSingleton, nullptr); -- NS_ENSURE_SUCCESS(rv, rv); -- } -- - // We need to see if there are any files in the directory already. If they - // are database files then we need to cleanup stored files (if it's needed) -- // and also tell SQLite about all of them. -+ // and also initialize the quota. - - nsAutoTArray subdirsToProcess; - nsAutoTArray , 20> unknownFiles; - -+ uint64_t usage = 0; -+ - nsTHashtable validSubdirs; - validSubdirs.Init(20); - -@@ -1068,20 +1026,28 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin, - continue; - } - -- nsCOMPtr fileManagerDirectory; -- rv = directory->Clone(getter_AddRefs(fileManagerDirectory)); -+ nsCOMPtr fmDirectory; -+ rv = directory->Clone(getter_AddRefs(fmDirectory)); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = fileManagerDirectory->Append(dbBaseFilename); -+ rv = fmDirectory->Append(dbBaseFilename); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = FileManager::InitDirectory(ss, fileManagerDirectory, file, -- aPrivilege); -+ rv = FileManager::InitDirectory(fmDirectory, file, aOrigin); - NS_ENSURE_SUCCESS(rv, rv); - - if (aPrivilege != Chrome) { -- rv = ss->UpdateQuotaInformationForFile(file); -+ uint64_t fileUsage; -+ rv = FileManager::GetUsage(fmDirectory, &fileUsage); - NS_ENSURE_SUCCESS(rv, rv); -+ -+ IncrementUsage(&usage, fileUsage); -+ -+ int64_t fileSize; -+ rv = file->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ IncrementUsage(&usage, uint64_t(fileSize)); - } - - validSubdirs.PutEntry(dbBaseFilename); -@@ -1117,12 +1083,39 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin, - } - } - -+ if (aPrivilege != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->InitQuotaForOrigin(aOrigin, GetIndexedDBQuotaMB(), usage); -+ } -+ - mInitializedOrigins.AppendElement(aOrigin); - - NS_ADDREF(*aDirectory = directory); - return NS_OK; - } - -+void -+IndexedDatabaseManager::UninitializeOriginsByPattern( -+ const nsACString& aPattern) -+{ -+#ifdef DEBUG -+ { -+ bool correctThread; -+ NS_ASSERTION(NS_SUCCEEDED(mIOThread->IsOnCurrentThread(&correctThread)) && -+ correctThread, -+ "Running on the wrong thread!"); -+ } -+#endif -+ -+ for (int32_t i = mInitializedOrigins.Length() - 1; i >= 0; i--) { -+ if (PatternMatchesOrigin(aPattern, mInitializedOrigins[i])) { -+ mInitializedOrigins.RemoveElementAt(i); -+ } -+ } -+} -+ - bool - IndexedDatabaseManager::QuotaIsLiftedInternal() - { -@@ -1250,16 +1243,14 @@ IndexedDatabaseManager::GetFileManager(const nsACString& aOrigin, - } - - void --IndexedDatabaseManager::AddFileManager(const nsACString& aOrigin, -- const nsAString& aDatabaseName, -- FileManager* aFileManager) -+IndexedDatabaseManager::AddFileManager(FileManager* aFileManager) - { - NS_ASSERTION(aFileManager, "Null file manager!"); - - nsTArray >* array; -- if (!mFileManagers.Get(aOrigin, &array)) { -+ if (!mFileManagers.Get(aFileManager->Origin(), &array)) { - array = new nsTArray >(); -- mFileManagers.Put(aOrigin, array); -+ mFileManagers.Put(aFileManager->Origin(), array); - } - - array->AppendElement(aFileManager); -@@ -1783,6 +1774,13 @@ OriginClearRunnable::DeleteFiles(IndexedDatabaseManager* aManager) - // correctly... - NS_ERROR("Failed to remove directory!"); - } -+ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->RemoveQuotaForPattern(mOriginOrPattern); -+ -+ aManager->UninitializeOriginsByPattern(mOriginOrPattern); - } - } - -@@ -1880,19 +1878,6 @@ IndexedDatabaseManager::AsyncUsageRunnable::Cancel() - } - } - --inline void --IncrementUsage(uint64_t* aUsage, uint64_t aDelta) --{ -- // Watch for overflow! -- if ((INT64_MAX - *aUsage) <= aDelta) { -- NS_WARNING("Database sizes exceed max we can report!"); -- *aUsage = INT64_MAX; -- } -- else { -- *aUsage += aDelta; -- } --} -- - nsresult - IndexedDatabaseManager::AsyncUsageRunnable::TakeShortcut() - { -@@ -2295,25 +2280,22 @@ IndexedDatabaseManager::AsyncDeleteFileRunnable::Run() - nsCOMPtr file = mFileManager->GetFileForId(directory, mFileId); - NS_ENSURE_TRUE(file, NS_ERROR_FAILURE); - -- nsString filePath; -- nsresult rv = file->GetPath(filePath); -- NS_ENSURE_SUCCESS(rv, rv); -+ nsresult rv; -+ int64_t fileSize; - -- int rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(filePath).get()); -- if (rc != SQLITE_OK) { -- NS_WARNING("Failed to delete stored file!"); -- return NS_ERROR_FAILURE; -+ if (mFileManager->Privilege() != Chrome) { -+ rv = file->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); - } - -- // sqlite3_quota_remove won't actually remove anything if we're not tracking -- // the quota here. Manually remove the file if it exists. -- bool exists; -- rv = file->Exists(&exists); -- NS_ENSURE_SUCCESS(rv, rv); -+ rv = file->Remove(false); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); - -- if (exists) { -- rv = file->Remove(false); -- NS_ENSURE_SUCCESS(rv, rv); -+ if (mFileManager->Privilege() != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->DecreaseUsageForOrigin(mFileManager->Origin(), fileSize); - } - - directory = mFileManager->GetJournalDirectory(); -diff --git dom/indexedDB/IndexedDatabaseManager.h dom/indexedDB/IndexedDatabaseManager.h -index f9fbbf2..1ea5425 100644 ---- mozilla/dom/indexedDB/IndexedDatabaseManager.h -+++ mozilla/dom/indexedDB/IndexedDatabaseManager.h -@@ -23,7 +23,6 @@ - - #define INDEXEDDB_MANAGER_CONTRACTID "@mozilla.org/dom/indexeddb/manager;1" - --class mozIStorageQuotaCallback; - class nsIAtom; - class nsIFile; - class nsITimer; -@@ -134,6 +133,8 @@ public: - FactoryPrivilege aPrivilege, - nsIFile** aDirectory); - -+ void UninitializeOriginsByPattern(const nsACString& aPattern); -+ - // Determine if the quota is lifted for the Window the current thread is - // using. - static inline bool -@@ -172,9 +173,7 @@ public: - const nsAString& aDatabaseName); - - void -- AddFileManager(const nsACString& aOrigin, -- const nsAString& aDatabaseName, -- FileManager* aFileManager); -+ AddFileManager(FileManager* aFileManager); - - void InvalidateFileManagersForPattern(const nsACString& aPattern); - -@@ -502,10 +501,6 @@ private: - // A timer that gets activated at shutdown to ensure we close all databases. - nsCOMPtr mShutdownTimer; - -- // A single threadsafe instance of our quota callback. Created on the main -- // thread during GetOrCreate(). -- nsCOMPtr mQuotaCallbackSingleton; -- - // A list of all successfully initialized origins. This list isn't protected - // by any mutex but it is only ever touched on the IO thread. - nsTArray mInitializedOrigins; -diff --git dom/indexedDB/Makefile.in dom/indexedDB/Makefile.in -index fef0858..09d4853 100644 ---- mozilla/dom/indexedDB/Makefile.in -+++ mozilla/dom/indexedDB/Makefile.in -@@ -25,7 +25,6 @@ CPPSRCS = \ - DatabaseInfo.cpp \ - FileInfo.cpp \ - FileManager.cpp \ -- FileStream.cpp \ - IDBCursor.cpp \ - IDBDatabase.cpp \ - IDBEvents.cpp \ -@@ -93,7 +92,6 @@ XPIDLSRCS = \ - nsIIDBVersionChangeEvent.idl \ - nsIIDBOpenDBRequest.idl \ - nsIIndexedDatabaseManager.idl \ -- nsIStandardFileStream.idl \ - $(NULL) - - DIRS += ipc -diff --git dom/indexedDB/OpenDatabaseHelper.cpp dom/indexedDB/OpenDatabaseHelper.cpp -index e71cad4..4cd7f61 100644 ---- mozilla/dom/indexedDB/OpenDatabaseHelper.cpp -+++ mozilla/dom/indexedDB/OpenDatabaseHelper.cpp -@@ -8,11 +8,12 @@ - - #include "nsIFile.h" - -+#include "mozilla/dom/quota/QuotaManager.h" - #include "mozilla/storage.h" - #include "nsEscape.h" -+#include "nsNetUtil.h" - #include "nsThreadUtils.h" - #include "snappy/snappy.h" --#include "test_quota.h" - - #include "nsIBFCacheEntry.h" - #include "IDBEvents.h" -@@ -21,6 +22,7 @@ - - using namespace mozilla; - USING_INDEXEDDB_NAMESPACE -+USING_QUOTA_NAMESPACE - - namespace { - -@@ -1632,15 +1634,15 @@ OpenDatabaseHelper::DoDatabaseWork() - rv = dbFile->GetPath(mDatabaseFilePath); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- nsCOMPtr fileManagerDirectory; -- rv = dbDirectory->Clone(getter_AddRefs(fileManagerDirectory)); -+ nsCOMPtr fmDirectory; -+ rv = dbDirectory->Clone(getter_AddRefs(fmDirectory)); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = fileManagerDirectory->Append(filename); -+ rv = fmDirectory->Append(filename); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - - nsCOMPtr connection; -- rv = CreateDatabaseConnection(mName, dbFile, fileManagerDirectory, -+ rv = CreateDatabaseConnection(dbFile, fmDirectory, mName, mASCIIOrigin, - getter_AddRefs(connection)); - if (NS_FAILED(rv) && - NS_ERROR_GET_MODULE(rv) != NS_ERROR_MODULE_DOM_INDEXEDDB) { -@@ -1691,12 +1693,12 @@ OpenDatabaseHelper::DoDatabaseWork() - - nsRefPtr fileManager = mgr->GetFileManager(mASCIIOrigin, mName); - if (!fileManager) { -- fileManager = new FileManager(mASCIIOrigin, mName); -+ fileManager = new FileManager(mASCIIOrigin, mPrivilege, mName); - -- rv = fileManager->Init(fileManagerDirectory, connection); -+ rv = fileManager->Init(fmDirectory, connection); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- mgr->AddFileManager(mASCIIOrigin, mName, fileManager); -+ mgr->AddFileManager(fileManager); - } - - mFileManager = fileManager.forget(); -@@ -1707,23 +1709,26 @@ OpenDatabaseHelper::DoDatabaseWork() - // static - nsresult - OpenDatabaseHelper::CreateDatabaseConnection( -- const nsAString& aName, - nsIFile* aDBFile, -- nsIFile* aFileManagerDirectory, -+ nsIFile* aFMDirectory, -+ const nsAString& aName, -+ const nsACString& aOrigin, - mozIStorageConnection** aConnection) - { - NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!"); - NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!"); - -- NS_NAMED_LITERAL_CSTRING(quotaVFSName, "quota"); -+ nsCOMPtr dbFileUrl = -+ IDBFactory::GetDatabaseFileURL(aDBFile, aOrigin); -+ NS_ENSURE_TRUE(dbFileUrl, NS_ERROR_FAILURE); - -- nsCOMPtr ss = -+ nsCOMPtr ss = - do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID); - NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE); - - nsCOMPtr connection; -- nsresult rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName, -- getter_AddRefs(connection)); -+ nsresult rv = -+ ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection)); - if (rv == NS_ERROR_FILE_CORRUPTED) { - // If we're just opening the database during origin initialization, then - // we don't want to erase any files. The failure here will fail origin -@@ -1737,21 +1742,20 @@ OpenDatabaseHelper::CreateDatabaseConnection( - NS_ENSURE_SUCCESS(rv, rv); - - bool exists; -- rv = aFileManagerDirectory->Exists(&exists); -+ rv = aFMDirectory->Exists(&exists); - NS_ENSURE_SUCCESS(rv, rv); - - if (exists) { - bool isDirectory; -- rv = aFileManagerDirectory->IsDirectory(&isDirectory); -+ rv = aFMDirectory->IsDirectory(&isDirectory); - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = aFileManagerDirectory->Remove(true); -+ rv = aFMDirectory->Remove(true); - NS_ENSURE_SUCCESS(rv, rv); - } - -- rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName, -- getter_AddRefs(connection)); -+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection)); - } - NS_ENSURE_SUCCESS(rv, rv); - -@@ -2347,6 +2351,8 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection) - { - NS_ASSERTION(!aConnection, "How did we get a connection here?"); - -+ const FactoryPrivilege& privilege = mOpenHelper->Privilege(); -+ - IndexedDatabaseManager* mgr = IndexedDatabaseManager::Get(); - NS_ASSERTION(mgr, "This should never fail!"); - -@@ -2372,59 +2378,57 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection) - rv = dbFile->Exists(&exists); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- int rc; -- - if (exists) { -- nsString dbFilePath; -- rv = dbFile->GetPath(dbFilePath); -- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ int64_t fileSize; - -- rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(dbFilePath).get()); -- if (rc != SQLITE_OK) { -- NS_WARNING("Failed to delete db file!"); -- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; -+ if (privilege != Chrome) { -+ rv = dbFile->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - } - -- // sqlite3_quota_remove won't actually remove anything if we're not tracking -- // the quota here. Manually remove the file if it exists. -- rv = dbFile->Exists(&exists); -+ rv = dbFile->Remove(false); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- if (exists) { -- rv = dbFile->Remove(false); -- NS_ENSURE_SUCCESS(rv, rv); -+ if (privilege != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, fileSize); - } - } - -- nsCOMPtr fileManagerDirectory; -- rv = directory->Clone(getter_AddRefs(fileManagerDirectory)); -- NS_ENSURE_SUCCESS(rv, rv); -+ nsCOMPtr fmDirectory; -+ rv = directory->Clone(getter_AddRefs(fmDirectory)); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = fileManagerDirectory->Append(filename); -+ rv = fmDirectory->Append(filename); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = fileManagerDirectory->Exists(&exists); -+ rv = fmDirectory->Exists(&exists); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - - if (exists) { - bool isDirectory; -- rv = fileManagerDirectory->IsDirectory(&isDirectory); -+ rv = fmDirectory->IsDirectory(&isDirectory); - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- nsString fileManagerDirectoryPath; -- rv = fileManagerDirectory->GetPath(fileManagerDirectoryPath); -- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ uint64_t usage = 0; - -- rc = sqlite3_quota_remove( -- NS_ConvertUTF16toUTF8(fileManagerDirectoryPath).get()); -- if (rc != SQLITE_OK) { -- NS_WARNING("Failed to delete file directory!"); -- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; -+ if (privilege != Chrome) { -+ rv = FileManager::GetUsage(fmDirectory, &usage); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - } - -- rv = fileManagerDirectory->Remove(true); -- NS_ENSURE_SUCCESS(rv, rv); -+ rv = fmDirectory->Remove(true); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ -+ if (privilege != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, usage); -+ } - } - - return NS_OK; -diff --git dom/indexedDB/OpenDatabaseHelper.h dom/indexedDB/OpenDatabaseHelper.h -index 587301b..5a3d987 100644 ---- mozilla/dom/indexedDB/OpenDatabaseHelper.h -+++ mozilla/dom/indexedDB/OpenDatabaseHelper.h -@@ -77,10 +77,16 @@ public: - return mDatabase; - } - -+ const FactoryPrivilege& Privilege() const -+ { -+ return mPrivilege; -+ } -+ - static -- nsresult CreateDatabaseConnection(const nsAString& aName, -- nsIFile* aDBFile, -- nsIFile* aFileManagerDirectory, -+ nsresult CreateDatabaseConnection(nsIFile* aDBFile, -+ nsIFile* aFMDirectory, -+ const nsAString& aName, -+ const nsACString& aOrigin, - mozIStorageConnection** aConnection); - - protected: -diff --git dom/indexedDB/nsIStandardFileStream.idl dom/indexedDB/nsIStandardFileStream.idl -deleted file mode 100644 -index 265c3ed..0000000 ---- mozilla/dom/indexedDB/nsIStandardFileStream.idl -+++ /dev/null -@@ -1,60 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this file, -- * You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#include "nsISupports.idl" -- --interface nsIFile; -- --/** -- * A stream that allows you to read from a file or stream to a file -- * using standard file APIs. -- */ --[scriptable, uuid(ebbbb779-92a3-4b2a-b7cf-6efbe904c453)] --interface nsIStandardFileStream : nsISupports --{ -- /** -- * If this is set, the file will be opened (i.e., a call to -- * fopen done) only when we do an actual operation on the stream, -- * or more specifically, when one of the following is called: -- * - Seek -- * - Tell -- * - SetEOF -- * - Available -- * - Read -- * - Write -- * - Flush -- * - GetSize -- * - GetLastModified -- * - Sync -- * -- * FLAGS_DEFER_OPEN is useful if we use the stream on a background -- * thread, so that the opening and possible |stat|ing of the file -- * happens there as well. -- * -- * @note Using this flag results in the file not being opened -- * during the call to Init. This means that any errors that might -- * happen when this flag is not set would happen during the -- * first read. Also, the file is not locked when Init is called, -- * so it might be deleted before we try to read from it. -- */ -- const long FLAGS_DEFER_OPEN = 1 << 0; -- -- /** -- * @param file file to read from or stream to -- * @param mode file open mode (see fopen documentation) -- * @param flags flags specifying various behaviors of the class -- * (see enumerations in the class) -- */ -- void init(in nsIFile file, -- in AString mode, -- in long flags); -- -- /** -- * Flush all written content held in memory buffers out to disk. -- * This is the equivalent of fflush() -- */ -- void flushBuffers(); --}; -diff --git dom/indexedDB/test/Makefile.in dom/indexedDB/test/Makefile.in -index 9c79b14..4c9a201 100644 ---- mozilla/dom/indexedDB/test/Makefile.in -+++ mozilla/dom/indexedDB/test/Makefile.in -@@ -54,11 +54,13 @@ MOCHITEST_FILES = \ - test_file_os_delete.html \ - test_file_put_get_object.html \ - test_file_put_get_values.html \ -+ test_file_quota.html \ - test_file_replace.html \ - test_file_resurrection_delete.html \ - test_file_resurrection_transaction_abort.html \ - test_file_sharing.html \ - test_file_transaction_abort.html \ -+ test_filehandle_quota.html \ - test_filehandle_serialization.html \ - test_filehandle_store_snapshot.html \ - test_getAll.html \ -diff --git dom/indexedDB/test/file.js dom/indexedDB/test/file.js -index 07bd10a..3c6194a 100644 ---- mozilla/dom/indexedDB/test/file.js -+++ mozilla/dom/indexedDB/test/file.js -@@ -3,6 +3,8 @@ - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -+const DEFAULT_QUOTA = 50 * 1024 * 1024; -+ - var bufferCache = []; - var utils = SpecialPowers.getDOMWindowUtils(window); - -@@ -184,25 +186,6 @@ function getUsage(usageHandler) - idbManager.getUsageForURI(uri, callback); - } - --function getUsageSync() --{ -- let usage; -- -- getUsage(function(aUsage, aFileUsage) { -- usage = aUsage; -- }); -- -- let comp = SpecialPowers.wrap(Components); -- let thread = comp.classes["@mozilla.org/thread-manager;1"] -- .getService(comp.interfaces.nsIThreadManager) -- .currentThread; -- while (!usage) { -- thread.processNextEvent(true); -- } -- -- return usage; --} -- - function scheduleGC() - { - SpecialPowers.exactGC(window, continueToNextStep); -diff --git dom/indexedDB/test/test_file_quota.html dom/indexedDB/test/test_file_quota.html -index b07880d..9fbc0c0 100644 ---- mozilla/dom/indexedDB/test/test_file_quota.html -+++ mozilla/dom/indexedDB/test/test_file_quota.html -@@ -13,14 +13,12 @@ - function testSteps() - { - const READ_WRITE = IDBTransaction.READ_WRITE; -- const DEFAULT_QUOTA_MB = 50; - - const name = window.location.pathname; - - const objectStoreName = "Blobs"; - -- const testData = { key: 0, value: {} }; -- const fileData = { key: 1, file: null }; -+ const fileData = { key: 1, file: getNullFile("random.bin", DEFAULT_QUOTA) }; - - let request = indexedDB.open(name, 1); - request.onerror = errorHandler; -@@ -32,21 +30,17 @@ - - let db = event.target.result; - -- let objectStore = db.createObjectStore(objectStoreName, { }); -- objectStore.add(testData.value, testData.key); -- -- let size = (DEFAULT_QUOTA_MB + 1) * 1024 * 1024 - getUsageSync(); -- fileData.file = getNullFile("random.bin", size); -+ db.createObjectStore(objectStoreName, { }); - - event = yield; - - is(event.type, "success", "Got correct event type"); - - trans = db.transaction([objectStoreName], READ_WRITE); -- objectStore = trans.objectStore(objectStoreName); -+ let objectStore = trans.objectStore(objectStoreName); - - request = objectStore.add(fileData.file, fileData.key); -- request.addEventListener("error", new ExpectError("UnknownError")); -+ request.addEventListener("error", new ExpectError("UnknownError", true)); - request.onsuccess = unexpectedSuccessHandler; - event = yield; - -diff --git dom/indexedDB/test/test_filehandle_quota.html dom/indexedDB/test/test_filehandle_quota.html -index addaf01..0506279 100644 ---- mozilla/dom/indexedDB/test/test_filehandle_quota.html -+++ mozilla/dom/indexedDB/test/test_filehandle_quota.html -@@ -13,7 +13,6 @@ - function testSteps() - { - const READ_WRITE = IDBTransaction.READ_WRITE; -- const DEFAULT_QUOTA_MB = 50; - - const name = window.location.pathname; - -@@ -39,10 +38,10 @@ - - let lockedFile = fileHandle.open("readwrite"); - -- let blob = getNullBlob((50 + 1) * 1024 * 1024 - getUsageSync()); -+ let blob = getNullBlob(DEFAULT_QUOTA); - - request = lockedFile.write(blob); -- request.addEventListener("error", new ExpectError("UnknownError")); -+ request.addEventListener("error", new ExpectError("UnknownError", true)); - request.onsuccess = unexpectedSuccessHandler; - event = yield; - -diff --git dom/quota/FileStreams.cpp dom/quota/FileStreams.cpp -new file mode 100644 -index 0000000..9de244f ---- /dev/null -+++ mozilla/dom/quota/FileStreams.cpp -@@ -0,0 +1,123 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "FileStreams.h" -+ -+USING_QUOTA_NAMESPACE -+ -+template -+NS_IMETHODIMP -+FileQuotaStream::SetEOF() -+{ -+ nsresult rv = FileStreamBase::SetEOF(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (mQuotaObject) { -+ int64_t offset; -+ nsresult rv = FileStreamBase::Tell(&offset); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mQuotaObject->UpdateSize(offset); -+ } -+ -+ return NS_OK; -+} -+ -+template -+NS_IMETHODIMP -+FileQuotaStream::Close() -+{ -+ nsresult rv = FileStreamBase::Close(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mQuotaObject = nullptr; -+ -+ return NS_OK; -+} -+ -+template -+nsresult -+FileQuotaStream::DoOpen() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ NS_ASSERTION(!mQuotaObject, "Creating quota object more than once?"); -+ mQuotaObject = quotaManager->GetQuotaObject(mOrigin, -+ FileStreamBase::mOpenParams.localFile); -+ -+ nsresult rv = FileStreamBase::DoOpen(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (mQuotaObject && (FileStreamBase::mOpenParams.ioFlags & PR_TRUNCATE)) { -+ mQuotaObject->UpdateSize(0); -+ } -+ -+ return NS_OK; -+} -+ -+template -+NS_IMETHODIMP -+FileQuotaStreamWithWrite::Write(const char* aBuf, -+ uint32_t aCount, -+ uint32_t* _retval) -+{ -+ nsresult rv; -+ -+ if (FileQuotaStreamWithWrite::mQuotaObject) { -+ int64_t offset; -+ rv = FileStreamBase::Tell(&offset); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!FileQuotaStreamWithWrite:: -+ mQuotaObject->MaybeAllocateMoreSpace(offset, aCount)) { -+ return NS_ERROR_FAILURE; -+ } -+ } -+ -+ rv = FileStreamBase::Write(aBuf, aCount, _retval); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ return NS_OK; -+} -+ -+NS_IMPL_ISUPPORTS_INHERITED0(FileInputStream, nsFileInputStream) -+ -+already_AddRefed -+FileInputStream::Create(const nsACString& aOrigin, nsIFile* aFile, -+ int32_t aIOFlags, int32_t aPerm, -+ int32_t aBehaviorFlags) -+{ -+ nsRefPtr stream = new FileInputStream(aOrigin); -+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ return stream.forget(); -+} -+ -+NS_IMPL_ISUPPORTS_INHERITED0(FileOutputStream, nsFileOutputStream) -+ -+already_AddRefed -+FileOutputStream::Create(const nsACString& aOrigin, nsIFile* aFile, -+ int32_t aIOFlags, int32_t aPerm, -+ int32_t aBehaviorFlags) -+{ -+ nsRefPtr stream = new FileOutputStream(aOrigin); -+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ return stream.forget(); -+} -+ -+NS_IMPL_ISUPPORTS_INHERITED0(FileStream, nsFileStream) -+ -+already_AddRefed -+FileStream::Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags, -+ int32_t aPerm, int32_t aBehaviorFlags) -+{ -+ nsRefPtr stream = new FileStream(aOrigin); -+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ return stream.forget(); -+} -diff --git dom/quota/FileStreams.h dom/quota/FileStreams.h -new file mode 100644 -index 0000000..77bfad4 ---- /dev/null -+++ mozilla/dom/quota/FileStreams.h -@@ -0,0 +1,115 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_dom_quota_filestreams_h__ -+#define mozilla_dom_quota_filestreams_h__ -+ -+#include "QuotaCommon.h" -+ -+#include "nsFileStreams.h" -+ -+#include "QuotaManager.h" -+ -+BEGIN_QUOTA_NAMESPACE -+ -+template -+class FileQuotaStream : public FileStreamBase -+{ -+public: -+ // nsFileStreamBase override -+ NS_IMETHOD -+ SetEOF() MOZ_OVERRIDE; -+ -+ NS_IMETHOD -+ Close() MOZ_OVERRIDE; -+ -+protected: -+ FileQuotaStream(const nsACString& aOrigin) -+ : mOrigin(aOrigin) -+ { } -+ -+ // nsFileStreamBase override -+ virtual nsresult -+ DoOpen() MOZ_OVERRIDE; -+ -+ nsCString mOrigin; -+ nsRefPtr mQuotaObject; -+}; -+ -+template -+class FileQuotaStreamWithWrite : public FileQuotaStream -+{ -+public: -+ // nsFileStreamBase override -+ NS_IMETHOD -+ Write(const char* aBuf, uint32_t aCount, uint32_t* _retval) MOZ_OVERRIDE; -+ -+protected: -+ FileQuotaStreamWithWrite(const nsACString& aOrigin) -+ : FileQuotaStream(aOrigin) -+ { } -+}; -+ -+class FileInputStream : public FileQuotaStream -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ -+ static already_AddRefed -+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1, -+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0); -+ -+private: -+ FileInputStream(const nsACString& aOrigin) -+ : FileQuotaStream(aOrigin) -+ { } -+ -+ virtual ~FileInputStream() { -+ Close(); -+ } -+}; -+ -+class FileOutputStream : public FileQuotaStreamWithWrite -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ -+ static already_AddRefed -+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1, -+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0); -+ -+private: -+ FileOutputStream(const nsACString& aOrigin) -+ : FileQuotaStreamWithWrite(aOrigin) -+ { } -+ -+ virtual ~FileOutputStream() { -+ Close(); -+ } -+}; -+ -+class FileStream : public FileQuotaStreamWithWrite -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ -+ static already_AddRefed -+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1, -+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0); -+ -+private: -+ FileStream(const nsACString& aOrigin) -+ : FileQuotaStreamWithWrite(aOrigin) -+ { } -+ -+ virtual ~FileStream() { -+ Close(); -+ } -+}; -+ -+END_QUOTA_NAMESPACE -+ -+#endif /* mozilla_dom_quota_filestreams_h__ */ -diff --git dom/quota/Makefile.in dom/quota/Makefile.in -new file mode 100644 -index 0000000..49be551 ---- /dev/null -+++ mozilla/dom/quota/Makefile.in -@@ -0,0 +1,33 @@ -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this file, -+# You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+DEPTH = ../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = dom -+LIBRARY_NAME = domquota_s -+XPIDL_MODULE = dom_quota -+LIBXUL_LIBRARY = 1 -+FORCE_STATIC_LIB = 1 -+ -+include $(topsrcdir)/dom/dom-config.mk -+ -+EXPORTS_NAMESPACES = mozilla/dom/quota -+ -+CPPSRCS = \ -+ FileStreams.cpp \ -+ QuotaManager.cpp \ -+ $(NULL) -+ -+EXPORTS_mozilla/dom/quota = \ -+ FileStreams.h \ -+ QuotaCommon.h \ -+ QuotaManager.h \ -+ $(NULL) -+ -+include $(topsrcdir)/config/rules.mk -diff --git dom/quota/QuotaCommon.h dom/quota/QuotaCommon.h -new file mode 100644 -index 0000000..a415d17 ---- /dev/null -+++ mozilla/dom/quota/QuotaCommon.h -@@ -0,0 +1,23 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_dom_quota_quotacommon_h__ -+#define mozilla_dom_quota_quotacommon_h__ -+ -+#include "nsAutoPtr.h" -+#include "nsCOMPtr.h" -+#include "nsDebug.h" -+#include "nsStringGlue.h" -+#include "nsTArray.h" -+ -+#define BEGIN_QUOTA_NAMESPACE \ -+ namespace mozilla { namespace dom { namespace quota { -+#define END_QUOTA_NAMESPACE \ -+ } /* namespace quota */ } /* namespace dom */ } /* namespace mozilla */ -+#define USING_QUOTA_NAMESPACE \ -+ using namespace mozilla::dom::quota; -+ -+#endif // mozilla_dom_quota_quotacommon_h__ -diff --git dom/quota/QuotaManager.cpp dom/quota/QuotaManager.cpp -new file mode 100644 -index 0000000..b251606 ---- /dev/null -+++ mozilla/dom/quota/QuotaManager.cpp -@@ -0,0 +1,294 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "QuotaManager.h" -+ -+#include "nsIFile.h" -+ -+#include "mozilla/ClearOnShutdown.h" -+#include "nsComponentManagerUtils.h" -+ -+#include "mozilla/dom/indexedDB/IndexedDatabaseManager.h" -+ -+USING_QUOTA_NAMESPACE -+ -+namespace { -+ -+nsAutoPtr gInstance; -+ -+PLDHashOperator -+RemoveQuotaForPatternCallback(const nsACString& aKey, -+ nsRefPtr& aValue, -+ void* aUserArg) -+{ -+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!"); -+ NS_ASSERTION(aValue, "Null pointer!"); -+ NS_ASSERTION(aUserArg, "Null pointer!"); -+ -+ const nsACString* pattern = -+ static_cast(aUserArg); -+ -+ if (StringBeginsWith(aKey, *pattern)) { -+ return PL_DHASH_REMOVE; -+ } -+ -+ return PL_DHASH_NEXT; -+} -+ -+} // anonymous namespace -+ -+void -+QuotaObject::AddRef() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ if (!quotaManager) { -+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!"); -+ -+ NS_AtomicIncrementRefcnt(mRefCnt); -+ -+ return; -+ } -+ -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ ++mRefCnt; -+} -+ -+void -+QuotaObject::Release() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ if (!quotaManager) { -+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!"); -+ -+ nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt); -+ if (count == 0) { -+ mRefCnt = 1; -+ delete this; -+ } -+ -+ return; -+ } -+ -+ { -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ --mRefCnt; -+ -+ if (mRefCnt > 0) { -+ return; -+ } -+ -+ if (mOriginInfo) { -+ mOriginInfo->mQuotaObjects.Remove(mPath); -+ } -+ } -+ -+ delete this; -+} -+ -+void -+QuotaObject::UpdateSize(int64_t aSize) -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ if (mOriginInfo) { -+ mOriginInfo->mUsage -= mSize; -+ mSize = aSize; -+ mOriginInfo->mUsage += mSize; -+ } -+} -+ -+bool -+QuotaObject::MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount) -+{ -+ int64_t end = aOffset + aCount; -+ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ if (mSize >= end || !mOriginInfo) { -+ return true; -+ } -+ -+ int64_t newUsage = mOriginInfo->mUsage - mSize + end; -+ if (newUsage > mOriginInfo->mLimit) { -+ if (!indexedDB::IndexedDatabaseManager::QuotaIsLifted()) { -+ return false; -+ } -+ -+ nsCString origin = mOriginInfo->mOrigin; -+ -+ mOriginInfo->LockedClearOriginInfos(); -+ NS_ASSERTION(!mOriginInfo, -+ "Should have cleared in LockedClearOriginInfos!"); -+ -+ quotaManager->mOriginInfos.Remove(origin); -+ -+ mSize = end; -+ -+ return true; -+ } -+ -+ mOriginInfo->mUsage = newUsage; -+ mSize = end; -+ -+ return true; -+} -+ -+#ifdef DEBUG -+void -+OriginInfo::LockedClearOriginInfos() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->mQuotaMutex.AssertCurrentThreadOwns(); -+ -+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr); -+} -+#endif -+ -+// static -+PLDHashOperator -+OriginInfo::ClearOriginInfoCallback(const nsAString& aKey, -+ QuotaObject* aValue, -+ void* aUserArg) -+{ -+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!"); -+ NS_ASSERTION(aValue, "Null pointer!"); -+ -+ aValue->mOriginInfo = nullptr; -+ -+ return PL_DHASH_NEXT; -+} -+ -+// static -+QuotaManager* -+QuotaManager::GetOrCreate() -+{ -+ if (!gInstance) { -+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); -+ -+ gInstance = new QuotaManager(); -+ -+ ClearOnShutdown(&gInstance); -+ } -+ -+ return gInstance; -+} -+ -+// static -+QuotaManager* -+QuotaManager::Get() -+{ -+ // Does not return an owning reference. -+ return gInstance; -+} -+ -+void -+QuotaManager::InitQuotaForOrigin(const nsACString& aOrigin, -+ int64_t aLimit, -+ int64_t aUsage) -+{ -+ OriginInfo* info = new OriginInfo(aOrigin, aLimit * 1024 * 1024, aUsage); -+ -+ MutexAutoLock lock(mQuotaMutex); -+ -+ NS_ASSERTION(!mOriginInfos.GetWeak(aOrigin), "Replacing an existing entry!"); -+ mOriginInfos.Put(aOrigin, info); -+} -+ -+void -+QuotaManager::DecreaseUsageForOrigin(const nsACString& aOrigin, -+ int64_t aSize) -+{ -+ MutexAutoLock lock(mQuotaMutex); -+ -+ nsRefPtr originInfo; -+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo)); -+ -+ if (originInfo) { -+ originInfo->mUsage -= aSize; -+ } -+} -+ -+void -+QuotaManager::RemoveQuotaForPattern(const nsACString& aPattern) -+{ -+ NS_ASSERTION(!aPattern.IsEmpty(), "Empty pattern!"); -+ -+ MutexAutoLock lock(mQuotaMutex); -+ -+ mOriginInfos.Enumerate(RemoveQuotaForPatternCallback, -+ const_cast(&aPattern)); -+} -+ -+already_AddRefed -+QuotaManager::GetQuotaObject(const nsACString& aOrigin, -+ nsIFile* aFile) -+{ -+ NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!"); -+ -+ nsString path; -+ nsresult rv = aFile->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ int64_t fileSize; -+ -+ bool exists; -+ rv = aFile->Exists(&exists); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ if (exists) { -+ rv = aFile->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ } -+ else { -+ fileSize = 0; -+ } -+ -+ QuotaObject* info = nullptr; -+ { -+ MutexAutoLock lock(mQuotaMutex); -+ -+ nsRefPtr originInfo; -+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo)); -+ -+ if (!originInfo) { -+ return nullptr; -+ } -+ -+ originInfo->mQuotaObjects.Get(path, &info); -+ -+ if (!info) { -+ info = new QuotaObject(originInfo, path, fileSize); -+ originInfo->mQuotaObjects.Put(path, info); -+ } -+ } -+ -+ nsRefPtr result = info; -+ return result.forget(); -+} -+ -+already_AddRefed -+QuotaManager::GetQuotaObject(const nsACString& aOrigin, -+ const nsAString& aPath) -+{ -+ nsresult rv; -+ nsCOMPtr file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ rv = file->InitWithPath(aPath); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ return GetQuotaObject(aOrigin, file); -+} -diff --git dom/quota/QuotaManager.h dom/quota/QuotaManager.h -new file mode 100644 -index 0000000..e19acdd ---- /dev/null -+++ mozilla/dom/quota/QuotaManager.h -@@ -0,0 +1,147 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_dom_quota_quotamanager_h__ -+#define mozilla_dom_quota_quotamanager_h__ -+ -+#include "QuotaCommon.h" -+ -+#include "mozilla/Mutex.h" -+#include "nsDataHashtable.h" -+#include "nsRefPtrHashtable.h" -+#include "nsThreadUtils.h" -+ -+BEGIN_QUOTA_NAMESPACE -+ -+class OriginInfo; -+class QuotaManager; -+ -+class QuotaObject -+{ -+ friend class OriginInfo; -+ friend class QuotaManager; -+ -+public: -+ void -+ AddRef(); -+ -+ void -+ Release(); -+ -+ void -+ UpdateSize(int64_t aSize); -+ -+ bool -+ MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount); -+ -+private: -+ QuotaObject(OriginInfo* aOriginInfo, const nsAString& aPath, int64_t aSize) -+ : mOriginInfo(aOriginInfo), mPath(aPath), mSize(aSize) -+ { } -+ -+ virtual ~QuotaObject() -+ { } -+ -+ nsAutoRefCnt mRefCnt; -+ -+ OriginInfo* mOriginInfo; -+ nsString mPath; -+ int64_t mSize; -+}; -+ -+class OriginInfo -+{ -+ friend class QuotaManager; -+ friend class QuotaObject; -+ -+public: -+ OriginInfo(const nsACString& aOrigin, int64_t aLimit, int64_t aUsage) -+ : mOrigin(aOrigin), mLimit(aLimit), mUsage(aUsage) -+ { -+ mQuotaObjects.Init(); -+ } -+ -+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(OriginInfo) -+ -+private: -+ void -+#ifdef DEBUG -+ LockedClearOriginInfos(); -+#else -+ LockedClearOriginInfos() -+ { -+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr); -+ } -+#endif -+ -+ static PLDHashOperator -+ ClearOriginInfoCallback(const nsAString& aKey, -+ QuotaObject* aValue, void* aUserArg); -+ -+ nsDataHashtable mQuotaObjects; -+ -+ nsCString mOrigin; -+ int64_t mLimit; -+ int64_t mUsage; -+}; -+ -+class QuotaManager -+{ -+ friend class nsAutoPtr; -+ friend class OriginInfo; -+ friend class QuotaObject; -+ -+public: -+ // Returns a non-owning reference. -+ static QuotaManager* -+ GetOrCreate(); -+ -+ // Returns a non-owning reference. -+ static QuotaManager* -+ Get(); -+ -+ void -+ InitQuotaForOrigin(const nsACString& aOrigin, -+ int64_t aLimit, -+ int64_t aUsage); -+ -+ void -+ DecreaseUsageForOrigin(const nsACString& aOrigin, -+ int64_t aSize); -+ -+ void -+ RemoveQuotaForPattern(const nsACString& aPattern); -+ -+ already_AddRefed -+ GetQuotaObject(const nsACString& aOrigin, -+ nsIFile* aFile); -+ -+ already_AddRefed -+ GetQuotaObject(const nsACString& aOrigin, -+ const nsAString& aPath); -+ -+private: -+ QuotaManager() -+ : mQuotaMutex("QuotaManager.mQuotaMutex") -+ { -+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); -+ -+ mOriginInfos.Init(); -+ } -+ -+ virtual ~QuotaManager() -+ { -+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); -+ } -+ -+ mozilla::Mutex mQuotaMutex; -+ -+ nsRefPtrHashtable mOriginInfos; -+}; -+ -+END_QUOTA_NAMESPACE -+ -+#endif /* mozilla_dom_quota_quotamanager_h__ */ -diff --git layout/build/Makefile.in layout/build/Makefile.in -index e6b32da..496b55f 100644 ---- mozilla/layout/build/Makefile.in -+++ mozilla/layout/build/Makefile.in -@@ -69,6 +69,7 @@ SHARED_LIBRARY_LIBS = \ - $(DEPTH)/dom/encoding/$(LIB_PREFIX)domencoding_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/file/$(LIB_PREFIX)domfile_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/power/$(LIB_PREFIX)dom_power_s.$(LIB_SUFFIX) \ -+ $(DEPTH)/dom/quota/$(LIB_PREFIX)domquota_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/settings/$(LIB_PREFIX)jsdomsettings_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/permission/$(LIB_PREFIX)jsdompermissionsettings_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/network/src/$(LIB_PREFIX)dom_network_s.$(LIB_SUFFIX) \ -diff --git netwerk/base/src/Makefile.in netwerk/base/src/Makefile.in -index 0c0d60e..e8cef48 100644 ---- mozilla/netwerk/base/src/Makefile.in -+++ mozilla/netwerk/base/src/Makefile.in -@@ -19,6 +19,7 @@ LIBXUL_LIBRARY = 1 - EXPORTS = \ - nsMIMEInputStream.h \ - nsURLHelper.h \ -+ nsFileStreams.h \ - $(NULL) - - EXPORTS_NAMESPACES = mozilla/net -diff --git netwerk/base/src/nsFileStreams.cpp netwerk/base/src/nsFileStreams.cpp -index 2420ffc..ecc26aa 100644 ---- mozilla/netwerk/base/src/nsFileStreams.cpp -+++ mozilla/netwerk/base/src/nsFileStreams.cpp -@@ -51,7 +51,9 @@ nsFileStreamBase::~nsFileStreamBase() - Close(); - } - --NS_IMPL_THREADSAFE_ISUPPORTS1(nsFileStreamBase, nsISeekableStream) -+NS_IMPL_THREADSAFE_ISUPPORTS2(nsFileStreamBase, -+ nsISeekableStream, -+ nsIFileMetadata) - - NS_IMETHODIMP - nsFileStreamBase::Seek(int32_t whence, int64_t offset) -@@ -124,6 +126,52 @@ nsFileStreamBase::SetEOF() - return NS_OK; - } - -+NS_IMETHODIMP -+nsFileStreamBase::GetSize(int64_t* _retval) -+{ -+ nsresult rv = DoPendingOpen(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!mFD) { -+ return NS_BASE_STREAM_CLOSED; -+ } -+ -+ PRFileInfo64 info; -+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -+ return NS_BASE_STREAM_OSERROR; -+ } -+ -+ *_retval = int64_t(info.size); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsFileStreamBase::GetLastModified(int64_t* _retval) -+{ -+ nsresult rv = DoPendingOpen(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!mFD) { -+ return NS_BASE_STREAM_CLOSED; -+ } -+ -+ PRFileInfo64 info; -+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -+ return NS_BASE_STREAM_OSERROR; -+ } -+ -+ int64_t modTime = int64_t(info.modifyTime); -+ if (modTime == 0) { -+ *_retval = 0; -+ } -+ else { -+ *_retval = modTime / int64_t(PR_USEC_PER_MSEC); -+ } -+ -+ return NS_OK; -+} -+ - nsresult - nsFileStreamBase::Close() - { -@@ -934,13 +982,12 @@ nsSafeFileOutputStream::Write(const char *buf, uint32_t count, uint32_t *result) - //////////////////////////////////////////////////////////////////////////////// - // nsFileStream - --NS_IMPL_ISUPPORTS_INHERITED4(nsFileStream, -+NS_IMPL_ISUPPORTS_INHERITED3(nsFileStream, - nsFileStreamBase, - nsIInputStream, - nsIOutputStream, -- nsIFileStream, -- nsIFileMetadata) -- -+ nsIFileStream) -+ - NS_IMETHODIMP - nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm, - int32_t behaviorFlags) -@@ -959,50 +1006,4 @@ nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm, - mBehaviorFlags & nsIFileStream::DEFER_OPEN); - } - --NS_IMETHODIMP --nsFileStream::GetSize(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mFD) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- PRFileInfo64 info; -- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- *_retval = int64_t(info.size); -- -- return NS_OK; --} -- --NS_IMETHODIMP --nsFileStream::GetLastModified(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mFD) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- PRFileInfo64 info; -- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- int64_t modTime = int64_t(info.modifyTime); -- if (modTime == 0) { -- *_retval = 0; -- } -- else { -- *_retval = modTime / int64_t(PR_USEC_PER_MSEC); -- } -- -- return NS_OK; --} -- - //////////////////////////////////////////////////////////////////////////////// -diff --git netwerk/base/src/nsFileStreams.h netwerk/base/src/nsFileStreams.h -index 13e5b45..1aa6a82 100644 ---- mozilla/netwerk/base/src/nsFileStreams.h -+++ mozilla/netwerk/base/src/nsFileStreams.h -@@ -24,11 +24,13 @@ - - //////////////////////////////////////////////////////////////////////////////// - --class nsFileStreamBase : public nsISeekableStream -+class nsFileStreamBase : public nsISeekableStream, -+ public nsIFileMetadata - { - public: - NS_DECL_ISUPPORTS - NS_DECL_NSISEEKABLESTREAM -+ NS_DECL_NSIFILEMETADATA - - nsFileStreamBase(); - virtual ~nsFileStreamBase(); -@@ -124,8 +126,8 @@ public: - NS_IMETHOD IsNonBlocking(bool* _retval) - { - return nsFileStreamBase::IsNonBlocking(_retval); -- } -- -+ } -+ - // Overrided from nsFileStreamBase - NS_IMETHOD Seek(int32_t aWhence, int64_t aOffset); - -@@ -260,13 +262,11 @@ protected: - class nsFileStream : public nsFileStreamBase, - public nsIInputStream, - public nsIOutputStream, -- public nsIFileStream, -- public nsIFileMetadata -+ public nsIFileStream - { - public: - NS_DECL_ISUPPORTS_INHERITED - NS_DECL_NSIFILESTREAM -- NS_DECL_NSIFILEMETADATA - NS_FORWARD_NSIINPUTSTREAM(nsFileStreamBase::) - - // Can't use NS_FORWARD_NSIOUTPUTSTREAM due to overlapping methods -diff --git storage/public/Makefile.in storage/public/Makefile.in -index c485d4e..c05e6f3 100644 ---- mozilla/storage/public/Makefile.in -+++ mozilla/storage/public/Makefile.in -@@ -36,7 +36,6 @@ XPIDLSRCS = \ - mozIStorageCompletionCallback.idl \ - mozIStorageBaseStatement.idl \ - mozIStorageAsyncStatement.idl \ -- mozIStorageServiceQuotaManagement.idl \ - mozIStorageVacuumParticipant.idl \ - $(NULL) - # SEE ABOVE NOTE! -diff --git storage/public/mozIStorageService.idl storage/public/mozIStorageService.idl -index 3087a11..483649b 100644 ---- mozilla/storage/public/mozIStorageService.idl -+++ mozilla/storage/public/mozIStorageService.idl -@@ -7,6 +7,7 @@ - - interface mozIStorageConnection; - interface nsIFile; -+interface nsIFileURL; - - /** - * The mozIStorageService interface is intended to be implemented by -@@ -15,7 +16,7 @@ interface nsIFile; - * - * This is the only way to open a database connection. - */ --[scriptable, uuid(fe8e95cb-b377-4c8d-bccb-d9198c67542b)] -+[scriptable, uuid(12bfad34-cca3-40fb-8736-d8bf9db61a27)] - interface mozIStorageService : nsISupports { - /** - * Get a connection to a named special database storage. -@@ -106,6 +107,16 @@ interface mozIStorageService : nsISupports { - */ - mozIStorageConnection openUnsharedDatabase(in nsIFile aDatabaseFile); - -+ /** -+ * See openDatabase(). Exactly the same only initialized with a file URL. -+ * Custom parameters can be passed to SQLite and VFS implementations through -+ * the query part of the URL. -+ * -+ * @param aURL -+ * A nsIFileURL that represents the database that is to be opened. -+ */ -+ mozIStorageConnection openDatabaseWithFileURL(in nsIFileURL aFileURL); -+ - /* - * Utilities - */ -diff --git storage/public/mozIStorageServiceQuotaManagement.idl storage/public/mozIStorageServiceQuotaManagement.idl -deleted file mode 100644 -index ee5086b..0000000 ---- mozilla/storage/public/mozIStorageServiceQuotaManagement.idl -+++ /dev/null -@@ -1,99 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this -- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#include "nsISupports.idl" -- --interface mozIStorageConnection; --interface nsIFile; -- --[scriptable, function, uuid(ae94f0a5-ebdf-48f4-9959-085e13235d8d)] --interface mozIStorageQuotaCallback : nsISupports --{ -- /** -- * Called when the file size quota for a group of databases is exceeded. -- * -- * @param aFilename -- * The filename of the database that has exceeded the quota. -- * -- * @param aCurrentSizeLimit -- * The current size (in bytes) of the quota. -- * -- * @param aCurrentTotalSize -- * The current size of all databases in the quota group. -- * -- * @param aUserData -- * Any additional data that was provided to the -- * setQuotaForFilenamePattern function. -- * -- * @returns A new quota size. A new quota of 0 will disable the quota callback -- * and any quota value less than aCurrentTotalSize will cause the -- * database operation to fail with NS_ERROR_FILE_NO_DEVICE_SPACE. -- */ -- long long quotaExceeded(in ACString aFilename, -- in long long aCurrentSizeLimit, -- in long long aCurrentTotalSize, -- in nsISupports aUserData); --}; -- --/** -- * This is a temporary interface that should eventually merge with -- * mozIStorageService. -- */ --[scriptable, uuid(4d81faf5-fe01-428b-99b8-c94cba12fd72)] --interface mozIStorageServiceQuotaManagement : nsISupports --{ -- /** -- * See mozIStorageService.openDatabase. Exactly the same only with a custom -- * SQLite VFS. -- */ -- mozIStorageConnection openDatabaseWithVFS(in nsIFile aDatabaseFile, -- in ACString aVFSName); -- -- /** -- * Set a file size quota for a group of databases matching the given filename -- * pattern, optionally specifying a callback when the quota is exceeded. -- * -- * @param aPattern -- * A pattern to match filenames for inclusion in the quota system. May -- * contain the following special characters: -- * '*' Matches any sequence of zero or more characters. -- * '?' Matches exactly one character. -- * [...] Matches one character from the enclosed list of characters. -- * [^...] Matches one character not in the enclosed list. -- * -- * @param aSizeLimit -- * The size limit (in bytes) for the quota group. -- * -- * @param aCallback -- * A callback that will be used when the quota is exceeded. -- * -- * @param aUserData -- * Additional information to be passed to the callback. -- */ -- void setQuotaForFilenamePattern(in ACString aPattern, -- in long long aSizeLimit, -- in mozIStorageQuotaCallback aCallback, -- in nsISupports aUserData); -- -- /** -- * Adds, removes, or updates the file size information maintained by the quota -- * system for files not opened through openDatabaseWithVFS(). -- * -- * Use this function when you want files to be included in quota calculations -- * that are either a) not SQLite databases, or b) SQLite databases that have -- * not been opened. -- * -- * This function will have no effect on files that do not match an existing -- * quota pattern (set previously by setQuotaForFilenamePattern()). -- * -- * @param aFile -- * The file for which quota information should be updated. If the file -- * exists then its size information will be added or refreshed. If the -- * file does not exist then the file will be removed from tracking -- * under the quota system. -- */ -- void updateQuotaInformationForFile(in nsIFile aFile); --}; -diff --git storage/public/storage.h storage/public/storage.h -index 8e571e2..08f39f3 100644 ---- mozilla/storage/public/storage.h -+++ mozilla/storage/public/storage.h -@@ -24,7 +24,6 @@ - #include "mozIStorageStatementCallback.h" - #include "mozIStorageBindingParamsArray.h" - #include "mozIStorageBindingParams.h" --#include "mozIStorageServiceQuotaManagement.h" - #include "mozIStorageVacuumParticipant.h" - #include "mozIStorageCompletionCallback.h" - #include "mozIStorageAsyncStatement.h" -diff --git storage/src/TelemetryVFS.cpp storage/src/TelemetryVFS.cpp -index 60de5c4..e4fce09 100644 ---- mozilla/storage/src/TelemetryVFS.cpp -+++ mozilla/storage/src/TelemetryVFS.cpp -@@ -10,6 +10,7 @@ - #include "sqlite3.h" - #include "nsThreadUtils.h" - #include "mozilla/Util.h" -+#include "mozilla/dom/quota/QuotaManager.h" - - /** - * This preference is a workaround to allow users/sysadmins to identify -@@ -24,6 +25,7 @@ - namespace { - - using namespace mozilla; -+using namespace mozilla::dom::quota; - - struct Histograms { - const char *name; -@@ -82,9 +84,17 @@ private: - }; - - struct telemetry_file { -- sqlite3_file base; // Base class. Must be first -- Histograms *histograms; // histograms pertaining to this file -- sqlite3_file pReal[1]; // This contains the vfs that actually does work -+ // Base class. Must be first -+ sqlite3_file base; -+ -+ // histograms pertaining to this file -+ Histograms *histograms; -+ -+ // quota object for this file -+ nsRefPtr quotaObject; -+ -+ // This contains the vfs that actually does work -+ sqlite3_file pReal[1]; - }; - - /* -@@ -99,6 +109,7 @@ xClose(sqlite3_file *pFile) - if( rc==SQLITE_OK ){ - delete p->base.pMethods; - p->base.pMethods = NULL; -+ p->quotaObject = nullptr; - } - return rc; - } -@@ -126,6 +137,9 @@ int - xWrite(sqlite3_file *pFile, const void *zBuf, int iAmt, sqlite_int64 iOfst) - { - telemetry_file *p = (telemetry_file *)pFile; -+ if (p->quotaObject && !p->quotaObject->MaybeAllocateMoreSpace(iOfst, iAmt)) { -+ return SQLITE_FULL; -+ } - IOThreadAutoTimer ioTimer(p->histograms->writeMS); - int rc; - rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst); -@@ -144,6 +158,9 @@ xTruncate(sqlite3_file *pFile, sqlite_int64 size) - int rc; - Telemetry::AutoTimer timer; - rc = p->pReal->pMethods->xTruncate(p->pReal, size); -+ if (rc == SQLITE_OK && p->quotaObject) { -+ p->quotaObject->UpdateSize(size); -+ } - return rc; - } - -@@ -300,6 +317,18 @@ xOpen(sqlite3_vfs* vfs, const char *zName, sqlite3_file* pFile, - break; - } - p->histograms = h; -+ -+ const char* origin; -+ if ((flags & SQLITE_OPEN_URI) && -+ (origin = sqlite3_uri_parameter(zName, "origin"))) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ MOZ_ASSERT(quotaManager); -+ -+ p->quotaObject = quotaManager->GetQuotaObject(nsDependentCString(origin), -+ NS_ConvertUTF8toUTF16(zName)); -+ -+ } -+ - rc = orig_vfs->xOpen(orig_vfs, zName, p->pReal, flags, pOutFlags); - if( rc != SQLITE_OK ) - return rc; -diff --git storage/src/mozStorageConnection.cpp storage/src/mozStorageConnection.cpp -index 3afd3e1b..430824a 100644 ---- mozilla/storage/src/mozStorageConnection.cpp -+++ mozilla/storage/src/mozStorageConnection.cpp -@@ -12,6 +12,7 @@ - #include "nsIMemoryReporter.h" - #include "nsThreadUtils.h" - #include "nsIFile.h" -+#include "nsIFileURL.h" - #include "mozilla/Telemetry.h" - #include "mozilla/Mutex.h" - #include "mozilla/CondVar.h" -@@ -471,34 +472,83 @@ Connection::getAsyncExecutionTarget() - } - - nsresult --Connection::initialize(nsIFile *aDatabaseFile, -- const char* aVFSName) -+Connection::initialize() - { - NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); - SAMPLE_LABEL("storage", "Connection::initialize"); - -- int srv; -- nsresult rv; -+ // in memory database requested, sqlite uses a magic file name -+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, NULL); -+ if (srv != SQLITE_OK) { -+ mDBConn = nullptr; -+ return convertResultCode(srv); -+ } -+ -+ return initializeInternal(nullptr); -+} -+ -+nsresult -+Connection::initialize(nsIFile *aDatabaseFile) -+{ -+ NS_ASSERTION (aDatabaseFile, "Passed null file!"); -+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); -+ SAMPLE_LABEL("storage", "Connection::initialize"); - - mDatabaseFile = aDatabaseFile; - -- if (aDatabaseFile) { -- nsAutoString path; -- rv = aDatabaseFile->GetPath(path); -- NS_ENSURE_SUCCESS(rv, rv); -+ nsAutoString path; -+ nsresult rv = aDatabaseFile->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, rv); - -- srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn, mFlags, -- aVFSName); -- } -- else { -- // in memory database requested, sqlite uses a magic file name -- srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, aVFSName); -+ int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn, -+ mFlags, NULL); -+ if (srv != SQLITE_OK) { -+ mDBConn = nullptr; -+ return convertResultCode(srv); - } -+ -+ rv = initializeInternal(aDatabaseFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mDatabaseFile = aDatabaseFile; -+ -+ return NS_OK; -+} -+ -+nsresult -+Connection::initialize(nsIFileURL *aFileURL) -+{ -+ NS_ASSERTION (aFileURL, "Passed null file URL!"); -+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); -+ SAMPLE_LABEL("storage", "Connection::initialize"); -+ -+ nsCOMPtr databaseFile; -+ nsresult rv = aFileURL->GetFile(getter_AddRefs(databaseFile)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsAutoCString spec; -+ rv = aFileURL->GetSpec(spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, NULL); - if (srv != SQLITE_OK) { - mDBConn = nullptr; - return convertResultCode(srv); - } - -+ rv = initializeInternal(databaseFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mFileURL = aFileURL; -+ mDatabaseFile = databaseFile; -+ -+ return NS_OK; -+} -+ -+ -+nsresult -+Connection::initializeInternal(nsIFile* aDatabaseFile) -+{ - // Properly wrap the database handle's mutex. - sharedDBMutex.initWithMutex(sqlite3_db_mutex(mDBConn)); - -@@ -522,14 +572,14 @@ Connection::initialize(nsIFile *aDatabaseFile, - nsAutoCString pageSizeQuery(MOZ_STORAGE_UNIQUIFY_QUERY_STR - "PRAGMA page_size = "); - pageSizeQuery.AppendInt(pageSize); -- rv = ExecuteSimpleSQL(pageSizeQuery); -+ nsresult rv = ExecuteSimpleSQL(pageSizeQuery); - NS_ENSURE_SUCCESS(rv, rv); - - // Get the current page_size, since it may differ from the specified value. - sqlite3_stmt *stmt; - NS_NAMED_LITERAL_CSTRING(pragma_page_size, - MOZ_STORAGE_UNIQUIFY_QUERY_STR "PRAGMA page_size"); -- srv = prepareStatement(pragma_page_size, &stmt); -+ int srv = prepareStatement(pragma_page_size, &stmt); - if (srv == SQLITE_OK) { - if (SQLITE_ROW == stepStatement(stmt)) { - pageSize = ::sqlite3_column_int64(stmt, 0); -@@ -962,7 +1012,8 @@ Connection::Clone(bool aReadOnly, - nsRefPtr clone = new Connection(mStorageService, flags); - NS_ENSURE_TRUE(clone, NS_ERROR_OUT_OF_MEMORY); - -- nsresult rv = clone->initialize(mDatabaseFile); -+ nsresult rv = mFileURL ? clone->initialize(mFileURL) -+ : clone->initialize(mDatabaseFile); - NS_ENSURE_SUCCESS(rv, rv); - - // Copy over pragmas from the original connection. -diff --git storage/src/mozStorageConnection.h storage/src/mozStorageConnection.h -index b71f5db..97f5cf8 100644 ---- mozilla/storage/src/mozStorageConnection.h -+++ mozilla/storage/src/mozStorageConnection.h -@@ -25,6 +25,7 @@ - - struct PRLock; - class nsIFile; -+class nsIFileURL; - class nsIEventTarget; - class nsIThread; - -@@ -63,18 +64,27 @@ public: - Connection(Service *aService, int aFlags); - - /** -+ * Creates the connection to an in-memory database. -+ */ -+ nsresult initialize(); -+ -+ /** - * Creates the connection to the database. - * - * @param aDatabaseFile - * The nsIFile of the location of the database to open, or create if it -- * does not exist. Passing in nullptr here creates an in-memory -- * database. -- * @param aVFSName -- * The VFS that SQLite will use when opening this database. NULL means -- * "default". -+ * does not exist. - */ -- nsresult initialize(nsIFile *aDatabaseFile, -- const char* aVFSName = NULL); -+ nsresult initialize(nsIFile *aDatabaseFile); -+ -+ /** -+ * Creates the connection to the database. -+ * -+ * @param aFileURL -+ * The nsIFileURL of the location of the database to open, or create if it -+ * does not exist. -+ */ -+ nsresult initialize(nsIFileURL *aFileURL); - - // fetch the native handle - sqlite3 *GetNativeConnection() { return mDBConn; } -@@ -155,6 +165,8 @@ public: - private: - ~Connection(); - -+ nsresult initializeInternal(nsIFile *aDatabaseFile); -+ - /** - * Sets the database into a closed state so no further actions can be - * performed. -@@ -206,6 +218,7 @@ private: - int progressHandler(); - - sqlite3 *mDBConn; -+ nsCOMPtr mFileURL; - nsCOMPtr mDatabaseFile; - - /** -diff --git storage/src/mozStorageService.cpp storage/src/mozStorageService.cpp -index 00661d6..862a7da 100644 ---- mozilla/storage/src/mozStorageService.cpp -+++ mozilla/storage/src/mozStorageService.cpp -@@ -24,8 +24,6 @@ - #include "mozilla/Preferences.h" - - #include "sqlite3.h" --#include "test_quota.h" --#include "test_quota.c" - - #ifdef SQLITE_OS_WIN - // "windows.h" was included and it can #define lots of things we care about... -@@ -35,61 +33,6 @@ - #include "nsIPromptService.h" - #include "nsIMemoryReporter.h" - --namespace { -- --class QuotaCallbackData --{ --public: -- QuotaCallbackData(mozIStorageQuotaCallback *aCallback, -- nsISupports *aUserData) -- : callback(aCallback), userData(aUserData) -- { -- MOZ_COUNT_CTOR(QuotaCallbackData); -- } -- -- ~QuotaCallbackData() -- { -- MOZ_COUNT_DTOR(QuotaCallbackData); -- } -- -- static void Callback(const char *zFilename, -- sqlite3_int64 *piLimit, -- sqlite3_int64 iSize, -- void *pArg) -- { -- NS_ASSERTION(zFilename && strlen(zFilename), "Null or empty filename!"); -- NS_ASSERTION(piLimit, "Null pointer!"); -- -- QuotaCallbackData *data = static_cast(pArg); -- if (!data) { -- // No callback specified, return immediately. -- return; -- } -- -- NS_ASSERTION(data->callback, "Should never have a null callback!"); -- -- nsDependentCString filename(zFilename); -- -- int64_t newLimit; -- if (NS_SUCCEEDED(data->callback->QuotaExceeded(filename, *piLimit, -- iSize, data->userData, -- &newLimit))) { -- *piLimit = newLimit; -- } -- } -- -- static void Destroy(void *aUserData) -- { -- delete static_cast(aUserData); -- } -- --private: -- nsCOMPtr callback; -- nsCOMPtr userData; --}; -- --} // anonymous namespace -- - //////////////////////////////////////////////////////////////////////////////// - //// Defines - -@@ -345,11 +288,10 @@ private: - //////////////////////////////////////////////////////////////////////////////// - //// Service - --NS_IMPL_THREADSAFE_ISUPPORTS3( -+NS_IMPL_THREADSAFE_ISUPPORTS2( - Service, - mozIStorageService, -- nsIObserver, -- mozIStorageServiceQuotaManagement -+ nsIObserver - ) - - Service *Service::gService = nullptr; -@@ -438,10 +380,6 @@ Service::~Service() - - // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but - // there is nothing actionable we can do in that case. -- rc = ::sqlite3_quota_shutdown(); -- if (rc != SQLITE_OK) -- NS_WARNING("sqlite3 did not shutdown cleanly."); -- - rc = ::sqlite3_shutdown(); - if (rc != SQLITE_OK) - NS_WARNING("sqlite3 did not shutdown cleanly."); -@@ -636,9 +574,6 @@ Service::initialize() - } else { - NS_WARNING("Failed to register telemetry VFS"); - } -- rc = ::sqlite3_quota_initialize("telemetry-vfs", 0); -- if (rc != SQLITE_OK) -- return convertResultCode(rc); - - // Set the default value for the toolkit.storage.synchronous pref. It will be - // updated with the user preference on the main thread. -@@ -739,28 +674,24 @@ Service::OpenSpecialDatabase(const char *aStorageKey, - // connection to use a memory DB. - } - else if (::strcmp(aStorageKey, "profile") == 0) { -- - rv = NS_GetSpecialDirectory(NS_APP_STORAGE_50_FILE, - getter_AddRefs(storageFile)); - NS_ENSURE_SUCCESS(rv, rv); - -- nsString filename; -- storageFile->GetPath(filename); -- nsCString filename8 = NS_ConvertUTF16toUTF8(filename.get()); - // fall through to DB initialization - } - else { - return NS_ERROR_INVALID_ARG; - } - -- Connection *msc = new Connection(this, SQLITE_OPEN_READWRITE); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); -+ nsRefPtr msc = new Connection(this, SQLITE_OPEN_READWRITE); - -- rv = msc->initialize(storageFile); -+ rv = storageFile ? msc->initialize(storageFile) : msc->initialize(); - NS_ENSURE_SUCCESS(rv, rv); - -- NS_ADDREF(*_connection = msc); -+ msc.forget(_connection); - return NS_OK; -+ - } - - NS_IMETHODIMP -@@ -774,12 +705,11 @@ Service::OpenDatabase(nsIFile *aDatabaseFile, - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE | - SQLITE_OPEN_CREATE; - nsRefPtr msc = new Connection(this, flags); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); - - nsresult rv = msc->initialize(aDatabaseFile); - NS_ENSURE_SUCCESS(rv, rv); - -- NS_ADDREF(*_connection = msc); -+ msc.forget(_connection); - return NS_OK; - } - -@@ -794,12 +724,30 @@ Service::OpenUnsharedDatabase(nsIFile *aDatabaseFile, - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_PRIVATECACHE | - SQLITE_OPEN_CREATE; - nsRefPtr msc = new Connection(this, flags); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); - - nsresult rv = msc->initialize(aDatabaseFile); - NS_ENSURE_SUCCESS(rv, rv); - -- NS_ADDREF(*_connection = msc); -+ msc.forget(_connection); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+Service::OpenDatabaseWithFileURL(nsIFileURL *aFileURL, -+ mozIStorageConnection **_connection) -+{ -+ NS_ENSURE_ARG(aFileURL); -+ -+ // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility -+ // reasons. -+ int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE | -+ SQLITE_OPEN_CREATE | SQLITE_OPEN_URI; -+ nsRefPtr msc = new Connection(this, flags); -+ -+ nsresult rv = msc->initialize(aFileURL); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ msc.forget(_connection); - return NS_OK; - } - -@@ -885,67 +833,5 @@ Service::Observe(nsISupports *, const char *aTopic, const PRUnichar *) - return NS_OK; - } - --//////////////////////////////////////////////////////////////////////////////// --//// mozIStorageServiceQuotaManagement -- --NS_IMETHODIMP --Service::OpenDatabaseWithVFS(nsIFile *aDatabaseFile, -- const nsACString &aVFSName, -- mozIStorageConnection **_connection) --{ -- NS_ENSURE_ARG(aDatabaseFile); -- -- // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility -- // reasons. -- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE | -- SQLITE_OPEN_CREATE; -- nsRefPtr msc = new Connection(this, flags); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); -- -- nsresult rv = msc->initialize(aDatabaseFile, -- PromiseFlatCString(aVFSName).get()); -- NS_ENSURE_SUCCESS(rv, rv); -- -- NS_ADDREF(*_connection = msc); -- return NS_OK; --} -- --NS_IMETHODIMP --Service::SetQuotaForFilenamePattern(const nsACString &aPattern, -- int64_t aSizeLimit, -- mozIStorageQuotaCallback *aCallback, -- nsISupports *aUserData) --{ -- NS_ENSURE_FALSE(aPattern.IsEmpty(), NS_ERROR_INVALID_ARG); -- -- nsAutoPtr data; -- if (aSizeLimit && aCallback) { -- data = new QuotaCallbackData(aCallback, aUserData); -- } -- -- int rc = ::sqlite3_quota_set(PromiseFlatCString(aPattern).get(), -- aSizeLimit, QuotaCallbackData::Callback, -- data, QuotaCallbackData::Destroy); -- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc)); -- -- data.forget(); -- return NS_OK; --} -- --NS_IMETHODIMP --Service::UpdateQuotaInformationForFile(nsIFile *aFile) --{ -- NS_ENSURE_ARG_POINTER(aFile); -- -- nsString path; -- nsresult rv = aFile->GetPath(path); -- NS_ENSURE_SUCCESS(rv, rv); -- -- int rc = ::sqlite3_quota_file(NS_ConvertUTF16toUTF8(path).get()); -- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc)); -- -- return NS_OK; --} -- - } // namespace storage - } // namespace mozilla -diff --git storage/src/mozStorageService.h storage/src/mozStorageService.h -index 21c1ff8..3f5a546 100644 ---- mozilla/storage/src/mozStorageService.h -+++ mozilla/storage/src/mozStorageService.h -@@ -15,7 +15,6 @@ - #include "mozilla/Mutex.h" - - #include "mozIStorageService.h" --#include "mozIStorageServiceQuotaManagement.h" - - class nsIMemoryReporter; - class nsIMemoryMultiReporter; -@@ -28,7 +27,6 @@ namespace storage { - class Connection; - class Service : public mozIStorageService - , public nsIObserver -- , public mozIStorageServiceQuotaManagement - { - public: - /** -@@ -58,7 +56,6 @@ public: - NS_DECL_ISUPPORTS - NS_DECL_MOZISTORAGESERVICE - NS_DECL_NSIOBSERVER -- NS_DECL_MOZISTORAGESERVICEQUOTAMANAGEMENT - - /** - * Obtains an already AddRefed pointer to XPConnect. This is used by -diff --git toolkit/toolkit-makefiles.sh toolkit/toolkit-makefiles.sh -index 6a7d714..8f1bbe0 100644 ---- mozilla/toolkit/toolkit-makefiles.sh -+++ mozilla/toolkit/toolkit-makefiles.sh -@@ -68,6 +68,7 @@ MAKEFILES_dom=" - dom/plugins/base/Makefile - dom/plugins/ipc/Makefile - dom/power/Makefile -+ dom/quota/Makefile - dom/settings/Makefile - dom/sms/Makefile - dom/sms/interfaces/Makefile Modified: trunk/mail/thunderbird/files/patch-bug807492 ============================================================================== --- trunk/mail/thunderbird/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/mail/thunderbird/files/patch-bug807492 Tue Feb 26 04:18:43 2013 (r1192) @@ -17,7 +17,7 @@ index c167461..8346c11 100644 --- mozilla/configure.in +++ mozilla/configure.in -@@ -1413,16 +1413,27 @@ if test "$GNU_CC"; then +@@ -1449,16 +1449,27 @@ if test "$GNU_CC"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -mssse3" AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes]) @@ -45,7 +45,7 @@ # -Werror=return-type - catches missing returns, zero false positives # -Wtype-limits - catches overflow bugs, few false positives # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives -@@ -5232,17 +5243,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow +@@ -5255,17 +5266,17 @@ dnl Turn off webrtc for OS's we don't ha dnl --enable-webrtc to override. Can disable for everything in dnl the master list above. if test -n "$MOZ_WEBRTC"; then @@ -64,13 +64,13 @@ ;; esac fi -@@ -8909,16 +8920,21 @@ if test "${OS_TARGET}" = "WINNT"; then - if test "$HAVE_64BIT_OS"; then - OS_BITS=64 +@@ -9061,16 +9072,21 @@ elif test "${OS_TARGET}" = "Android"; th + EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android " + if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then + EXTRA_GYP_DEFINES+=" -D armv7=0 " else - OS_BITS=32 + EXTRA_GYP_DEFINES+=" -D armv7=1 " fi - EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}" fi +# Don't try to compile sse4.1 code if toolchain doesn't support @@ -85,7 +85,7 @@ dnl so that regeneration via dependencies works correctly WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi" - GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" + GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" diff --git js/src/config/system-headers js/src/config/system-headers index 9bd1efa..1095a01 100644 --- mozilla/js/src/config/system-headers @@ -114,20 +114,20 @@ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \ $(NULL) --ifeq ($(OS_ARCH), Darwin) +-ifeq ($(OS_TARGET), Darwin) +ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LOCAL_INCLUDES += \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \ $(NULL) -+ifeq ($(OS_ARCH), Darwin) ++ifeq ($(OS_TARGET), Darwin) DEFINES += -DDARWIN +else +DEFINES += -DBSD +endif endif - ifeq ($(OS_ARCH), Linux) + ifeq ($(OS_TARGET), Linux) LOCAL_INCLUDES += \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \ @@ -146,7 +146,7 @@ endif endif --ifeq ($(OS_ARCH), Darwin) +-ifeq ($(OS_TARGET), Darwin) +ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include +ifeq ($(OS_TARGET), Darwin) @@ -156,13 +156,13 @@ endif +endif - ifeq ($(OS_ARCH), Linux) + ifeq ($(OS_TARGET), Linux) LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include endif - ifneq ($(OS_TARGET),WINNT) - CPP_UNIT_TESTS = \ - ice_unittest.cpp \ + ifeq ($(OS_TARGET), Android) + LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include + diff --git media/mtransport/third_party/nICEr/nicer.gyp media/mtransport/third_party/nICEr/nicer.gyp index 0e1f8b4..9a4b995 100644 --- mozilla/media/mtransport/third_party/nICEr/nicer.gyp @@ -341,13 +341,13 @@ if (!(my_locale = r_strdup(setlocale(LC_CTYPE, 0)))) ABORT(R_NO_MEMORY); -@@ -91,28 +99,28 @@ mbslen(const char *s, size_t *ncharsp) - if (!strstr(my_locale, "UTF-8")) - ABORT(R_NOT_FOUND); +@@ -93,28 +101,28 @@ mbslen(const char *s, size_t *ncharsp) #else - /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */ - if (! strcasestr(setlocale(LC_CTYPE, 0), "UTF-8")) - ABORT(R_NOT_FOUND); + /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */ + /* null-checking setlocale is required because Android */ + char *locale = setlocale(LC_CTYPE, 0); + if (!locale || !strcasestr(locale, "UTF-8")) + ABORT(R_NOT_FOUND); #endif -#ifdef DARWIN @@ -499,15 +499,15 @@ if (! buf) diff --git media/webrtc/signaling/signaling.gyp media/webrtc/signaling/signaling.gyp -index f0cbf870..ba0f801 100644 +index 2a91e3d..31de641 100644 --- mozilla/media/webrtc/signaling/signaling.gyp +++ mozilla/media/webrtc/signaling/signaling.gyp -@@ -208,16 +208,29 @@ +@@ -212,16 +212,29 @@ 'SIPCC_BUILD', 'HAVE_WINSOCK2_H', 'CPR_STDINT_INCLUDE=\\"mozilla/StandardInteger.h\\"' ], - + 'cflags_mozilla': [ ], }], @@ -529,34 +529,34 @@ ], 'defines': [ 'SIP_OS_OSX', - 'OSX', + 'OSX', '_FORTIFY_SOURCE=2', ], -@@ -701,17 +714,17 @@ +@@ -747,17 +760,17 @@ 'EXTERNAL_TICK_REQUIRED', 'GIPS_VER=3480', ], - + 'cflags_mozilla': [ ], - + }], - ['OS=="mac"', { + ['OS=="mac" or os_bsd==1', { 'include_dirs': [ ], - + 'sources': [ # SIPSTACK './src/sipcc/core/sipstack/sip_platform_task.c', - -@@ -746,24 +759,23 @@ + +@@ -792,24 +805,23 @@ './src/sipcc/cpr/darwin/cpr_darwin_timers_using_select.c', './src/sipcc/cpr/darwin/cpr_darwin_tst.h', './src/sipcc/cpr/darwin/cpr_darwin_types.h', ], - + 'defines' : [ 'SIP_OS_OSX', @@ -571,12 +571,12 @@ - '_DARWIN_C_SOURCE', 'NO_NSPR_10_SUPPORT', ], - + 'cflags_mozilla': [ ], }], ], - + diff --git media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c index a7c47e1..4f191de 100644 --- mozilla/media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c @@ -611,7 +611,7 @@ index a30e330..cfbd8a3 100644 --- mozilla/media/webrtc/signaling/test/Makefile.in +++ mozilla/media/webrtc/signaling/test/Makefile.in -@@ -22,32 +22,32 @@ LIBS = \ +@@ -22,17 +22,17 @@ LIBS = \ $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \ $(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \ $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \ @@ -620,7 +620,7 @@ $(NULL) ifdef MOZ_SYDNEYAUDIO --ifeq ($(OS_ARCH),Linux) +-ifeq ($(OS_TARGET),Linux) +ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LIBS += \ $(MOZ_ALSA_LIBS) \ @@ -628,22 +628,25 @@ endif endif - ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT)) + ifeq ($(OS_TARGET),Android) + LIBS += \ +@@ -65,17 +65,17 @@ endif + ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) LIBS += \ $(XLIBS) \ - $(MOZ_GTK2_LIBS) \ - -lgthread-2.0 \ + $(TK_LIBS) \ + $(MOZ_PANGO_LIBS) \ $(NULL) endif --ifeq ($(OS_ARCH),Linux) +-ifeq ($(OS_TARGET),Linux) +ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LIBS += \ $(MOZ_CAIRO_OSLIBS) \ $(NULL) endif - ifeq ($(OS_ARCH),Darwin) + ifeq ($(OS_TARGET),Darwin) LIBS += \ -framework AudioToolbox \ diff --git media/webrtc/trunk/build/common.gypi media/webrtc/trunk/build/common.gypi Deleted: trunk/mail/thunderbird/files/patch-bug817267 ============================================================================== --- trunk/mail/thunderbird/files/patch-bug817267 Tue Feb 26 04:18:43 2013 (r1191) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,36 +0,0 @@ -commit faafeb1 -Author: Jan Beich -Date: Sat Dec 1 21:25:24 2012 -0500 - - Bug 817267 - dirfd() is a macro on some BSDs, fix build there. r=yoric ---- - dom/system/OSFileConstants.cpp | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp -index 75a41dc..63fc6b1 100644 ---- mozilla/dom/system/OSFileConstants.cpp -+++ mozilla/dom/system/OSFileConstants.cpp -@@ -41,6 +41,11 @@ - #include "OSFileConstants.h" - #include "nsIOSFileConstantsService.h" - -+#if defined(__DragonFly__) || defined(__FreeBSD__) \ -+ || defined(__NetBSD__) || defined(__OpenBSD__) -+#define __dd_fd dd_fd -+#endif -+ - /** - * This module defines the basic libc constants (error numbers, open modes, - * etc.) used by OS.File and possibly other OS-bound JavaScript libraries. -@@ -383,8 +388,8 @@ static dom::ConstantSpec gLibcProperties[] = - { "OSFILE_OFFSETOF_DIRENT_D_TYPE", INT_TO_JSVAL(offsetof (struct dirent, d_type)) }, - #endif // defined(DT_UNKNOWN) - -- // Under MacOS X, |dirfd| is a macro rather than a function, so we -- // need a little help to get it to work -+ // Under MacOS X and BSDs, |dirfd| is a macro rather than a -+ // function, so we need a little help to get it to work - #if defined(dirfd) - { "OSFILE_SIZEOF_DIR", INT_TO_JSVAL(sizeof (DIR)) }, - Added: trunk/mail/thunderbird/files/patch-bug824317 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/mail/thunderbird/files/patch-bug824317 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,14 @@ +diff --git a/xpcom/string/public/nsAlgorithm.h b/xpcom/string/public/nsAlgorithm.h +index fa50194a..c5f5737 100644 +--- mozilla/xpcom/string/public/nsAlgorithm.h ++++ mozilla/xpcom/string/public/nsAlgorithm.h +@@ -42,7 +42,8 @@ NS_MAX( const T& a, const T& b ) + return a > b ? a : b; + } + +-#if defined(_MSC_VER) && (_MSC_VER < 1600) ++#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || \ ++ (defined(_GLIBCXX_USE_LONG_LONG) && (!_GLIBCXX_USE_C99 || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC)) + namespace std { + inline + long long Modified: trunk/mail/thunderbird/files/patch-bug826985 ============================================================================== --- trunk/mail/thunderbird/files/patch-bug826985 Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/mail/thunderbird/files/patch-bug826985 Tue Feb 26 04:18:43 2013 (r1192) @@ -15,10 +15,10 @@ index 6d05f9c..297615f 100644 --- mozilla/configure.in +++ mozilla/configure.in -@@ -5270,6 +5270,17 @@ if test -n "$MOZ_WEBRTC"; then - MOZ_VP8=1 - MOZ_VP8_ENCODER=1 - MOZ_VP8_ERROR_CONCEALMENT=1 +@@ -5267,6 +5267,18 @@ if test -n "$MOZ_WEBRTC"; then + ;; + esac + + dnl use libv4l on Linux to support more cameras + case "$target" in + *-android*|*-linuxandroid*) @@ -30,11 +30,12 @@ + AC_MSG_ERROR([WebRTC on Linux needs libv4l2 for video format conversion.])]) + ;; + esac ++ dnl enable once Signaling lands MOZ_WEBRTC_SIGNALING=1 AC_DEFINE(MOZ_WEBRTC_SIGNALING) -@@ -5288,6 +5299,7 @@ fi - AC_SUBST(MOZ_WEBRTC) +@@ -5311,6 +5323,7 @@ AC_SUBST(MOZ_WEBRTC) + AC_SUBST(MOZ_WEBRTC_LEAKING_TESTS) AC_SUBST(MOZ_WEBRTC_SIGNALING) AC_SUBST(MOZ_PEERCONNECTION) +AC_SUBST(MOZ_WEBRTC_LIBV4L) Added: trunk/mail/thunderbird/files/patch-bug827521 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/mail/thunderbird/files/patch-bug827521 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,147 @@ +commit ab46441 +Author: Graeme McCutcheon +Date: Thu Jan 10 14:37:30 2013 +0000 + + Bug 827521 - Work around spurious operator ambiguity errors in buggy versions of Clang. r=longsonr +--- + .../svg/content/src/SVGAnimatedPreserveAspectRatio.cpp | 17 ++++++++--------- + .../svg/content/src/SVGAnimatedPreserveAspectRatio.h | 7 +++---- + content/svg/content/src/SVGPreserveAspectRatio.h | 17 +++++++++++++---- + 3 files changed, 24 insertions(+), 17 deletions(-) + +diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +index 6593461..56956b2 100644 +--- mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp ++++ mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +@@ -54,7 +54,7 @@ GetAlignForString(const nsAString &aAlignString) + { + for (uint32_t i = 0 ; i < ArrayLength(sAlignStrings) ; i++) { + if (aAlignString.EqualsASCII(sAlignStrings[i])) { +- return (i + SVG_PRESERVEASPECTRATIO_NONE); ++ return (i + SVG_ALIGN_MIN_VALID); + } + } + +@@ -65,12 +65,11 @@ static void + GetAlignString(nsAString& aAlignString, uint16_t aAlign) + { + NS_ASSERTION( +- aAlign >= SVG_PRESERVEASPECTRATIO_NONE && +- aAlign <= SVG_PRESERVEASPECTRATIO_XMAXYMAX, ++ aAlign >= SVG_ALIGN_MIN_VALID && aAlign <= SVG_ALIGN_MAX_VALID, + "Unknown align"); + + aAlignString.AssignASCII( +- sAlignStrings[aAlign - SVG_PRESERVEASPECTRATIO_NONE]); ++ sAlignStrings[aAlign - SVG_ALIGN_MIN_VALID]); + } + + static uint16_t +@@ -78,7 +77,7 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice) + { + for (uint32_t i = 0 ; i < ArrayLength(sMeetOrSliceStrings) ; i++) { + if (aMeetOrSlice.EqualsASCII(sMeetOrSliceStrings[i])) { +- return (i + SVG_MEETORSLICE_MEET); ++ return (i + SVG_MEETORSLICE_MIN_VALID); + } + } + +@@ -89,12 +88,12 @@ static void + GetMeetOrSliceString(nsAString& aMeetOrSliceString, uint16_t aMeetOrSlice) + { + NS_ASSERTION( +- aMeetOrSlice >= SVG_MEETORSLICE_MEET && +- aMeetOrSlice <= SVG_MEETORSLICE_SLICE, ++ aMeetOrSlice >= SVG_MEETORSLICE_MIN_VALID && ++ aMeetOrSlice <= SVG_MEETORSLICE_MAX_VALID, + "Unknown meetOrSlice"); + + aMeetOrSliceString.AssignASCII( +- sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MEET]); ++ sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MIN_VALID]); + } + + already_AddRefed +@@ -226,7 +225,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString( + GetAlignString(tmpString, mBaseVal.mAlign); + aValueAsString.Append(tmpString); + +- if (mBaseVal.mAlign != SVG_PRESERVEASPECTRATIO_NONE) { ++ if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) { + + aValueAsString.AppendLiteral(" "); + GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice); +diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.h content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +index 61cfba7..b08fb60 100644 +--- mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h ++++ mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +@@ -42,8 +42,7 @@ public: + void SetBaseValue(const SVGPreserveAspectRatio &aValue, + nsSVGElement *aSVGElement); + nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) { +- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE || +- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) { ++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) { + return NS_ERROR_FAILURE; + } + SetBaseValue(SVGPreserveAspectRatio( +@@ -53,8 +52,8 @@ public: + return NS_OK; + } + nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) { +- if (aMeetOrSlice < SVG_MEETORSLICE_MEET || +- aMeetOrSlice > SVG_MEETORSLICE_SLICE) { ++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID || ++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) { + return NS_ERROR_FAILURE; + } + SetBaseValue(SVGPreserveAspectRatio( +diff --git content/svg/content/src/SVGPreserveAspectRatio.h content/svg/content/src/SVGPreserveAspectRatio.h +index 066ad52..ebe724e 100644 +--- mozilla/content/svg/content/src/SVGPreserveAspectRatio.h ++++ mozilla/content/svg/content/src/SVGPreserveAspectRatio.h +@@ -28,6 +28,11 @@ enum SVGAlign MOZ_ENUM_TYPE(uint8_t) { + SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10 + }; + ++// These constants represent the range of valid enum values for the ++// parameter. They exclude the sentinel _UNKNOWN value. ++const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE; ++const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX; ++ + // Meet-or-slice Types + enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) { + SVG_MEETORSLICE_UNKNOWN = 0, +@@ -35,6 +40,11 @@ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) { + SVG_MEETORSLICE_SLICE = 2 + }; + ++// These constants represent the range of valid enum values for the ++// parameter. They exclude the sentinel _UNKNOWN value. ++const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET; ++const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE; ++ + class SVGAnimatedPreserveAspectRatio; + + class SVGPreserveAspectRatio MOZ_FINAL +@@ -57,8 +67,7 @@ public: + {} + + nsresult SetAlign(uint16_t aAlign) { +- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE || +- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) ++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) + return NS_ERROR_FAILURE; + mAlign = static_cast(aAlign); + return NS_OK; +@@ -69,8 +78,8 @@ public: + } + + nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) { +- if (aMeetOrSlice < SVG_MEETORSLICE_MEET || +- aMeetOrSlice > SVG_MEETORSLICE_SLICE) ++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID || ++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) + return NS_ERROR_FAILURE; + mMeetOrSlice = static_cast(aMeetOrSlice); + return NS_OK; Added: trunk/mail/thunderbird/files/patch-bug836824 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/mail/thunderbird/files/patch-bug836824 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,33 @@ +commit 35107a0 (HEAD) +Author: Paul Adenot +Date: Mon Feb 4 20:21:19 2013 +0100 + + Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r= +--- + media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++ + media/libsoundtouch/src/cpu_detect_x86.cpp | 5 ++++- + 2 files changed, 28 insertions(+), 1 deletion(-) + +diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp +index a42008e..7a31aa9 100644 +--- mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp ++++ mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp +@@ -101,7 +101,7 @@ uint detectCPUextensions(void) + + uint res = 0; + +-#if defined(__GNUC__) ++#if defined(__GNUC__) && defined(HAVE_CPUID_H) + // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. + uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. + +@@ -112,6 +112,9 @@ uint detectCPUextensions(void) + if (edx & bit_SSE) res = res | SUPPORT_SSE; + if (edx & bit_SSE2) res = res | SUPPORT_SSE2; + ++#elif defined(__GNUC__) ++ // No cpuid.h --> no cpuid support ++ return 0; + #else + // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required + // for __cpuid intrinsic support. Modified: trunk/www/firefox-nightly/Makefile.hgrev ============================================================================== --- trunk/www/firefox-nightly/Makefile.hgrev Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/firefox-nightly/Makefile.hgrev Tue Feb 26 04:18:43 2013 (r1192) @@ -1 +1 @@ -HGREV= 122639:cd4402b41864 +HGREV= 122889:73f0c5b00572 Modified: trunk/www/firefox-nightly/distinfo ============================================================================== --- trunk/www/firefox-nightly/distinfo Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/firefox-nightly/distinfo Tue Feb 26 04:18:43 2013 (r1192) @@ -1,2 +1,2 @@ -SHA256 (firefox-nightly/cd4402b41864.tar.bz2) = 27894e997a794a57eb8817dc56aa8c7d08613ecd7ff8812aef8eca0eb77ebdec -SIZE (firefox-nightly/cd4402b41864.tar.bz2) = 103575925 +SHA256 (firefox-nightly/73f0c5b00572.tar.bz2) = 312f9b740ae089ebb5f922dc37033c47a1e70e1cb643a67f050d751fefea381a +SIZE (firefox-nightly/73f0c5b00572.tar.bz2) = 104060373 Modified: trunk/www/firefox-nightly/files/patch-bug807492 ============================================================================== --- trunk/www/firefox-nightly/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/firefox-nightly/files/patch-bug807492 Tue Feb 26 04:18:43 2013 (r1192) @@ -17,34 +17,6 @@ index c167461..8346c11 100644 --- configure.in +++ configure.in -@@ -1413,16 +1413,27 @@ if test "$GNU_CC"; then - _SAVE_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -mssse3" - AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes]) - [HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1], - AC_MSG_RESULT([no])) - CFLAGS=$_SAVE_CFLAGS - AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3) - -+ # Check for -msse4.1 on $CC -+ AC_MSG_CHECKING([if toolchain supports -msse4.1 option]) -+ HAVE_TOOLCHAIN_SUPPORT_MSSE4_1= -+ _SAVE_CFLAGS=$CFLAGS -+ CFLAGS="$CFLAGS -msse4.1" -+ AC_TRY_COMPILE([asm ("pmulld %xmm6,%xmm0");],,AC_MSG_RESULT([yes]) -+ [HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1], -+ AC_MSG_RESULT([no])) -+ CFLAGS=$_SAVE_CFLAGS -+ AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1) -+ - # Turn on GNU-specific warnings: - # -Wall - turn on a lot of warnings - # -Wpointer-arith - good to have - # -Wdeclaration-after-statement - MSVC doesn't like these - # -Werror=return-type - catches missing returns, zero false positives - # -Wtype-limits - catches overflow bugs, few false positives - # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives - # @@ -5208,17 +5219,17 @@ dnl --enable-webrtc to override. Can di dnl --enable-webrtc to override. Can disable for everything in dnl the master list above. @@ -64,28 +36,6 @@ ;; esac fi -@@ -8997,16 +9008,21 @@ elif test "${OS_TARGET}" = "Android"; th - EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android " - if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then - EXTRA_GYP_DEFINES+=" -D armv7=0 " - else - EXTRA_GYP_DEFINES+=" -D armv7=1 " - fi - fi - -+# Don't try to compile sse4.1 code if toolchain doesn't support -+if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then -+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1" -+fi -+ - if test -n "$MOZ_WEBRTC"; then - AC_MSG_RESULT("generating WebRTC Makefiles...") - - dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries - dnl so that regeneration via dependencies works correctly - WEBRTC_CONFIG="-D build_with_mozilla=1 -D build_with_chromium=0 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi" - - GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" diff --git js/src/config/system-headers js/src/config/system-headers index 9bd1efa..1095a01 100644 --- js/src/config/system-headers @@ -562,106 +512,6 @@ ifeq ($(OS_TARGET),Darwin) LIBS += \ -framework AudioToolbox \ -diff --git media/webrtc/trunk/build/common.gypi media/webrtc/trunk/build/common.gypi -index 6ca2f70..5d261cb 100644 ---- media/webrtc/trunk/build/common.gypi -+++ media/webrtc/trunk/build/common.gypi -@@ -75,22 +75,31 @@ - # ash. This rule should be removed for the future when Windows is - # using the aura windows without the ash interface. - ['use_aura==1 and OS=="win"', { - 'use_ash%': 1, - }], - ['use_ash==1', { - 'use_aura%': 1, - }], -+ -+ # A flag for BSD platforms -+ ['OS=="dragonfly" or OS=="freebsd" or OS=="netbsd" or \ -+ OS=="openbsd"', { -+ 'os_bsd%': 1, -+ }, { -+ 'os_bsd%': 0, -+ }], - ], - }, - # Copy conditionally-set variables out one scope. - 'chromeos%': '<(chromeos)', - 'use_aura%': '<(use_aura)', - 'use_ash%': '<(use_ash)', -+ 'os_bsd%': '<(os_bsd)', - 'use_openssl%': '<(use_openssl)', - 'use_ibus%': '<(use_ibus)', - 'enable_viewport%': '<(enable_viewport)', - 'enable_hidpi%': '<(enable_hidpi)', - 'enable_touch_ui%': '<(enable_touch_ui)', - 'android_upstream_bringup%': '<(android_upstream_bringup)', - 'buildtype%': '<(buildtype)', - -@@ -114,17 +123,17 @@ - # Set default value of toolkit_views based on OS. - ['OS=="win" or chromeos==1 or use_aura==1', { - 'toolkit_views%': 1, - }, { - 'toolkit_views%': 0, - }], - - # Set toolkit_uses_gtk for the Chromium browser on Linux. -- ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', { -+ ['(OS=="linux" or OS=="solaris" or os_bsd==1) and use_aura==0', { - 'toolkit_uses_gtk%': 1, - }, { - 'toolkit_uses_gtk%': 0, - }], - - # Enable HiDPI on Mac OS and Chrome OS. - ['OS=="mac" or chromeos==1', { - 'enable_hidpi%': 1, -@@ -139,16 +148,17 @@ - - # Copy conditionally-set variables out one scope. - 'chromeos%': '<(chromeos)', - 'host_arch%': '<(host_arch)', - 'toolkit_views%': '<(toolkit_views)', - 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', - 'use_aura%': '<(use_aura)', - 'use_ash%': '<(use_ash)', -+ 'os_bsd%': '<(os_bsd)', - 'use_openssl%': '<(use_openssl)', - 'use_ibus%': '<(use_ibus)', - 'enable_viewport%': '<(enable_viewport)', - 'enable_hidpi%': '<(enable_hidpi)', - 'enable_touch_ui%': '<(enable_touch_ui)', - 'android_upstream_bringup%': '<(android_upstream_bringup)', - 'android_build_type%': '<(android_build_type)', - -@@ -397,25 +407,18 @@ - - # A flag for POSIX platforms - ['OS=="win"', { - 'os_posix%': 0, - }, { - 'os_posix%': 1, - }], - -- # A flag for BSD platforms -- ['OS=="freebsd" or OS=="openbsd"', { -- 'os_bsd%': 1, -- }, { -- 'os_bsd%': 0, -- }], -- - # NSS usage. -- ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', { -+ ['(OS=="linux" or OS=="solaris" or os_bsd==1) and use_openssl==0', { - 'use_nss%': 1, - }, { - 'use_nss%': 0, - }], - - # Flags to use X11 on non-Mac POSIX platforms - ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { - 'use_glib%': 0, diff --git media/webrtc/trunk/webrtc/build/common.gypi media/webrtc/trunk/webrtc/build/common.gypi index 9ca9f7c..d5c4ab9 100644 --- media/webrtc/trunk/webrtc/build/common.gypi @@ -1918,50 +1768,6 @@ #endif // WEBRTC_VOICE_ENGINE_VOICE_ENGINE_DEFINES_H -diff --git media/webrtc/trunk/third_party/libyuv/libyuv.gyp media/webrtc/trunk/third_party/libyuv/libyuv.gyp -index 6f4eb9e..5f044ad 100644 ---- media/webrtc/trunk/third_party/libyuv/libyuv.gyp -+++ media/webrtc/trunk/third_party/libyuv/libyuv.gyp -@@ -4,16 +4,17 @@ - # that can be found in the LICENSE file in the root of the source - # tree. An additional intellectual property rights grant can be found - # in the file PATENTS. All contributing project authors may - # be found in the AUTHORS file in the root of the source tree. - - { - 'variables': { - 'use_system_libjpeg%': 0, -+ 'yuv_disable_asm%': 0, - }, - 'targets': [ - { - 'target_name': 'libyuv', - 'type': 'static_library', - # 'type': 'shared_library', - 'conditions': [ - ['use_system_libjpeg==0', { -@@ -45,16 +46,21 @@ - ], - 'direct_dependent_settings': { - 'include_dirs': [ - 'include', - '.', - ], - }, - 'conditions': [ -+ ['yuv_disable_asm==1', { -+ 'defines': [ -+ 'YUV_DISABLE_ASM', -+ ], -+ }], - ['build_with_mozilla==1', { - 'include_dirs': [ - '$(DEPTH)/dist/include', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '$(DEPTH)/dist/include', - ], diff --git media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py index 338d0b7..2241d41 100644 --- media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py Modified: trunk/www/seamonkey/Makefile ============================================================================== --- trunk/www/seamonkey/Makefile Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/seamonkey/Makefile Tue Feb 26 04:18:43 2013 (r1192) @@ -2,7 +2,7 @@ # $FreeBSD: head/www/seamonkey/Makefile 310240 2013-01-11 16:48:10Z flo $ PORTNAME= seamonkey -DISTVERSION= 2.16 +DISTVERSION= 2.17b1 CATEGORIES?= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source @@ -13,13 +13,13 @@ COMMENT= The open source, standards compliant web browser BUILD_DEPENDS= nspr>=4.9.4:${PORTSDIR}/devel/nspr \ - nss>=3.14.1:${PORTSDIR}/security/nss \ + nss>=3.14.2:${PORTSDIR}/security/nss \ sqlite3>=3.7.14.1:${PORTSDIR}/databases/sqlite3 \ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \ unzip:${PORTSDIR}/archivers/unzip EM_VERSION= 1.5.1 -L_VERSION= 2.1b1 +L_VERSION= 2.2b1 USE_AUTOTOOLS= autoconf213:env USE_PYTHON_BUILD=-2.7 @@ -67,7 +67,7 @@ .include -WRKSRC= ${WRKDIR}/comm-release +WRKSRC= ${WRKDIR}/comm-beta MOZSRC:= ${WRKSRC}/mozilla XPI_LIBDIR= ${PREFIX}/lib/xpi @@ -133,6 +133,7 @@ post-patch: @${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \ + -e '/^SQLITE_VERSION/s/=.*/=3.7.14.1/' \ ${MOZSRC}/configure.in ${WRKSRC}/configure.in @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/suite/app/nsSuiteApp.cpp Modified: trunk/www/seamonkey/distinfo ============================================================================== --- trunk/www/seamonkey/distinfo Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/seamonkey/distinfo Tue Feb 26 04:18:43 2013 (r1192) @@ -1,4 +1,4 @@ -SHA256 (seamonkey-2.16.source.tar.bz2) = eb694309d3186737c30b745db650de89de4b4aebb49bf609ed9eb89e3fb9b8a3 -SIZE (seamonkey-2.16.source.tar.bz2) = 121957357 +SHA256 (seamonkey-2.17b1.source.tar.bz2) = e9d1c8009e2706789cd45841dc73e866577143d53f5920dc9d5aa61837f2dfa6 +SIZE (seamonkey-2.17b1.source.tar.bz2) = 122818269 SHA256 (enigmail-1.5.1.tar.gz) = 234ca3c8f7c74afb64ebdaa4762e358f35a72c1f8de007b992497fc2db803af0 SIZE (enigmail-1.5.1.tar.gz) = 1213954 Deleted: trunk/www/seamonkey/files/patch-alsapulse ============================================================================== --- trunk/www/seamonkey/files/patch-alsapulse Tue Feb 26 04:18:43 2013 (r1191) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,122 +0,0 @@ -diff --git mozilla/configure.in mozilla/configure.in -index 5980b76..11f5f77 100644 ---- mozilla/configure.in -+++ mozilla/configure.in -@@ -5618,11 +5618,25 @@ dnl ======================================================== - - dnl If using sydneyaudio with Linux, ensure that the alsa library is available - if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then -+ MOZ_ALSA=1 -+fi -+ -+MOZ_ARG_ENABLE_BOOL(alsa, -+[ --enable-alsa Enable Alsa support (default on Linux)], -+MOZ_ALSA=1, -+MOZ_ALSA=) -+ -+if test -n "$MOZ_ALSA"; then -+ AC_DEFINE(MOZ_CUBEB) - PKG_CHECK_MODULES(MOZ_ALSA, alsa, , - [echo "$MOZ_ALSA_PKG_ERRORS" - AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) - fi - -+AC_SUBST(MOZ_ALSA) -+AC_SUBST(MOZ_ALSA_CFLAGS) -+AC_SUBST(MOZ_ALSA_LIBS) -+ - dnl ======================================================== - dnl = Enable PulseAudio - dnl ======================================================== -@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT) - AC_SUBST(MOZ_VP8_ENCODER) - AC_SUBST(MOZ_VP8) - AC_SUBST(MOZ_OGG) --AC_SUBST(MOZ_ALSA_LIBS) --AC_SUBST(MOZ_ALSA_CFLAGS) - AC_SUBST(VPX_AS) - AC_SUBST(VPX_ASFLAGS) - AC_SUBST(VPX_DASH_C_FLAG) -diff --git mozilla/media/libcubeb/src/Makefile.in mozilla/media/libcubeb/src/Makefile.in -index 5ab4dd8..c8df26f 100644 ---- mozilla/media/libcubeb/src/Makefile.in -+++ mozilla/media/libcubeb/src/Makefile.in -@@ -24,10 +24,6 @@ endif - - ifeq ($(OS_TARGET),Android) - # No Android implementation of libcubeb yet. --else ifeq ($(OS_TARGET),Linux) --CSRCS = \ -- cubeb_alsa.c \ -- $(NULL) - endif - - ifeq ($(OS_TARGET),Darwin) -@@ -42,6 +38,12 @@ CSRCS = \ - $(NULL) - endif - -+ifdef MOZ_ALSA -+CSRCS = \ -+ cubeb_alsa.c \ -+ $(NULL) -+endif -+ - ifdef MOZ_PULSEAUDIO - CSRCS = \ - cubeb_pulse.c \ -diff --git mozilla/media/libsydneyaudio/src/Makefile.in mozilla/media/libsydneyaudio/src/Makefile.in -index 8dda8ce..b19641d 100644 ---- mozilla/media/libsydneyaudio/src/Makefile.in -+++ mozilla/media/libsydneyaudio/src/Makefile.in -@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) - CSRCS = \ - sydney_audio_android.c \ - $(NULL) --else ifeq ($(OS_ARCH),Linux) --CSRCS = \ -- sydney_audio_alsa.c \ -- $(NULL) - endif - - ifeq ($(OS_ARCH),WINNT) -@@ -68,6 +64,18 @@ CSRCS = \ - $(NULL) - endif - -+ifdef MOZ_ALSA -+CSRCS = \ -+ sydney_audio_alsa.c \ -+ $(NULL) -+endif -+ -+ifdef MOZ_PULSEAUDIO -+CSRCS = \ -+ sydney_audio_pulseaudio.c \ -+ $(NULL) -+endif -+ - ifeq ($(OS_ARCH),WINNT) - OS_LIBS += winmm.lib - endif -diff --git mozilla/toolkit/library/Makefile.in mozilla/toolkit/library/Makefile.in -index 43384e9..e46a6e3 100644 ---- mozilla/toolkit/library/Makefile.in -+++ mozilla/toolkit/library/Makefile.in -@@ -370,14 +370,11 @@ endif - - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) - --ifdef MOZ_SYDNEYAUDIO --ifeq ($(OS_ARCH),Linux) -+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO)) -+ifdef MOZ_ALSA - EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) - endif --endif -- - ifdef MOZ_PULSEAUDIO --ifdef MOZ_CUBEB - EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) - endif - endif Added: trunk/www/seamonkey/files/patch-bug780432 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/seamonkey/files/patch-bug780432 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,17 @@ +diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in +index 8dda8ce..b19641d 100644 +--- mozilla/media/libsydneyaudio/src/Makefile.in ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -68,6 +68,12 @@ ifdef MOZ_ALSA + $(NULL) + endif + ++ifdef MOZ_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif Deleted: trunk/www/seamonkey/files/patch-bug787804 ============================================================================== --- trunk/www/seamonkey/files/patch-bug787804 Tue Feb 26 04:18:43 2013 (r1191) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,3557 +0,0 @@ -commit 74997f1 -Author: Jan Varga -Date: Mon Dec 17 20:25:10 2012 +0100 - - Bug 787804 - Rewrite quota handling (eliminate test_quota.c). r=bent,asuth,vladan ---- - db/sqlite3/README.MOZILLA | 4 +- - db/sqlite3/src/sqlite.def | 1 + - db/sqlite3/src/test_quota.c | 2001 -------------------- - db/sqlite3/src/test_quota.h | 274 --- - dom/Makefile.in | 1 + - dom/dom-config.mk | 1 + - dom/file/FileStreamWrappers.cpp | 11 - - dom/file/LockedFile.cpp | 8 +- - dom/file/nsIFileStorage.h | 40 +- - dom/indexedDB/FileManager.cpp | 33 +- - dom/indexedDB/FileManager.h | 20 +- - dom/indexedDB/FileStream.cpp | 321 ---- - dom/indexedDB/FileStream.h | 140 -- - dom/indexedDB/IDBDatabase.cpp | 6 + - dom/indexedDB/IDBFactory.cpp | 28 +- - dom/indexedDB/IDBFactory.h | 8 +- - dom/indexedDB/IDBFileHandle.cpp | 25 +- - dom/indexedDB/IDBObjectStore.cpp | 10 +- - dom/indexedDB/IDBTransaction.cpp | 3 +- - dom/indexedDB/IndexedDatabaseInlines.h | 13 + - dom/indexedDB/IndexedDatabaseManager.cpp | 162 +- - dom/indexedDB/IndexedDatabaseManager.h | 11 +- - dom/indexedDB/Makefile.in | 2 - - dom/indexedDB/OpenDatabaseHelper.cpp | 104 +- - dom/indexedDB/OpenDatabaseHelper.h | 12 +- - dom/indexedDB/nsIStandardFileStream.idl | 60 - - dom/indexedDB/test/Makefile.in | 2 + - dom/indexedDB/test/file.js | 21 +- - dom/indexedDB/test/test_file_quota.html | 14 +- - dom/indexedDB/test/test_filehandle_quota.html | 5 +- - dom/quota/FileStreams.cpp | 123 ++ - dom/quota/FileStreams.h | 115 ++ - dom/quota/Makefile.in | 33 + - dom/quota/QuotaCommon.h | 23 + - dom/quota/QuotaManager.cpp | 294 +++ - dom/quota/QuotaManager.h | 147 ++ - layout/build/Makefile.in | 1 + - netwerk/base/src/Makefile.in | 1 + - netwerk/base/src/nsFileStreams.cpp | 103 +- - netwerk/base/src/nsFileStreams.h | 12 +- - storage/public/Makefile.in | 1 - - storage/public/mozIStorageService.idl | 13 +- - .../public/mozIStorageServiceQuotaManagement.idl | 99 - - storage/public/storage.h | 1 - - storage/src/TelemetryVFS.cpp | 35 +- - storage/src/mozStorageConnection.cpp | 85 +- - storage/src/mozStorageConnection.h | 27 +- - storage/src/mozStorageService.cpp | 168 +- - storage/src/mozStorageService.h | 3 - - toolkit/toolkit-makefiles.sh | 1 + - 50 files changed, 1239 insertions(+), 3387 deletions(-) - -diff --git dom/Makefile.in dom/Makefile.in -index 672e065..47cd253 100644 ---- mozilla/dom/Makefile.in -+++ mozilla/dom/Makefile.in -@@ -58,6 +58,7 @@ PARALLEL_DIRS += \ - media \ - messages \ - power \ -+ quota \ - settings \ - sms \ - mms \ -diff --git dom/dom-config.mk dom/dom-config.mk -index d0f46cc..1cf57ed 100644 ---- mozilla/dom/dom-config.mk -+++ mozilla/dom/dom-config.mk -@@ -8,6 +8,7 @@ DOM_SRCDIRS = \ - dom/encoding \ - dom/file \ - dom/power \ -+ dom/quota \ - dom/media \ - dom/network/src \ - dom/settings \ -diff --git dom/file/FileStreamWrappers.cpp dom/file/FileStreamWrappers.cpp -index 2283266..c4cf102 100644 ---- mozilla/dom/file/FileStreamWrappers.cpp -+++ mozilla/dom/file/FileStreamWrappers.cpp -@@ -8,7 +8,6 @@ - - #include "nsIFileStorage.h" - #include "nsISeekableStream.h" --#include "nsIStandardFileStream.h" - #include "mozilla/Attributes.h" - - #include "FileHelper.h" -@@ -246,16 +245,6 @@ FileOutputStreamWrapper::Close() - nsresult rv = NS_OK; - - if (!mFirstTime) { -- // We must flush buffers of the stream on the same thread on which we wrote -- // some data. -- nsCOMPtr sstream = do_QueryInterface(mFileStream); -- if (sstream) { -- rv = sstream->FlushBuffers(); -- if (NS_FAILED(rv)) { -- NS_WARNING("Failed to flush buffers of the stream!"); -- } -- } -- - NS_ASSERTION(PR_GetCurrentThread() == mWriteThread, - "Unsetting thread locals on wrong thread!"); - mFileHelper->mFileStorage->UnsetThreadLocals(); -diff --git dom/file/LockedFile.cpp dom/file/LockedFile.cpp -index 0fca730..926df91 100644 ---- mozilla/dom/file/LockedFile.cpp -+++ mozilla/dom/file/LockedFile.cpp -@@ -953,10 +953,10 @@ FinishHelper::Run() - } - - for (uint32_t index = 0; index < mParallelStreams.Length(); index++) { -- nsCOMPtr ostream = -+ nsCOMPtr stream = - do_QueryInterface(mParallelStreams[index]); - -- if (NS_FAILED(ostream->Close())) { -+ if (NS_FAILED(stream->Close())) { - NS_WARNING("Failed to close stream!"); - } - -@@ -964,9 +964,9 @@ FinishHelper::Run() - } - - if (mStream) { -- nsCOMPtr ostream = do_QueryInterface(mStream); -+ nsCOMPtr stream = do_QueryInterface(mStream); - -- if (NS_FAILED(ostream->Close())) { -+ if (NS_FAILED(stream->Close())) { - NS_WARNING("Failed to close stream!"); - } - -diff --git dom/file/nsIFileStorage.h dom/file/nsIFileStorage.h -index 92bb608..e985f0a 100644 ---- mozilla/dom/file/nsIFileStorage.h -+++ mozilla/dom/file/nsIFileStorage.h -@@ -10,14 +10,17 @@ - #include "nsISupports.h" - - #define NS_FILESTORAGE_IID \ -- {0xbba9c2ff, 0x85c9, 0x47c1, \ -- { 0xaf, 0xce, 0x0a, 0x7e, 0x6f, 0x21, 0x50, 0x95 } } -+ {0xa0801944, 0x2f1c, 0x4203, \ -+ { 0x9c, 0xaa, 0xaa, 0x47, 0xe0, 0x0c, 0x67, 0x92 } } - - class nsIFileStorage : public nsISupports - { - public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_FILESTORAGE_IID) - -+ virtual const nsACString& -+ StorageOrigin() = 0; -+ - virtual nsISupports* - StorageId() = 0; - -@@ -36,20 +39,23 @@ public: - - NS_DEFINE_STATIC_IID_ACCESSOR(nsIFileStorage, NS_FILESTORAGE_IID) - --#define NS_DECL_NSIFILESTORAGE \ -- virtual nsISupports* \ -- StorageId(); \ -- \ -- virtual bool \ -- IsStorageInvalidated(); \ -- \ -- virtual bool \ -- IsStorageShuttingDown(); \ -- \ -- virtual void \ -- SetThreadLocals(); \ -- \ -- virtual void \ -- UnsetThreadLocals(); -+#define NS_DECL_NSIFILESTORAGE \ -+ virtual const nsACString& \ -+ StorageOrigin() MOZ_OVERRIDE; \ -+ \ -+ virtual nsISupports* \ -+ StorageId() MOZ_OVERRIDE; \ -+ \ -+ virtual bool \ -+ IsStorageInvalidated() MOZ_OVERRIDE; \ -+ \ -+ virtual bool \ -+ IsStorageShuttingDown() MOZ_OVERRIDE; \ -+ \ -+ virtual void \ -+ SetThreadLocals() MOZ_OVERRIDE; \ -+ \ -+ virtual void \ -+ UnsetThreadLocals() MOZ_OVERRIDE; - - #endif // nsIFileStorage_h__ -diff --git dom/indexedDB/FileManager.cpp dom/indexedDB/FileManager.cpp -index 9db56e8..4ed6e9e 100644 ---- mozilla/dom/indexedDB/FileManager.cpp -+++ mozilla/dom/indexedDB/FileManager.cpp -@@ -7,8 +7,8 @@ - #include "FileManager.h" - - #include "mozIStorageConnection.h" --#include "mozIStorageServiceQuotaManagement.h" - #include "mozIStorageStatement.h" -+#include "nsIInputStream.h" - #include "nsISimpleEnumerator.h" - - #include "mozStorageCID.h" -@@ -18,6 +18,8 @@ - #include "IndexedDatabaseManager.h" - #include "OpenDatabaseHelper.h" - -+#include "IndexedDatabaseInlines.h" -+ - #define JOURNAL_DIRECTORY_NAME "journals" - - USING_INDEXEDDB_NAMESPACE -@@ -262,13 +264,11 @@ FileManager::GetFileForId(nsIFile* aDirectory, int64_t aId) - - // static - nsresult --FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, -- nsIFile* aDirectory, -+FileManager::InitDirectory(nsIFile* aDirectory, - nsIFile* aDatabaseFile, -- FactoryPrivilege aPrivilege) -+ const nsACString& aOrigin) - { - NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!"); -- NS_ASSERTION(aService, "Null service!"); - NS_ASSERTION(aDirectory, "Null directory!"); - NS_ASSERTION(aDatabaseFile, "Null database file!"); - -@@ -310,8 +310,8 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, - - if (hasElements) { - nsCOMPtr connection; -- rv = OpenDatabaseHelper::CreateDatabaseConnection( -- NullString(), aDatabaseFile, aDirectory, getter_AddRefs(connection)); -+ rv = OpenDatabaseHelper::CreateDatabaseConnection(aDatabaseFile, -+ aDirectory, NullString(), aOrigin, getter_AddRefs(connection)); - NS_ENSURE_SUCCESS(rv, rv); - - mozStorageTransaction transaction(connection, false); -@@ -377,12 +377,17 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, - } - } - -- if (aPrivilege == Chrome) { -- return NS_OK; -- } -+ return NS_OK; -+} -+ -+// static -+nsresult -+FileManager::GetUsage(nsIFile* aDirectory, uint64_t* aUsage) -+{ -+ uint64_t usage = 0; - - nsCOMPtr entries; -- rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries)); -+ nsresult rv = aDirectory->GetDirectoryEntries(getter_AddRefs(entries)); - NS_ENSURE_SUCCESS(rv, rv); - - bool hasMore; -@@ -402,9 +407,13 @@ FileManager::InitDirectory(mozIStorageServiceQuotaManagement* aService, - continue; - } - -- rv = aService->UpdateQuotaInformationForFile(file); -+ int64_t fileSize; -+ rv = file->GetFileSize(&fileSize); - NS_ENSURE_SUCCESS(rv, rv); -+ -+ IncrementUsage(&usage, uint64_t(fileSize)); - } - -+ *aUsage = usage; - return NS_OK; - } -diff --git dom/indexedDB/FileManager.h dom/indexedDB/FileManager.h -index 2c72d0a..370d4a8 100644 ---- mozilla/dom/indexedDB/FileManager.h -+++ mozilla/dom/indexedDB/FileManager.h -@@ -24,10 +24,10 @@ class FileManager - friend class FileInfo; - - public: -- FileManager(const nsACString& aOrigin, -+ FileManager(const nsACString& aOrigin, FactoryPrivilege aPrivilege, - const nsAString& aDatabaseName) -- : mOrigin(aOrigin), mDatabaseName(aDatabaseName), mLastFileId(0), -- mInvalidated(false) -+ : mOrigin(aOrigin), mPrivilege(aPrivilege), mDatabaseName(aDatabaseName), -+ mLastFileId(0), mInvalidated(false) - { } - - ~FileManager() -@@ -40,6 +40,11 @@ public: - return mOrigin; - } - -+ const FactoryPrivilege& Privilege() const -+ { -+ return mPrivilege; -+ } -+ - const nsAString& DatabaseName() const - { - return mDatabaseName; -@@ -68,12 +73,15 @@ public: - static already_AddRefed GetFileForId(nsIFile* aDirectory, - int64_t aId); - -- static nsresult InitDirectory(mozIStorageServiceQuotaManagement* aService, -- nsIFile* aDirectory, nsIFile* aDatabaseFile, -- FactoryPrivilege aPrivilege); -+ static nsresult InitDirectory(nsIFile* aDirectory, -+ nsIFile* aDatabaseFile, -+ const nsACString& aOrigin); -+ -+ static nsresult GetUsage(nsIFile* aDirectory, uint64_t* aUsage); - - private: - nsCString mOrigin; -+ FactoryPrivilege mPrivilege; - nsString mDatabaseName; - - nsString mDirectoryPath; -diff --git dom/indexedDB/FileStream.cpp dom/indexedDB/FileStream.cpp -deleted file mode 100644 -index dddf5d5..0000000 ---- mozilla/dom/indexedDB/FileStream.cpp -+++ /dev/null -@@ -1,321 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this file, -- * You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#include "FileStream.h" -- --#include "nsIFile.h" -- --#include "nsThreadUtils.h" --#include "test_quota.h" -- --USING_INDEXEDDB_NAMESPACE -- --NS_IMPL_THREADSAFE_ADDREF(FileStream) --NS_IMPL_THREADSAFE_RELEASE(FileStream) -- --NS_INTERFACE_MAP_BEGIN(FileStream) -- NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardFileStream) -- NS_INTERFACE_MAP_ENTRY(nsISeekableStream) -- NS_INTERFACE_MAP_ENTRY(nsIInputStream) -- NS_INTERFACE_MAP_ENTRY(nsIOutputStream) -- NS_INTERFACE_MAP_ENTRY(nsIStandardFileStream) -- NS_INTERFACE_MAP_ENTRY(nsIFileMetadata) --NS_INTERFACE_MAP_END -- --NS_IMETHODIMP --FileStream::Seek(int32_t aWhence, int64_t aOffset) --{ -- // TODO: Add support for 64 bit file sizes, bug 752431 -- NS_ENSURE_TRUE(aOffset <= INT32_MAX, NS_ERROR_INVALID_ARG); -- -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- int whence; -- switch (aWhence) { -- case nsISeekableStream::NS_SEEK_SET: -- whence = SEEK_SET; -- break; -- case nsISeekableStream::NS_SEEK_CUR: -- whence = SEEK_CUR; -- break; -- case nsISeekableStream::NS_SEEK_END: -- whence = SEEK_END; -- break; -- default: -- return NS_ERROR_INVALID_ARG; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fseek(mQuotaFile, aOffset, whence); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Tell(int64_t* aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- long rc = sqlite3_quota_ftell(mQuotaFile); -- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR); -- -- *aResult = rc; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::SetEOF() --{ -- int64_t pos; -- nsresult rv = Tell(&pos); -- NS_ENSURE_SUCCESS(rv, rv); -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_ftruncate(mQuotaFile, pos); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- -- --NS_IMETHODIMP --FileStream::Close() --{ -- CleanUpOpen(); -- -- if (mQuotaFile) { -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fclose(mQuotaFile); -- mQuotaFile = nullptr; -- -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- } -- -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Available(uint64_t* aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- long rc = sqlite3_quota_file_available(mQuotaFile); -- NS_ENSURE_TRUE(rc >= 0, NS_BASE_STREAM_OSERROR); -- -- *aResult = rc; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Read(char* aBuf, uint32_t aCount, uint32_t* aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- size_t bytesRead = sqlite3_quota_fread(aBuf, 1, aCount, mQuotaFile); -- if (bytesRead < aCount && sqlite3_quota_ferror(mQuotaFile)) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- *aResult = bytesRead; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, -- uint32_t aCount, uint32_t* aResult) --{ -- NS_NOTREACHED("Don't call me!"); -- return NS_ERROR_NOT_IMPLEMENTED; --} -- --NS_IMETHODIMP --FileStream::IsNonBlocking(bool *aNonBlocking) --{ -- *aNonBlocking = false; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Write(const char* aBuf, uint32_t aCount, uint32_t *aResult) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- size_t bytesWritten = sqlite3_quota_fwrite(aBuf, 1, aCount, mQuotaFile); -- if (bytesWritten < aCount) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- *aResult = bytesWritten; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::Flush() --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fflush(mQuotaFile, 1); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::WriteFrom(nsIInputStream *inStr, uint32_t count, uint32_t *_retval) --{ -- return NS_ERROR_NOT_IMPLEMENTED; --} -- --NS_IMETHODIMP --FileStream::WriteSegments(nsReadSegmentFun reader, void * closure, uint32_t count, uint32_t *_retval) --{ -- NS_NOTREACHED("Don't call me!"); -- return NS_ERROR_NOT_IMPLEMENTED; --} -- --NS_IMETHODIMP --FileStream::Init(nsIFile* aFile, const nsAString& aMode, int32_t aFlags) --{ -- NS_ASSERTION(!mQuotaFile && !mDeferredOpen, "Already initialized!"); -- -- nsresult rv = aFile->GetPath(mFilePath); -- NS_ENSURE_SUCCESS(rv, rv); -- -- mMode = aMode; -- mFlags = aFlags; -- -- if (mFlags & nsIStandardFileStream::FLAGS_DEFER_OPEN) { -- mDeferredOpen = true; -- return NS_OK; -- } -- -- return DoOpen(); --} -- --NS_IMETHODIMP --FileStream::GetSize(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- // TODO: Use sqlite3_quota_file_size() here, bug 760783 -- int64_t rc = sqlite3_quota_file_truesize(mQuotaFile); -- -- NS_ASSERTION(rc >= 0, "The file is not under quota management!"); -- -- *_retval = rc; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::GetLastModified(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- time_t mtime; -- int rc = sqlite3_quota_file_mtime(mQuotaFile, &mtime); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- *_retval = mtime * PR_MSEC_PER_SEC; -- return NS_OK; --} -- --NS_IMETHODIMP --FileStream::FlushBuffers() --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mQuotaFile) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- int rc = sqlite3_quota_fflush(mQuotaFile, 0); -- NS_ENSURE_TRUE(rc == 0, NS_BASE_STREAM_OSERROR); -- -- return NS_OK; --} -- --nsresult --FileStream::DoOpen() --{ -- NS_ASSERTION(!mFilePath.IsEmpty(), "Must have a file path"); -- -- NS_ASSERTION(!NS_IsMainThread(), "Performing sync IO on the main thread!"); -- -- quota_FILE* quotaFile = -- sqlite3_quota_fopen(NS_ConvertUTF16toUTF8(mFilePath).get(), -- NS_ConvertUTF16toUTF8(mMode).get()); -- -- CleanUpOpen(); -- -- if (!quotaFile) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- mQuotaFile = quotaFile; -- -- return NS_OK; --} -diff --git dom/indexedDB/FileStream.h dom/indexedDB/FileStream.h -deleted file mode 100644 -index 09648b1..0000000 ---- mozilla/dom/indexedDB/FileStream.h -+++ /dev/null -@@ -1,140 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this file, -- * You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#ifndef mozilla_dom_indexeddb_filestream_h__ --#define mozilla_dom_indexeddb_filestream_h__ -- --#include "IndexedDatabase.h" -- --#include "nsIFileStreams.h" --#include "nsIInputStream.h" --#include "nsIOutputStream.h" --#include "nsISeekableStream.h" --#include "nsIStandardFileStream.h" -- --class nsIFile; --struct quota_FILE; -- --BEGIN_INDEXEDDB_NAMESPACE -- --class FileStream : public nsISeekableStream, -- public nsIInputStream, -- public nsIOutputStream, -- public nsIStandardFileStream, -- public nsIFileMetadata --{ --public: -- FileStream() -- : mFlags(0), -- mDeferredOpen(false), -- mQuotaFile(nullptr) -- { } -- -- virtual ~FileStream() -- { -- Close(); -- } -- -- NS_DECL_ISUPPORTS -- NS_DECL_NSISEEKABLESTREAM -- NS_DECL_NSISTANDARDFILESTREAM -- NS_DECL_NSIFILEMETADATA -- -- // nsIInputStream -- NS_IMETHOD -- Close(); -- -- NS_IMETHOD -- Available(uint64_t* _retval); -- -- NS_IMETHOD -- Read(char* aBuf, uint32_t aCount, uint32_t* _retval); -- -- NS_IMETHOD -- ReadSegments(nsWriteSegmentFun aWriter, void* aClosure, uint32_t aCount, -- uint32_t* _retval); -- -- NS_IMETHOD -- IsNonBlocking(bool* _retval); -- -- // nsIOutputStream -- -- // Close() already declared -- -- NS_IMETHOD -- Flush(); -- -- NS_IMETHOD -- Write(const char* aBuf, uint32_t aCount, uint32_t* _retval); -- -- NS_IMETHOD -- WriteFrom(nsIInputStream* aFromStream, uint32_t aCount, uint32_t* _retval); -- -- NS_IMETHOD -- WriteSegments(nsReadSegmentFun aReader, void* aClosure, uint32_t aCount, -- uint32_t* _retval); -- -- // IsNonBlocking() already declared -- --protected: -- /** -- * Cleans up data prepared in Init. -- */ -- void -- CleanUpOpen() -- { -- mFilePath.Truncate(); -- mDeferredOpen = false; -- } -- -- /** -- * Open the file. This is called either from Init -- * or from DoPendingOpen (if FLAGS_DEFER_OPEN is used when initializing this -- * stream). The default behavior of DoOpen is to open the file and save the -- * file descriptor. -- */ -- virtual nsresult -- DoOpen(); -- -- /** -- * If there is a pending open, do it now. It's important for this to be -- * inlined since we do it in almost every stream API call. -- */ -- nsresult -- DoPendingOpen() -- { -- if (!mDeferredOpen) { -- return NS_OK; -- } -- -- return DoOpen(); -- } -- -- /** -- * Data we need to do an open. -- */ -- nsString mFilePath; -- nsString mMode; -- -- /** -- * Flags describing our behavior. See the IDL file for possible values. -- */ -- int32_t mFlags; -- -- /** -- * Whether we have a pending open (see FLAGS_DEFER_OPEN in the IDL file). -- */ -- bool mDeferredOpen; -- -- /** -- * File descriptor for opened file. -- */ -- quota_FILE* mQuotaFile; --}; -- --END_INDEXEDDB_NAMESPACE -- --#endif // mozilla_dom_indexeddb_filestream_h__ -diff --git dom/indexedDB/IDBDatabase.cpp dom/indexedDB/IDBDatabase.cpp -index 63500b0..8842daf 100644 ---- mozilla/dom/indexedDB/IDBDatabase.cpp -+++ mozilla/dom/indexedDB/IDBDatabase.cpp -@@ -779,6 +779,12 @@ IDBDatabase::Close() - return NS_OK; - } - -+const nsACString& -+IDBDatabase::StorageOrigin() -+{ -+ return Origin(); -+} -+ - nsISupports* - IDBDatabase::StorageId() - { -diff --git dom/indexedDB/IDBFactory.cpp dom/indexedDB/IDBFactory.cpp -index 1007df1..c1f573e 100644 ---- mozilla/dom/indexedDB/IDBFactory.cpp -+++ mozilla/dom/indexedDB/IDBFactory.cpp -@@ -253,8 +253,26 @@ IDBFactory::Create(ContentParent* aContentParent, - } - - // static -+already_AddRefed -+IDBFactory::GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin) -+{ -+ nsCOMPtr uri; -+ nsresult rv = NS_NewFileURI(getter_AddRefs(uri), aDatabaseFile); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ nsCOMPtr fileUrl = do_QueryInterface(uri); -+ NS_ASSERTION(fileUrl, "This should always succeed!"); -+ -+ rv = fileUrl->SetQuery(NS_LITERAL_CSTRING("origin=") + aOrigin); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ return fileUrl.forget(); -+} -+ -+// static - already_AddRefed --IDBFactory::GetConnection(const nsAString& aDatabaseFilePath) -+IDBFactory::GetConnection(const nsAString& aDatabaseFilePath, -+ const nsACString& aOrigin) - { - NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!"); - NS_ASSERTION(StringEndsWith(aDatabaseFilePath, NS_LITERAL_STRING(".sqlite")), -@@ -271,13 +289,15 @@ IDBFactory::GetConnection(const nsAString& aDatabaseFilePath) - NS_ENSURE_SUCCESS(rv, nullptr); - NS_ENSURE_TRUE(exists, nullptr); - -- nsCOMPtr ss = -+ nsCOMPtr dbFileUrl = GetDatabaseFileURL(dbFile, aOrigin); -+ NS_ENSURE_TRUE(dbFileUrl, nullptr); -+ -+ nsCOMPtr ss = - do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID); - NS_ENSURE_TRUE(ss, nullptr); - - nsCOMPtr connection; -- rv = ss->OpenDatabaseWithVFS(dbFile, NS_LITERAL_CSTRING("quota"), -- getter_AddRefs(connection)); -+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection)); - NS_ENSURE_SUCCESS(rv, nullptr); - - // Turn on foreign key constraints and recursive triggers. -diff --git dom/indexedDB/IDBFactory.h dom/indexedDB/IDBFactory.h -index d5461f7..49dad42 100644 ---- mozilla/dom/indexedDB/IDBFactory.h -+++ mozilla/dom/indexedDB/IDBFactory.h -@@ -15,6 +15,8 @@ - #include "nsCycleCollectionParticipant.h" - - class nsIAtom; -+class nsIFile; -+class nsIFileURL; - class nsPIDOMWindow; - - namespace mozilla { -@@ -75,8 +77,12 @@ public: - static nsresult Create(ContentParent* aContentParent, - IDBFactory** aFactory); - -+ static already_AddRefed -+ GetDatabaseFileURL(nsIFile* aDatabaseFile, const nsACString& aOrigin); -+ - static already_AddRefed -- GetConnection(const nsAString& aDatabaseFilePath); -+ GetConnection(const nsAString& aDatabaseFilePath, -+ const nsACString& aOrigin); - - static nsresult - LoadDatabaseInformation(mozIStorageConnection* aConnection, -diff --git dom/indexedDB/IDBFileHandle.cpp dom/indexedDB/IDBFileHandle.cpp -index e0340ff..f71fd56 100644 ---- mozilla/dom/indexedDB/IDBFileHandle.cpp -+++ mozilla/dom/indexedDB/IDBFileHandle.cpp -@@ -6,15 +6,14 @@ - - #include "IDBFileHandle.h" - --#include "nsIStandardFileStream.h" -- - #include "mozilla/dom/file/File.h" -+#include "mozilla/dom/quota/FileStreams.h" - #include "nsDOMClassInfoID.h" - --#include "FileStream.h" - #include "IDBDatabase.h" - - USING_INDEXEDDB_NAMESPACE -+USING_QUOTA_NAMESPACE - - namespace { - -@@ -68,22 +67,22 @@ IDBFileHandle::Create(IDBDatabase* aDatabase, - already_AddRefed - IDBFileHandle::CreateStream(nsIFile* aFile, bool aReadOnly) - { -- nsRefPtr stream = new FileStream(); -+ const nsACString& origin = mFileStorage->StorageOrigin(); -+ -+ nsCOMPtr result; - -- nsString streamMode; - if (aReadOnly) { -- streamMode.AssignLiteral("rb"); -+ nsRefPtr stream = FileInputStream::Create( -+ origin, aFile, -1, -1, nsIFileInputStream::DEFER_OPEN); -+ result = NS_ISUPPORTS_CAST(nsIFileInputStream*, stream); - } - else { -- streamMode.AssignLiteral("r+b"); -+ nsRefPtr stream = FileStream::Create( -+ origin, aFile, -1, -1, nsIFileStream::DEFER_OPEN); -+ result = NS_ISUPPORTS_CAST(nsIFileStream*, stream); - } -+ NS_ENSURE_TRUE(result, nullptr); - -- nsresult rv = stream->Init(aFile, streamMode, -- nsIStandardFileStream::FLAGS_DEFER_OPEN); -- NS_ENSURE_SUCCESS(rv, nullptr); -- -- nsCOMPtr result = -- NS_ISUPPORTS_CAST(nsIStandardFileStream*, stream); - return result.forget(); - } - -diff --git dom/indexedDB/IDBObjectStore.cpp dom/indexedDB/IDBObjectStore.cpp -index 746d473..1f16d26 100644 ---- mozilla/dom/indexedDB/IDBObjectStore.cpp -+++ mozilla/dom/indexedDB/IDBObjectStore.cpp -@@ -17,6 +17,7 @@ - #include "mozilla/dom/ContentParent.h" - #include "mozilla/dom/StructuredCloneTags.h" - #include "mozilla/dom/ipc/Blob.h" -+#include "mozilla/dom/quota/FileStreams.h" - #include "mozilla/storage.h" - #include "nsContentUtils.h" - #include "nsDOMClassInfo.h" -@@ -27,10 +28,8 @@ - #include "nsServiceManagerUtils.h" - #include "nsThreadUtils.h" - #include "snappy/snappy.h" --#include "test_quota.h" - - #include "AsyncConnectionHelper.h" --#include "FileStream.h" - #include "IDBCursor.h" - #include "IDBEvents.h" - #include "IDBFileHandle.h" -@@ -51,6 +50,7 @@ - USING_INDEXEDDB_NAMESPACE - using namespace mozilla::dom; - using namespace mozilla::dom::indexedDB::ipc; -+using mozilla::dom::quota::FileOutputStream; - - namespace { - -@@ -2734,9 +2734,9 @@ AddHelper::DoDatabaseWork(mozIStorageConnection* aConnection) - nativeFile = fileManager->GetFileForId(directory, id); - NS_ENSURE_TRUE(nativeFile, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- nsRefPtr outputStream = new FileStream(); -- rv = outputStream->Init(nativeFile, NS_LITERAL_STRING("wb"), 0); -- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ nsRefPtr outputStream = FileOutputStream::Create( -+ mObjectStore->Transaction()->Database()->Origin(), nativeFile); -+ NS_ENSURE_TRUE(outputStream, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - - rv = CopyData(inputStream, outputStream); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -diff --git dom/indexedDB/IDBTransaction.cpp dom/indexedDB/IDBTransaction.cpp -index fcef7cc..a5345e2 100644 ---- mozilla/dom/indexedDB/IDBTransaction.cpp -+++ mozilla/dom/indexedDB/IDBTransaction.cpp -@@ -352,7 +352,8 @@ IDBTransaction::GetOrCreateConnection(mozIStorageConnection** aResult) - - if (!mConnection) { - nsCOMPtr connection = -- IDBFactory::GetConnection(mDatabase->FilePath()); -+ IDBFactory::GetConnection(mDatabase->FilePath(), -+ mDatabase->Origin()); - NS_ENSURE_TRUE(connection, NS_ERROR_FAILURE); - - nsresult rv; -diff --git dom/indexedDB/IndexedDatabaseInlines.h dom/indexedDB/IndexedDatabaseInlines.h -index 62e65d6..f27d60c 100644 ---- mozilla/dom/indexedDB/IndexedDatabaseInlines.h -+++ mozilla/dom/indexedDB/IndexedDatabaseInlines.h -@@ -79,4 +79,17 @@ AppendConditionClause(const nsACString& aColumnName, - aResult += NS_LITERAL_CSTRING(" :") + aArgName; - } - -+inline void -+IncrementUsage(uint64_t* aUsage, uint64_t aDelta) -+{ -+ // Watch for overflow! -+ if ((UINT64_MAX - *aUsage) < aDelta) { -+ NS_WARNING("Usage exceeds the maximum!"); -+ *aUsage = UINT64_MAX; -+ } -+ else { -+ *aUsage += aDelta; -+ } -+} -+ - END_INDEXEDDB_NAMESPACE -diff --git dom/indexedDB/IndexedDatabaseManager.cpp dom/indexedDB/IndexedDatabaseManager.cpp -index e4ad647..88f09da 100644 ---- mozilla/dom/indexedDB/IndexedDatabaseManager.cpp -+++ mozilla/dom/indexedDB/IndexedDatabaseManager.cpp -@@ -22,6 +22,7 @@ - #include "nsITimer.h" - - #include "mozilla/dom/file/FileService.h" -+#include "mozilla/dom/quota/QuotaManager.h" - #include "mozilla/dom/TabContext.h" - #include "mozilla/LazyIdleThread.h" - #include "mozilla/Preferences.h" -@@ -36,7 +37,6 @@ - #include "nsThreadUtils.h" - #include "nsXPCOM.h" - #include "nsXPCOMPrivate.h" --#include "test_quota.h" - #include "xpcpublic.h" - - #include "AsyncConnectionHelper.h" -@@ -48,6 +48,8 @@ - #include "OpenDatabaseHelper.h" - #include "TransactionThreadPool.h" - -+#include "IndexedDatabaseInlines.h" -+ - // The amount of time, in milliseconds, that our IO thread will stay alive - // after the last event it processes. - #define DEFAULT_THREAD_TIMEOUT_MS 30000 -@@ -70,6 +72,7 @@ using namespace mozilla::services; - using namespace mozilla::dom; - using mozilla::Preferences; - using mozilla::dom::file::FileService; -+using mozilla::dom::quota::QuotaManager; - - static NS_DEFINE_CID(kDOMSOF_CID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); - -@@ -103,29 +106,6 @@ GetDatabaseBaseFilename(const nsAString& aFilename, - return true; - } - --class QuotaCallback MOZ_FINAL : public mozIStorageQuotaCallback --{ --public: -- NS_DECL_ISUPPORTS -- -- NS_IMETHOD -- QuotaExceeded(const nsACString& aFilename, -- int64_t aCurrentSizeLimit, -- int64_t aCurrentTotalSize, -- nsISupports* aUserData, -- int64_t* _retval) -- { -- if (IndexedDatabaseManager::QuotaIsLifted()) { -- *_retval = 0; -- return NS_OK; -- } -- -- return NS_ERROR_FAILURE; -- } --}; -- --NS_IMPL_THREADSAFE_ISUPPORTS1(QuotaCallback, mozIStorageQuotaCallback) -- - // Adds all databases in the hash to the given array. - template - PLDHashOperator -@@ -440,8 +420,8 @@ IndexedDatabaseManager::GetOrCreate() - NS_LITERAL_CSTRING("IndexedDB I/O"), - LazyIdleThread::ManualShutdown); - -- // We need one quota callback object to hand to SQLite. -- instance->mQuotaCallbackSingleton = new QuotaCallback(); -+ // Make sure that the quota manager is up. -+ NS_ENSURE_TRUE(QuotaManager::GetOrCreate(), nullptr); - - // Make a timer here to avoid potential failures later. We don't actually - // initialize the timer until shutdown. -@@ -996,37 +976,15 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin, - return NS_OK; - } - -- // First figure out the filename pattern we'll use. -- nsCOMPtr patternFile; -- rv = directory->Clone(getter_AddRefs(patternFile)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- rv = patternFile->Append(NS_LITERAL_STRING("*")); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsString pattern; -- rv = patternFile->GetPath(pattern); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // Now tell SQLite to start tracking this pattern for content. -- nsCOMPtr ss = -- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID); -- NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE); -- -- if (aPrivilege != Chrome) { -- rv = ss->SetQuotaForFilenamePattern(NS_ConvertUTF16toUTF8(pattern), -- GetIndexedDBQuotaMB() * 1024 * 1024, -- mQuotaCallbackSingleton, nullptr); -- NS_ENSURE_SUCCESS(rv, rv); -- } -- - // We need to see if there are any files in the directory already. If they - // are database files then we need to cleanup stored files (if it's needed) -- // and also tell SQLite about all of them. -+ // and also initialize the quota. - - nsAutoTArray subdirsToProcess; - nsAutoTArray , 20> unknownFiles; - -+ uint64_t usage = 0; -+ - nsTHashtable validSubdirs; - validSubdirs.Init(20); - -@@ -1068,20 +1026,28 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin, - continue; - } - -- nsCOMPtr fileManagerDirectory; -- rv = directory->Clone(getter_AddRefs(fileManagerDirectory)); -+ nsCOMPtr fmDirectory; -+ rv = directory->Clone(getter_AddRefs(fmDirectory)); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = fileManagerDirectory->Append(dbBaseFilename); -+ rv = fmDirectory->Append(dbBaseFilename); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = FileManager::InitDirectory(ss, fileManagerDirectory, file, -- aPrivilege); -+ rv = FileManager::InitDirectory(fmDirectory, file, aOrigin); - NS_ENSURE_SUCCESS(rv, rv); - - if (aPrivilege != Chrome) { -- rv = ss->UpdateQuotaInformationForFile(file); -+ uint64_t fileUsage; -+ rv = FileManager::GetUsage(fmDirectory, &fileUsage); - NS_ENSURE_SUCCESS(rv, rv); -+ -+ IncrementUsage(&usage, fileUsage); -+ -+ int64_t fileSize; -+ rv = file->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ IncrementUsage(&usage, uint64_t(fileSize)); - } - - validSubdirs.PutEntry(dbBaseFilename); -@@ -1117,12 +1083,39 @@ IndexedDatabaseManager::EnsureOriginIsInitialized(const nsACString& aOrigin, - } - } - -+ if (aPrivilege != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->InitQuotaForOrigin(aOrigin, GetIndexedDBQuotaMB(), usage); -+ } -+ - mInitializedOrigins.AppendElement(aOrigin); - - NS_ADDREF(*aDirectory = directory); - return NS_OK; - } - -+void -+IndexedDatabaseManager::UninitializeOriginsByPattern( -+ const nsACString& aPattern) -+{ -+#ifdef DEBUG -+ { -+ bool correctThread; -+ NS_ASSERTION(NS_SUCCEEDED(mIOThread->IsOnCurrentThread(&correctThread)) && -+ correctThread, -+ "Running on the wrong thread!"); -+ } -+#endif -+ -+ for (int32_t i = mInitializedOrigins.Length() - 1; i >= 0; i--) { -+ if (PatternMatchesOrigin(aPattern, mInitializedOrigins[i])) { -+ mInitializedOrigins.RemoveElementAt(i); -+ } -+ } -+} -+ - bool - IndexedDatabaseManager::QuotaIsLiftedInternal() - { -@@ -1250,16 +1243,14 @@ IndexedDatabaseManager::GetFileManager(const nsACString& aOrigin, - } - - void --IndexedDatabaseManager::AddFileManager(const nsACString& aOrigin, -- const nsAString& aDatabaseName, -- FileManager* aFileManager) -+IndexedDatabaseManager::AddFileManager(FileManager* aFileManager) - { - NS_ASSERTION(aFileManager, "Null file manager!"); - - nsTArray >* array; -- if (!mFileManagers.Get(aOrigin, &array)) { -+ if (!mFileManagers.Get(aFileManager->Origin(), &array)) { - array = new nsTArray >(); -- mFileManagers.Put(aOrigin, array); -+ mFileManagers.Put(aFileManager->Origin(), array); - } - - array->AppendElement(aFileManager); -@@ -1783,6 +1774,13 @@ OriginClearRunnable::DeleteFiles(IndexedDatabaseManager* aManager) - // correctly... - NS_ERROR("Failed to remove directory!"); - } -+ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->RemoveQuotaForPattern(mOriginOrPattern); -+ -+ aManager->UninitializeOriginsByPattern(mOriginOrPattern); - } - } - -@@ -1880,19 +1878,6 @@ IndexedDatabaseManager::AsyncUsageRunnable::Cancel() - } - } - --inline void --IncrementUsage(uint64_t* aUsage, uint64_t aDelta) --{ -- // Watch for overflow! -- if ((INT64_MAX - *aUsage) <= aDelta) { -- NS_WARNING("Database sizes exceed max we can report!"); -- *aUsage = INT64_MAX; -- } -- else { -- *aUsage += aDelta; -- } --} -- - nsresult - IndexedDatabaseManager::AsyncUsageRunnable::TakeShortcut() - { -@@ -2295,25 +2280,22 @@ IndexedDatabaseManager::AsyncDeleteFileRunnable::Run() - nsCOMPtr file = mFileManager->GetFileForId(directory, mFileId); - NS_ENSURE_TRUE(file, NS_ERROR_FAILURE); - -- nsString filePath; -- nsresult rv = file->GetPath(filePath); -- NS_ENSURE_SUCCESS(rv, rv); -+ nsresult rv; -+ int64_t fileSize; - -- int rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(filePath).get()); -- if (rc != SQLITE_OK) { -- NS_WARNING("Failed to delete stored file!"); -- return NS_ERROR_FAILURE; -+ if (mFileManager->Privilege() != Chrome) { -+ rv = file->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); - } - -- // sqlite3_quota_remove won't actually remove anything if we're not tracking -- // the quota here. Manually remove the file if it exists. -- bool exists; -- rv = file->Exists(&exists); -- NS_ENSURE_SUCCESS(rv, rv); -+ rv = file->Remove(false); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); - -- if (exists) { -- rv = file->Remove(false); -- NS_ENSURE_SUCCESS(rv, rv); -+ if (mFileManager->Privilege() != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->DecreaseUsageForOrigin(mFileManager->Origin(), fileSize); - } - - directory = mFileManager->GetJournalDirectory(); -diff --git dom/indexedDB/IndexedDatabaseManager.h dom/indexedDB/IndexedDatabaseManager.h -index f9fbbf2..1ea5425 100644 ---- mozilla/dom/indexedDB/IndexedDatabaseManager.h -+++ mozilla/dom/indexedDB/IndexedDatabaseManager.h -@@ -23,7 +23,6 @@ - - #define INDEXEDDB_MANAGER_CONTRACTID "@mozilla.org/dom/indexeddb/manager;1" - --class mozIStorageQuotaCallback; - class nsIAtom; - class nsIFile; - class nsITimer; -@@ -134,6 +133,8 @@ public: - FactoryPrivilege aPrivilege, - nsIFile** aDirectory); - -+ void UninitializeOriginsByPattern(const nsACString& aPattern); -+ - // Determine if the quota is lifted for the Window the current thread is - // using. - static inline bool -@@ -172,9 +173,7 @@ public: - const nsAString& aDatabaseName); - - void -- AddFileManager(const nsACString& aOrigin, -- const nsAString& aDatabaseName, -- FileManager* aFileManager); -+ AddFileManager(FileManager* aFileManager); - - void InvalidateFileManagersForPattern(const nsACString& aPattern); - -@@ -502,10 +501,6 @@ private: - // A timer that gets activated at shutdown to ensure we close all databases. - nsCOMPtr mShutdownTimer; - -- // A single threadsafe instance of our quota callback. Created on the main -- // thread during GetOrCreate(). -- nsCOMPtr mQuotaCallbackSingleton; -- - // A list of all successfully initialized origins. This list isn't protected - // by any mutex but it is only ever touched on the IO thread. - nsTArray mInitializedOrigins; -diff --git dom/indexedDB/Makefile.in dom/indexedDB/Makefile.in -index fef0858..09d4853 100644 ---- mozilla/dom/indexedDB/Makefile.in -+++ mozilla/dom/indexedDB/Makefile.in -@@ -25,7 +25,6 @@ CPPSRCS = \ - DatabaseInfo.cpp \ - FileInfo.cpp \ - FileManager.cpp \ -- FileStream.cpp \ - IDBCursor.cpp \ - IDBDatabase.cpp \ - IDBEvents.cpp \ -@@ -93,7 +92,6 @@ XPIDLSRCS = \ - nsIIDBVersionChangeEvent.idl \ - nsIIDBOpenDBRequest.idl \ - nsIIndexedDatabaseManager.idl \ -- nsIStandardFileStream.idl \ - $(NULL) - - DIRS += ipc -diff --git dom/indexedDB/OpenDatabaseHelper.cpp dom/indexedDB/OpenDatabaseHelper.cpp -index e71cad4..4cd7f61 100644 ---- mozilla/dom/indexedDB/OpenDatabaseHelper.cpp -+++ mozilla/dom/indexedDB/OpenDatabaseHelper.cpp -@@ -8,11 +8,12 @@ - - #include "nsIFile.h" - -+#include "mozilla/dom/quota/QuotaManager.h" - #include "mozilla/storage.h" - #include "nsEscape.h" -+#include "nsNetUtil.h" - #include "nsThreadUtils.h" - #include "snappy/snappy.h" --#include "test_quota.h" - - #include "nsIBFCacheEntry.h" - #include "IDBEvents.h" -@@ -21,6 +22,7 @@ - - using namespace mozilla; - USING_INDEXEDDB_NAMESPACE -+USING_QUOTA_NAMESPACE - - namespace { - -@@ -1632,15 +1634,15 @@ OpenDatabaseHelper::DoDatabaseWork() - rv = dbFile->GetPath(mDatabaseFilePath); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- nsCOMPtr fileManagerDirectory; -- rv = dbDirectory->Clone(getter_AddRefs(fileManagerDirectory)); -+ nsCOMPtr fmDirectory; -+ rv = dbDirectory->Clone(getter_AddRefs(fmDirectory)); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = fileManagerDirectory->Append(filename); -+ rv = fmDirectory->Append(filename); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - - nsCOMPtr connection; -- rv = CreateDatabaseConnection(mName, dbFile, fileManagerDirectory, -+ rv = CreateDatabaseConnection(dbFile, fmDirectory, mName, mASCIIOrigin, - getter_AddRefs(connection)); - if (NS_FAILED(rv) && - NS_ERROR_GET_MODULE(rv) != NS_ERROR_MODULE_DOM_INDEXEDDB) { -@@ -1691,12 +1693,12 @@ OpenDatabaseHelper::DoDatabaseWork() - - nsRefPtr fileManager = mgr->GetFileManager(mASCIIOrigin, mName); - if (!fileManager) { -- fileManager = new FileManager(mASCIIOrigin, mName); -+ fileManager = new FileManager(mASCIIOrigin, mPrivilege, mName); - -- rv = fileManager->Init(fileManagerDirectory, connection); -+ rv = fileManager->Init(fmDirectory, connection); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- mgr->AddFileManager(mASCIIOrigin, mName, fileManager); -+ mgr->AddFileManager(fileManager); - } - - mFileManager = fileManager.forget(); -@@ -1707,23 +1709,26 @@ OpenDatabaseHelper::DoDatabaseWork() - // static - nsresult - OpenDatabaseHelper::CreateDatabaseConnection( -- const nsAString& aName, - nsIFile* aDBFile, -- nsIFile* aFileManagerDirectory, -+ nsIFile* aFMDirectory, -+ const nsAString& aName, -+ const nsACString& aOrigin, - mozIStorageConnection** aConnection) - { - NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!"); - NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!"); - -- NS_NAMED_LITERAL_CSTRING(quotaVFSName, "quota"); -+ nsCOMPtr dbFileUrl = -+ IDBFactory::GetDatabaseFileURL(aDBFile, aOrigin); -+ NS_ENSURE_TRUE(dbFileUrl, NS_ERROR_FAILURE); - -- nsCOMPtr ss = -+ nsCOMPtr ss = - do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID); - NS_ENSURE_TRUE(ss, NS_ERROR_FAILURE); - - nsCOMPtr connection; -- nsresult rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName, -- getter_AddRefs(connection)); -+ nsresult rv = -+ ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection)); - if (rv == NS_ERROR_FILE_CORRUPTED) { - // If we're just opening the database during origin initialization, then - // we don't want to erase any files. The failure here will fail origin -@@ -1737,21 +1742,20 @@ OpenDatabaseHelper::CreateDatabaseConnection( - NS_ENSURE_SUCCESS(rv, rv); - - bool exists; -- rv = aFileManagerDirectory->Exists(&exists); -+ rv = aFMDirectory->Exists(&exists); - NS_ENSURE_SUCCESS(rv, rv); - - if (exists) { - bool isDirectory; -- rv = aFileManagerDirectory->IsDirectory(&isDirectory); -+ rv = aFMDirectory->IsDirectory(&isDirectory); - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = aFileManagerDirectory->Remove(true); -+ rv = aFMDirectory->Remove(true); - NS_ENSURE_SUCCESS(rv, rv); - } - -- rv = ss->OpenDatabaseWithVFS(aDBFile, quotaVFSName, -- getter_AddRefs(connection)); -+ rv = ss->OpenDatabaseWithFileURL(dbFileUrl, getter_AddRefs(connection)); - } - NS_ENSURE_SUCCESS(rv, rv); - -@@ -2347,6 +2351,8 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection) - { - NS_ASSERTION(!aConnection, "How did we get a connection here?"); - -+ const FactoryPrivilege& privilege = mOpenHelper->Privilege(); -+ - IndexedDatabaseManager* mgr = IndexedDatabaseManager::Get(); - NS_ASSERTION(mgr, "This should never fail!"); - -@@ -2372,59 +2378,57 @@ DeleteDatabaseHelper::DoDatabaseWork(mozIStorageConnection* aConnection) - rv = dbFile->Exists(&exists); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- int rc; -- - if (exists) { -- nsString dbFilePath; -- rv = dbFile->GetPath(dbFilePath); -- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ int64_t fileSize; - -- rc = sqlite3_quota_remove(NS_ConvertUTF16toUTF8(dbFilePath).get()); -- if (rc != SQLITE_OK) { -- NS_WARNING("Failed to delete db file!"); -- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; -+ if (privilege != Chrome) { -+ rv = dbFile->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - } - -- // sqlite3_quota_remove won't actually remove anything if we're not tracking -- // the quota here. Manually remove the file if it exists. -- rv = dbFile->Exists(&exists); -+ rv = dbFile->Remove(false); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- if (exists) { -- rv = dbFile->Remove(false); -- NS_ENSURE_SUCCESS(rv, rv); -+ if (privilege != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, fileSize); - } - } - -- nsCOMPtr fileManagerDirectory; -- rv = directory->Clone(getter_AddRefs(fileManagerDirectory)); -- NS_ENSURE_SUCCESS(rv, rv); -+ nsCOMPtr fmDirectory; -+ rv = directory->Clone(getter_AddRefs(fmDirectory)); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = fileManagerDirectory->Append(filename); -+ rv = fmDirectory->Append(filename); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- rv = fileManagerDirectory->Exists(&exists); -+ rv = fmDirectory->Exists(&exists); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - - if (exists) { - bool isDirectory; -- rv = fileManagerDirectory->IsDirectory(&isDirectory); -+ rv = fmDirectory->IsDirectory(&isDirectory); - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(isDirectory, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - -- nsString fileManagerDirectoryPath; -- rv = fileManagerDirectory->GetPath(fileManagerDirectoryPath); -- NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ uint64_t usage = 0; - -- rc = sqlite3_quota_remove( -- NS_ConvertUTF16toUTF8(fileManagerDirectoryPath).get()); -- if (rc != SQLITE_OK) { -- NS_WARNING("Failed to delete file directory!"); -- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; -+ if (privilege != Chrome) { -+ rv = FileManager::GetUsage(fmDirectory, &usage); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); - } - -- rv = fileManagerDirectory->Remove(true); -- NS_ENSURE_SUCCESS(rv, rv); -+ rv = fmDirectory->Remove(true); -+ NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR); -+ -+ if (privilege != Chrome) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->DecreaseUsageForOrigin(mASCIIOrigin, usage); -+ } - } - - return NS_OK; -diff --git dom/indexedDB/OpenDatabaseHelper.h dom/indexedDB/OpenDatabaseHelper.h -index 587301b..5a3d987 100644 ---- mozilla/dom/indexedDB/OpenDatabaseHelper.h -+++ mozilla/dom/indexedDB/OpenDatabaseHelper.h -@@ -77,10 +77,16 @@ public: - return mDatabase; - } - -+ const FactoryPrivilege& Privilege() const -+ { -+ return mPrivilege; -+ } -+ - static -- nsresult CreateDatabaseConnection(const nsAString& aName, -- nsIFile* aDBFile, -- nsIFile* aFileManagerDirectory, -+ nsresult CreateDatabaseConnection(nsIFile* aDBFile, -+ nsIFile* aFMDirectory, -+ const nsAString& aName, -+ const nsACString& aOrigin, - mozIStorageConnection** aConnection); - - protected: -diff --git dom/indexedDB/nsIStandardFileStream.idl dom/indexedDB/nsIStandardFileStream.idl -deleted file mode 100644 -index 265c3ed..0000000 ---- mozilla/dom/indexedDB/nsIStandardFileStream.idl -+++ /dev/null -@@ -1,60 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this file, -- * You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#include "nsISupports.idl" -- --interface nsIFile; -- --/** -- * A stream that allows you to read from a file or stream to a file -- * using standard file APIs. -- */ --[scriptable, uuid(ebbbb779-92a3-4b2a-b7cf-6efbe904c453)] --interface nsIStandardFileStream : nsISupports --{ -- /** -- * If this is set, the file will be opened (i.e., a call to -- * fopen done) only when we do an actual operation on the stream, -- * or more specifically, when one of the following is called: -- * - Seek -- * - Tell -- * - SetEOF -- * - Available -- * - Read -- * - Write -- * - Flush -- * - GetSize -- * - GetLastModified -- * - Sync -- * -- * FLAGS_DEFER_OPEN is useful if we use the stream on a background -- * thread, so that the opening and possible |stat|ing of the file -- * happens there as well. -- * -- * @note Using this flag results in the file not being opened -- * during the call to Init. This means that any errors that might -- * happen when this flag is not set would happen during the -- * first read. Also, the file is not locked when Init is called, -- * so it might be deleted before we try to read from it. -- */ -- const long FLAGS_DEFER_OPEN = 1 << 0; -- -- /** -- * @param file file to read from or stream to -- * @param mode file open mode (see fopen documentation) -- * @param flags flags specifying various behaviors of the class -- * (see enumerations in the class) -- */ -- void init(in nsIFile file, -- in AString mode, -- in long flags); -- -- /** -- * Flush all written content held in memory buffers out to disk. -- * This is the equivalent of fflush() -- */ -- void flushBuffers(); --}; -diff --git dom/indexedDB/test/Makefile.in dom/indexedDB/test/Makefile.in -index 9c79b14..4c9a201 100644 ---- mozilla/dom/indexedDB/test/Makefile.in -+++ mozilla/dom/indexedDB/test/Makefile.in -@@ -54,11 +54,13 @@ MOCHITEST_FILES = \ - test_file_os_delete.html \ - test_file_put_get_object.html \ - test_file_put_get_values.html \ -+ test_file_quota.html \ - test_file_replace.html \ - test_file_resurrection_delete.html \ - test_file_resurrection_transaction_abort.html \ - test_file_sharing.html \ - test_file_transaction_abort.html \ -+ test_filehandle_quota.html \ - test_filehandle_serialization.html \ - test_filehandle_store_snapshot.html \ - test_getAll.html \ -diff --git dom/indexedDB/test/file.js dom/indexedDB/test/file.js -index 07bd10a..3c6194a 100644 ---- mozilla/dom/indexedDB/test/file.js -+++ mozilla/dom/indexedDB/test/file.js -@@ -3,6 +3,8 @@ - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -+const DEFAULT_QUOTA = 50 * 1024 * 1024; -+ - var bufferCache = []; - var utils = SpecialPowers.getDOMWindowUtils(window); - -@@ -184,25 +186,6 @@ function getUsage(usageHandler) - idbManager.getUsageForURI(uri, callback); - } - --function getUsageSync() --{ -- let usage; -- -- getUsage(function(aUsage, aFileUsage) { -- usage = aUsage; -- }); -- -- let comp = SpecialPowers.wrap(Components); -- let thread = comp.classes["@mozilla.org/thread-manager;1"] -- .getService(comp.interfaces.nsIThreadManager) -- .currentThread; -- while (!usage) { -- thread.processNextEvent(true); -- } -- -- return usage; --} -- - function scheduleGC() - { - SpecialPowers.exactGC(window, continueToNextStep); -diff --git dom/indexedDB/test/test_file_quota.html dom/indexedDB/test/test_file_quota.html -index b07880d..9fbc0c0 100644 ---- mozilla/dom/indexedDB/test/test_file_quota.html -+++ mozilla/dom/indexedDB/test/test_file_quota.html -@@ -13,14 +13,12 @@ - function testSteps() - { - const READ_WRITE = IDBTransaction.READ_WRITE; -- const DEFAULT_QUOTA_MB = 50; - - const name = window.location.pathname; - - const objectStoreName = "Blobs"; - -- const testData = { key: 0, value: {} }; -- const fileData = { key: 1, file: null }; -+ const fileData = { key: 1, file: getNullFile("random.bin", DEFAULT_QUOTA) }; - - let request = indexedDB.open(name, 1); - request.onerror = errorHandler; -@@ -32,21 +30,17 @@ - - let db = event.target.result; - -- let objectStore = db.createObjectStore(objectStoreName, { }); -- objectStore.add(testData.value, testData.key); -- -- let size = (DEFAULT_QUOTA_MB + 1) * 1024 * 1024 - getUsageSync(); -- fileData.file = getNullFile("random.bin", size); -+ db.createObjectStore(objectStoreName, { }); - - event = yield; - - is(event.type, "success", "Got correct event type"); - - trans = db.transaction([objectStoreName], READ_WRITE); -- objectStore = trans.objectStore(objectStoreName); -+ let objectStore = trans.objectStore(objectStoreName); - - request = objectStore.add(fileData.file, fileData.key); -- request.addEventListener("error", new ExpectError("UnknownError")); -+ request.addEventListener("error", new ExpectError("UnknownError", true)); - request.onsuccess = unexpectedSuccessHandler; - event = yield; - -diff --git dom/indexedDB/test/test_filehandle_quota.html dom/indexedDB/test/test_filehandle_quota.html -index addaf01..0506279 100644 ---- mozilla/dom/indexedDB/test/test_filehandle_quota.html -+++ mozilla/dom/indexedDB/test/test_filehandle_quota.html -@@ -13,7 +13,6 @@ - function testSteps() - { - const READ_WRITE = IDBTransaction.READ_WRITE; -- const DEFAULT_QUOTA_MB = 50; - - const name = window.location.pathname; - -@@ -39,10 +38,10 @@ - - let lockedFile = fileHandle.open("readwrite"); - -- let blob = getNullBlob((50 + 1) * 1024 * 1024 - getUsageSync()); -+ let blob = getNullBlob(DEFAULT_QUOTA); - - request = lockedFile.write(blob); -- request.addEventListener("error", new ExpectError("UnknownError")); -+ request.addEventListener("error", new ExpectError("UnknownError", true)); - request.onsuccess = unexpectedSuccessHandler; - event = yield; - -diff --git dom/quota/FileStreams.cpp dom/quota/FileStreams.cpp -new file mode 100644 -index 0000000..9de244f ---- /dev/null -+++ mozilla/dom/quota/FileStreams.cpp -@@ -0,0 +1,123 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "FileStreams.h" -+ -+USING_QUOTA_NAMESPACE -+ -+template -+NS_IMETHODIMP -+FileQuotaStream::SetEOF() -+{ -+ nsresult rv = FileStreamBase::SetEOF(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (mQuotaObject) { -+ int64_t offset; -+ nsresult rv = FileStreamBase::Tell(&offset); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mQuotaObject->UpdateSize(offset); -+ } -+ -+ return NS_OK; -+} -+ -+template -+NS_IMETHODIMP -+FileQuotaStream::Close() -+{ -+ nsresult rv = FileStreamBase::Close(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mQuotaObject = nullptr; -+ -+ return NS_OK; -+} -+ -+template -+nsresult -+FileQuotaStream::DoOpen() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ NS_ASSERTION(!mQuotaObject, "Creating quota object more than once?"); -+ mQuotaObject = quotaManager->GetQuotaObject(mOrigin, -+ FileStreamBase::mOpenParams.localFile); -+ -+ nsresult rv = FileStreamBase::DoOpen(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (mQuotaObject && (FileStreamBase::mOpenParams.ioFlags & PR_TRUNCATE)) { -+ mQuotaObject->UpdateSize(0); -+ } -+ -+ return NS_OK; -+} -+ -+template -+NS_IMETHODIMP -+FileQuotaStreamWithWrite::Write(const char* aBuf, -+ uint32_t aCount, -+ uint32_t* _retval) -+{ -+ nsresult rv; -+ -+ if (FileQuotaStreamWithWrite::mQuotaObject) { -+ int64_t offset; -+ rv = FileStreamBase::Tell(&offset); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!FileQuotaStreamWithWrite:: -+ mQuotaObject->MaybeAllocateMoreSpace(offset, aCount)) { -+ return NS_ERROR_FAILURE; -+ } -+ } -+ -+ rv = FileStreamBase::Write(aBuf, aCount, _retval); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ return NS_OK; -+} -+ -+NS_IMPL_ISUPPORTS_INHERITED0(FileInputStream, nsFileInputStream) -+ -+already_AddRefed -+FileInputStream::Create(const nsACString& aOrigin, nsIFile* aFile, -+ int32_t aIOFlags, int32_t aPerm, -+ int32_t aBehaviorFlags) -+{ -+ nsRefPtr stream = new FileInputStream(aOrigin); -+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ return stream.forget(); -+} -+ -+NS_IMPL_ISUPPORTS_INHERITED0(FileOutputStream, nsFileOutputStream) -+ -+already_AddRefed -+FileOutputStream::Create(const nsACString& aOrigin, nsIFile* aFile, -+ int32_t aIOFlags, int32_t aPerm, -+ int32_t aBehaviorFlags) -+{ -+ nsRefPtr stream = new FileOutputStream(aOrigin); -+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ return stream.forget(); -+} -+ -+NS_IMPL_ISUPPORTS_INHERITED0(FileStream, nsFileStream) -+ -+already_AddRefed -+FileStream::Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags, -+ int32_t aPerm, int32_t aBehaviorFlags) -+{ -+ nsRefPtr stream = new FileStream(aOrigin); -+ nsresult rv = stream->Init(aFile, aIOFlags, aPerm, aBehaviorFlags); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ return stream.forget(); -+} -diff --git dom/quota/FileStreams.h dom/quota/FileStreams.h -new file mode 100644 -index 0000000..77bfad4 ---- /dev/null -+++ mozilla/dom/quota/FileStreams.h -@@ -0,0 +1,115 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_dom_quota_filestreams_h__ -+#define mozilla_dom_quota_filestreams_h__ -+ -+#include "QuotaCommon.h" -+ -+#include "nsFileStreams.h" -+ -+#include "QuotaManager.h" -+ -+BEGIN_QUOTA_NAMESPACE -+ -+template -+class FileQuotaStream : public FileStreamBase -+{ -+public: -+ // nsFileStreamBase override -+ NS_IMETHOD -+ SetEOF() MOZ_OVERRIDE; -+ -+ NS_IMETHOD -+ Close() MOZ_OVERRIDE; -+ -+protected: -+ FileQuotaStream(const nsACString& aOrigin) -+ : mOrigin(aOrigin) -+ { } -+ -+ // nsFileStreamBase override -+ virtual nsresult -+ DoOpen() MOZ_OVERRIDE; -+ -+ nsCString mOrigin; -+ nsRefPtr mQuotaObject; -+}; -+ -+template -+class FileQuotaStreamWithWrite : public FileQuotaStream -+{ -+public: -+ // nsFileStreamBase override -+ NS_IMETHOD -+ Write(const char* aBuf, uint32_t aCount, uint32_t* _retval) MOZ_OVERRIDE; -+ -+protected: -+ FileQuotaStreamWithWrite(const nsACString& aOrigin) -+ : FileQuotaStream(aOrigin) -+ { } -+}; -+ -+class FileInputStream : public FileQuotaStream -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ -+ static already_AddRefed -+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1, -+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0); -+ -+private: -+ FileInputStream(const nsACString& aOrigin) -+ : FileQuotaStream(aOrigin) -+ { } -+ -+ virtual ~FileInputStream() { -+ Close(); -+ } -+}; -+ -+class FileOutputStream : public FileQuotaStreamWithWrite -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ -+ static already_AddRefed -+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1, -+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0); -+ -+private: -+ FileOutputStream(const nsACString& aOrigin) -+ : FileQuotaStreamWithWrite(aOrigin) -+ { } -+ -+ virtual ~FileOutputStream() { -+ Close(); -+ } -+}; -+ -+class FileStream : public FileQuotaStreamWithWrite -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ -+ static already_AddRefed -+ Create(const nsACString& aOrigin, nsIFile* aFile, int32_t aIOFlags = -1, -+ int32_t aPerm = -1, int32_t aBehaviorFlags = 0); -+ -+private: -+ FileStream(const nsACString& aOrigin) -+ : FileQuotaStreamWithWrite(aOrigin) -+ { } -+ -+ virtual ~FileStream() { -+ Close(); -+ } -+}; -+ -+END_QUOTA_NAMESPACE -+ -+#endif /* mozilla_dom_quota_filestreams_h__ */ -diff --git dom/quota/Makefile.in dom/quota/Makefile.in -new file mode 100644 -index 0000000..49be551 ---- /dev/null -+++ mozilla/dom/quota/Makefile.in -@@ -0,0 +1,33 @@ -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this file, -+# You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+DEPTH = ../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = dom -+LIBRARY_NAME = domquota_s -+XPIDL_MODULE = dom_quota -+LIBXUL_LIBRARY = 1 -+FORCE_STATIC_LIB = 1 -+ -+include $(topsrcdir)/dom/dom-config.mk -+ -+EXPORTS_NAMESPACES = mozilla/dom/quota -+ -+CPPSRCS = \ -+ FileStreams.cpp \ -+ QuotaManager.cpp \ -+ $(NULL) -+ -+EXPORTS_mozilla/dom/quota = \ -+ FileStreams.h \ -+ QuotaCommon.h \ -+ QuotaManager.h \ -+ $(NULL) -+ -+include $(topsrcdir)/config/rules.mk -diff --git dom/quota/QuotaCommon.h dom/quota/QuotaCommon.h -new file mode 100644 -index 0000000..a415d17 ---- /dev/null -+++ mozilla/dom/quota/QuotaCommon.h -@@ -0,0 +1,23 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_dom_quota_quotacommon_h__ -+#define mozilla_dom_quota_quotacommon_h__ -+ -+#include "nsAutoPtr.h" -+#include "nsCOMPtr.h" -+#include "nsDebug.h" -+#include "nsStringGlue.h" -+#include "nsTArray.h" -+ -+#define BEGIN_QUOTA_NAMESPACE \ -+ namespace mozilla { namespace dom { namespace quota { -+#define END_QUOTA_NAMESPACE \ -+ } /* namespace quota */ } /* namespace dom */ } /* namespace mozilla */ -+#define USING_QUOTA_NAMESPACE \ -+ using namespace mozilla::dom::quota; -+ -+#endif // mozilla_dom_quota_quotacommon_h__ -diff --git dom/quota/QuotaManager.cpp dom/quota/QuotaManager.cpp -new file mode 100644 -index 0000000..b251606 ---- /dev/null -+++ mozilla/dom/quota/QuotaManager.cpp -@@ -0,0 +1,294 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "QuotaManager.h" -+ -+#include "nsIFile.h" -+ -+#include "mozilla/ClearOnShutdown.h" -+#include "nsComponentManagerUtils.h" -+ -+#include "mozilla/dom/indexedDB/IndexedDatabaseManager.h" -+ -+USING_QUOTA_NAMESPACE -+ -+namespace { -+ -+nsAutoPtr gInstance; -+ -+PLDHashOperator -+RemoveQuotaForPatternCallback(const nsACString& aKey, -+ nsRefPtr& aValue, -+ void* aUserArg) -+{ -+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!"); -+ NS_ASSERTION(aValue, "Null pointer!"); -+ NS_ASSERTION(aUserArg, "Null pointer!"); -+ -+ const nsACString* pattern = -+ static_cast(aUserArg); -+ -+ if (StringBeginsWith(aKey, *pattern)) { -+ return PL_DHASH_REMOVE; -+ } -+ -+ return PL_DHASH_NEXT; -+} -+ -+} // anonymous namespace -+ -+void -+QuotaObject::AddRef() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ if (!quotaManager) { -+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!"); -+ -+ NS_AtomicIncrementRefcnt(mRefCnt); -+ -+ return; -+ } -+ -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ ++mRefCnt; -+} -+ -+void -+QuotaObject::Release() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ if (!quotaManager) { -+ NS_ERROR("Null quota manager, this shouldn't happen, possible leak!"); -+ -+ nsrefcnt count = NS_AtomicDecrementRefcnt(mRefCnt); -+ if (count == 0) { -+ mRefCnt = 1; -+ delete this; -+ } -+ -+ return; -+ } -+ -+ { -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ --mRefCnt; -+ -+ if (mRefCnt > 0) { -+ return; -+ } -+ -+ if (mOriginInfo) { -+ mOriginInfo->mQuotaObjects.Remove(mPath); -+ } -+ } -+ -+ delete this; -+} -+ -+void -+QuotaObject::UpdateSize(int64_t aSize) -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ if (mOriginInfo) { -+ mOriginInfo->mUsage -= mSize; -+ mSize = aSize; -+ mOriginInfo->mUsage += mSize; -+ } -+} -+ -+bool -+QuotaObject::MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount) -+{ -+ int64_t end = aOffset + aCount; -+ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ MutexAutoLock lock(quotaManager->mQuotaMutex); -+ -+ if (mSize >= end || !mOriginInfo) { -+ return true; -+ } -+ -+ int64_t newUsage = mOriginInfo->mUsage - mSize + end; -+ if (newUsage > mOriginInfo->mLimit) { -+ if (!indexedDB::IndexedDatabaseManager::QuotaIsLifted()) { -+ return false; -+ } -+ -+ nsCString origin = mOriginInfo->mOrigin; -+ -+ mOriginInfo->LockedClearOriginInfos(); -+ NS_ASSERTION(!mOriginInfo, -+ "Should have cleared in LockedClearOriginInfos!"); -+ -+ quotaManager->mOriginInfos.Remove(origin); -+ -+ mSize = end; -+ -+ return true; -+ } -+ -+ mOriginInfo->mUsage = newUsage; -+ mSize = end; -+ -+ return true; -+} -+ -+#ifdef DEBUG -+void -+OriginInfo::LockedClearOriginInfos() -+{ -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ NS_ASSERTION(quotaManager, "Shouldn't be null!"); -+ -+ quotaManager->mQuotaMutex.AssertCurrentThreadOwns(); -+ -+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr); -+} -+#endif -+ -+// static -+PLDHashOperator -+OriginInfo::ClearOriginInfoCallback(const nsAString& aKey, -+ QuotaObject* aValue, -+ void* aUserArg) -+{ -+ NS_ASSERTION(!aKey.IsEmpty(), "Empty key!"); -+ NS_ASSERTION(aValue, "Null pointer!"); -+ -+ aValue->mOriginInfo = nullptr; -+ -+ return PL_DHASH_NEXT; -+} -+ -+// static -+QuotaManager* -+QuotaManager::GetOrCreate() -+{ -+ if (!gInstance) { -+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); -+ -+ gInstance = new QuotaManager(); -+ -+ ClearOnShutdown(&gInstance); -+ } -+ -+ return gInstance; -+} -+ -+// static -+QuotaManager* -+QuotaManager::Get() -+{ -+ // Does not return an owning reference. -+ return gInstance; -+} -+ -+void -+QuotaManager::InitQuotaForOrigin(const nsACString& aOrigin, -+ int64_t aLimit, -+ int64_t aUsage) -+{ -+ OriginInfo* info = new OriginInfo(aOrigin, aLimit * 1024 * 1024, aUsage); -+ -+ MutexAutoLock lock(mQuotaMutex); -+ -+ NS_ASSERTION(!mOriginInfos.GetWeak(aOrigin), "Replacing an existing entry!"); -+ mOriginInfos.Put(aOrigin, info); -+} -+ -+void -+QuotaManager::DecreaseUsageForOrigin(const nsACString& aOrigin, -+ int64_t aSize) -+{ -+ MutexAutoLock lock(mQuotaMutex); -+ -+ nsRefPtr originInfo; -+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo)); -+ -+ if (originInfo) { -+ originInfo->mUsage -= aSize; -+ } -+} -+ -+void -+QuotaManager::RemoveQuotaForPattern(const nsACString& aPattern) -+{ -+ NS_ASSERTION(!aPattern.IsEmpty(), "Empty pattern!"); -+ -+ MutexAutoLock lock(mQuotaMutex); -+ -+ mOriginInfos.Enumerate(RemoveQuotaForPatternCallback, -+ const_cast(&aPattern)); -+} -+ -+already_AddRefed -+QuotaManager::GetQuotaObject(const nsACString& aOrigin, -+ nsIFile* aFile) -+{ -+ NS_ASSERTION(!NS_IsMainThread(), "Wrong thread!"); -+ -+ nsString path; -+ nsresult rv = aFile->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ int64_t fileSize; -+ -+ bool exists; -+ rv = aFile->Exists(&exists); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ if (exists) { -+ rv = aFile->GetFileSize(&fileSize); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ } -+ else { -+ fileSize = 0; -+ } -+ -+ QuotaObject* info = nullptr; -+ { -+ MutexAutoLock lock(mQuotaMutex); -+ -+ nsRefPtr originInfo; -+ mOriginInfos.Get(aOrigin, getter_AddRefs(originInfo)); -+ -+ if (!originInfo) { -+ return nullptr; -+ } -+ -+ originInfo->mQuotaObjects.Get(path, &info); -+ -+ if (!info) { -+ info = new QuotaObject(originInfo, path, fileSize); -+ originInfo->mQuotaObjects.Put(path, info); -+ } -+ } -+ -+ nsRefPtr result = info; -+ return result.forget(); -+} -+ -+already_AddRefed -+QuotaManager::GetQuotaObject(const nsACString& aOrigin, -+ const nsAString& aPath) -+{ -+ nsresult rv; -+ nsCOMPtr file = do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ rv = file->InitWithPath(aPath); -+ NS_ENSURE_SUCCESS(rv, nullptr); -+ -+ return GetQuotaObject(aOrigin, file); -+} -diff --git dom/quota/QuotaManager.h dom/quota/QuotaManager.h -new file mode 100644 -index 0000000..e19acdd ---- /dev/null -+++ mozilla/dom/quota/QuotaManager.h -@@ -0,0 +1,147 @@ -+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim: set ts=2 et sw=2 tw=80: */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this file, -+ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#ifndef mozilla_dom_quota_quotamanager_h__ -+#define mozilla_dom_quota_quotamanager_h__ -+ -+#include "QuotaCommon.h" -+ -+#include "mozilla/Mutex.h" -+#include "nsDataHashtable.h" -+#include "nsRefPtrHashtable.h" -+#include "nsThreadUtils.h" -+ -+BEGIN_QUOTA_NAMESPACE -+ -+class OriginInfo; -+class QuotaManager; -+ -+class QuotaObject -+{ -+ friend class OriginInfo; -+ friend class QuotaManager; -+ -+public: -+ void -+ AddRef(); -+ -+ void -+ Release(); -+ -+ void -+ UpdateSize(int64_t aSize); -+ -+ bool -+ MaybeAllocateMoreSpace(int64_t aOffset, int32_t aCount); -+ -+private: -+ QuotaObject(OriginInfo* aOriginInfo, const nsAString& aPath, int64_t aSize) -+ : mOriginInfo(aOriginInfo), mPath(aPath), mSize(aSize) -+ { } -+ -+ virtual ~QuotaObject() -+ { } -+ -+ nsAutoRefCnt mRefCnt; -+ -+ OriginInfo* mOriginInfo; -+ nsString mPath; -+ int64_t mSize; -+}; -+ -+class OriginInfo -+{ -+ friend class QuotaManager; -+ friend class QuotaObject; -+ -+public: -+ OriginInfo(const nsACString& aOrigin, int64_t aLimit, int64_t aUsage) -+ : mOrigin(aOrigin), mLimit(aLimit), mUsage(aUsage) -+ { -+ mQuotaObjects.Init(); -+ } -+ -+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(OriginInfo) -+ -+private: -+ void -+#ifdef DEBUG -+ LockedClearOriginInfos(); -+#else -+ LockedClearOriginInfos() -+ { -+ mQuotaObjects.EnumerateRead(ClearOriginInfoCallback, nullptr); -+ } -+#endif -+ -+ static PLDHashOperator -+ ClearOriginInfoCallback(const nsAString& aKey, -+ QuotaObject* aValue, void* aUserArg); -+ -+ nsDataHashtable mQuotaObjects; -+ -+ nsCString mOrigin; -+ int64_t mLimit; -+ int64_t mUsage; -+}; -+ -+class QuotaManager -+{ -+ friend class nsAutoPtr; -+ friend class OriginInfo; -+ friend class QuotaObject; -+ -+public: -+ // Returns a non-owning reference. -+ static QuotaManager* -+ GetOrCreate(); -+ -+ // Returns a non-owning reference. -+ static QuotaManager* -+ Get(); -+ -+ void -+ InitQuotaForOrigin(const nsACString& aOrigin, -+ int64_t aLimit, -+ int64_t aUsage); -+ -+ void -+ DecreaseUsageForOrigin(const nsACString& aOrigin, -+ int64_t aSize); -+ -+ void -+ RemoveQuotaForPattern(const nsACString& aPattern); -+ -+ already_AddRefed -+ GetQuotaObject(const nsACString& aOrigin, -+ nsIFile* aFile); -+ -+ already_AddRefed -+ GetQuotaObject(const nsACString& aOrigin, -+ const nsAString& aPath); -+ -+private: -+ QuotaManager() -+ : mQuotaMutex("QuotaManager.mQuotaMutex") -+ { -+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); -+ -+ mOriginInfos.Init(); -+ } -+ -+ virtual ~QuotaManager() -+ { -+ NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); -+ } -+ -+ mozilla::Mutex mQuotaMutex; -+ -+ nsRefPtrHashtable mOriginInfos; -+}; -+ -+END_QUOTA_NAMESPACE -+ -+#endif /* mozilla_dom_quota_quotamanager_h__ */ -diff --git layout/build/Makefile.in layout/build/Makefile.in -index e6b32da..496b55f 100644 ---- mozilla/layout/build/Makefile.in -+++ mozilla/layout/build/Makefile.in -@@ -69,6 +69,7 @@ SHARED_LIBRARY_LIBS = \ - $(DEPTH)/dom/encoding/$(LIB_PREFIX)domencoding_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/file/$(LIB_PREFIX)domfile_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/power/$(LIB_PREFIX)dom_power_s.$(LIB_SUFFIX) \ -+ $(DEPTH)/dom/quota/$(LIB_PREFIX)domquota_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/settings/$(LIB_PREFIX)jsdomsettings_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/permission/$(LIB_PREFIX)jsdompermissionsettings_s.$(LIB_SUFFIX) \ - $(DEPTH)/dom/network/src/$(LIB_PREFIX)dom_network_s.$(LIB_SUFFIX) \ -diff --git netwerk/base/src/Makefile.in netwerk/base/src/Makefile.in -index 0c0d60e..e8cef48 100644 ---- mozilla/netwerk/base/src/Makefile.in -+++ mozilla/netwerk/base/src/Makefile.in -@@ -19,6 +19,7 @@ LIBXUL_LIBRARY = 1 - EXPORTS = \ - nsMIMEInputStream.h \ - nsURLHelper.h \ -+ nsFileStreams.h \ - $(NULL) - - EXPORTS_NAMESPACES = mozilla/net -diff --git netwerk/base/src/nsFileStreams.cpp netwerk/base/src/nsFileStreams.cpp -index 2420ffc..ecc26aa 100644 ---- mozilla/netwerk/base/src/nsFileStreams.cpp -+++ mozilla/netwerk/base/src/nsFileStreams.cpp -@@ -51,7 +51,9 @@ nsFileStreamBase::~nsFileStreamBase() - Close(); - } - --NS_IMPL_THREADSAFE_ISUPPORTS1(nsFileStreamBase, nsISeekableStream) -+NS_IMPL_THREADSAFE_ISUPPORTS2(nsFileStreamBase, -+ nsISeekableStream, -+ nsIFileMetadata) - - NS_IMETHODIMP - nsFileStreamBase::Seek(int32_t whence, int64_t offset) -@@ -124,6 +126,52 @@ nsFileStreamBase::SetEOF() - return NS_OK; - } - -+NS_IMETHODIMP -+nsFileStreamBase::GetSize(int64_t* _retval) -+{ -+ nsresult rv = DoPendingOpen(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!mFD) { -+ return NS_BASE_STREAM_CLOSED; -+ } -+ -+ PRFileInfo64 info; -+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -+ return NS_BASE_STREAM_OSERROR; -+ } -+ -+ *_retval = int64_t(info.size); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+nsFileStreamBase::GetLastModified(int64_t* _retval) -+{ -+ nsresult rv = DoPendingOpen(); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (!mFD) { -+ return NS_BASE_STREAM_CLOSED; -+ } -+ -+ PRFileInfo64 info; -+ if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -+ return NS_BASE_STREAM_OSERROR; -+ } -+ -+ int64_t modTime = int64_t(info.modifyTime); -+ if (modTime == 0) { -+ *_retval = 0; -+ } -+ else { -+ *_retval = modTime / int64_t(PR_USEC_PER_MSEC); -+ } -+ -+ return NS_OK; -+} -+ - nsresult - nsFileStreamBase::Close() - { -@@ -934,13 +982,12 @@ nsSafeFileOutputStream::Write(const char *buf, uint32_t count, uint32_t *result) - //////////////////////////////////////////////////////////////////////////////// - // nsFileStream - --NS_IMPL_ISUPPORTS_INHERITED4(nsFileStream, -+NS_IMPL_ISUPPORTS_INHERITED3(nsFileStream, - nsFileStreamBase, - nsIInputStream, - nsIOutputStream, -- nsIFileStream, -- nsIFileMetadata) -- -+ nsIFileStream) -+ - NS_IMETHODIMP - nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm, - int32_t behaviorFlags) -@@ -959,50 +1006,4 @@ nsFileStream::Init(nsIFile* file, int32_t ioFlags, int32_t perm, - mBehaviorFlags & nsIFileStream::DEFER_OPEN); - } - --NS_IMETHODIMP --nsFileStream::GetSize(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mFD) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- PRFileInfo64 info; -- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- *_retval = int64_t(info.size); -- -- return NS_OK; --} -- --NS_IMETHODIMP --nsFileStream::GetLastModified(int64_t* _retval) --{ -- nsresult rv = DoPendingOpen(); -- NS_ENSURE_SUCCESS(rv, rv); -- -- if (!mFD) { -- return NS_BASE_STREAM_CLOSED; -- } -- -- PRFileInfo64 info; -- if (PR_GetOpenFileInfo64(mFD, &info) == PR_FAILURE) { -- return NS_BASE_STREAM_OSERROR; -- } -- -- int64_t modTime = int64_t(info.modifyTime); -- if (modTime == 0) { -- *_retval = 0; -- } -- else { -- *_retval = modTime / int64_t(PR_USEC_PER_MSEC); -- } -- -- return NS_OK; --} -- - //////////////////////////////////////////////////////////////////////////////// -diff --git netwerk/base/src/nsFileStreams.h netwerk/base/src/nsFileStreams.h -index 13e5b45..1aa6a82 100644 ---- mozilla/netwerk/base/src/nsFileStreams.h -+++ mozilla/netwerk/base/src/nsFileStreams.h -@@ -24,11 +24,13 @@ - - //////////////////////////////////////////////////////////////////////////////// - --class nsFileStreamBase : public nsISeekableStream -+class nsFileStreamBase : public nsISeekableStream, -+ public nsIFileMetadata - { - public: - NS_DECL_ISUPPORTS - NS_DECL_NSISEEKABLESTREAM -+ NS_DECL_NSIFILEMETADATA - - nsFileStreamBase(); - virtual ~nsFileStreamBase(); -@@ -124,8 +126,8 @@ public: - NS_IMETHOD IsNonBlocking(bool* _retval) - { - return nsFileStreamBase::IsNonBlocking(_retval); -- } -- -+ } -+ - // Overrided from nsFileStreamBase - NS_IMETHOD Seek(int32_t aWhence, int64_t aOffset); - -@@ -260,13 +262,11 @@ protected: - class nsFileStream : public nsFileStreamBase, - public nsIInputStream, - public nsIOutputStream, -- public nsIFileStream, -- public nsIFileMetadata -+ public nsIFileStream - { - public: - NS_DECL_ISUPPORTS_INHERITED - NS_DECL_NSIFILESTREAM -- NS_DECL_NSIFILEMETADATA - NS_FORWARD_NSIINPUTSTREAM(nsFileStreamBase::) - - // Can't use NS_FORWARD_NSIOUTPUTSTREAM due to overlapping methods -diff --git storage/public/Makefile.in storage/public/Makefile.in -index c485d4e..c05e6f3 100644 ---- mozilla/storage/public/Makefile.in -+++ mozilla/storage/public/Makefile.in -@@ -36,7 +36,6 @@ XPIDLSRCS = \ - mozIStorageCompletionCallback.idl \ - mozIStorageBaseStatement.idl \ - mozIStorageAsyncStatement.idl \ -- mozIStorageServiceQuotaManagement.idl \ - mozIStorageVacuumParticipant.idl \ - $(NULL) - # SEE ABOVE NOTE! -diff --git storage/public/mozIStorageService.idl storage/public/mozIStorageService.idl -index 3087a11..483649b 100644 ---- mozilla/storage/public/mozIStorageService.idl -+++ mozilla/storage/public/mozIStorageService.idl -@@ -7,6 +7,7 @@ - - interface mozIStorageConnection; - interface nsIFile; -+interface nsIFileURL; - - /** - * The mozIStorageService interface is intended to be implemented by -@@ -15,7 +16,7 @@ interface nsIFile; - * - * This is the only way to open a database connection. - */ --[scriptable, uuid(fe8e95cb-b377-4c8d-bccb-d9198c67542b)] -+[scriptable, uuid(12bfad34-cca3-40fb-8736-d8bf9db61a27)] - interface mozIStorageService : nsISupports { - /** - * Get a connection to a named special database storage. -@@ -106,6 +107,16 @@ interface mozIStorageService : nsISupports { - */ - mozIStorageConnection openUnsharedDatabase(in nsIFile aDatabaseFile); - -+ /** -+ * See openDatabase(). Exactly the same only initialized with a file URL. -+ * Custom parameters can be passed to SQLite and VFS implementations through -+ * the query part of the URL. -+ * -+ * @param aURL -+ * A nsIFileURL that represents the database that is to be opened. -+ */ -+ mozIStorageConnection openDatabaseWithFileURL(in nsIFileURL aFileURL); -+ - /* - * Utilities - */ -diff --git storage/public/mozIStorageServiceQuotaManagement.idl storage/public/mozIStorageServiceQuotaManagement.idl -deleted file mode 100644 -index ee5086b..0000000 ---- mozilla/storage/public/mozIStorageServiceQuotaManagement.idl -+++ /dev/null -@@ -1,99 +0,0 @@ --/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ --/* vim: set ts=2 et sw=2 tw=80: */ --/* This Source Code Form is subject to the terms of the Mozilla Public -- * License, v. 2.0. If a copy of the MPL was not distributed with this -- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -- --#include "nsISupports.idl" -- --interface mozIStorageConnection; --interface nsIFile; -- --[scriptable, function, uuid(ae94f0a5-ebdf-48f4-9959-085e13235d8d)] --interface mozIStorageQuotaCallback : nsISupports --{ -- /** -- * Called when the file size quota for a group of databases is exceeded. -- * -- * @param aFilename -- * The filename of the database that has exceeded the quota. -- * -- * @param aCurrentSizeLimit -- * The current size (in bytes) of the quota. -- * -- * @param aCurrentTotalSize -- * The current size of all databases in the quota group. -- * -- * @param aUserData -- * Any additional data that was provided to the -- * setQuotaForFilenamePattern function. -- * -- * @returns A new quota size. A new quota of 0 will disable the quota callback -- * and any quota value less than aCurrentTotalSize will cause the -- * database operation to fail with NS_ERROR_FILE_NO_DEVICE_SPACE. -- */ -- long long quotaExceeded(in ACString aFilename, -- in long long aCurrentSizeLimit, -- in long long aCurrentTotalSize, -- in nsISupports aUserData); --}; -- --/** -- * This is a temporary interface that should eventually merge with -- * mozIStorageService. -- */ --[scriptable, uuid(4d81faf5-fe01-428b-99b8-c94cba12fd72)] --interface mozIStorageServiceQuotaManagement : nsISupports --{ -- /** -- * See mozIStorageService.openDatabase. Exactly the same only with a custom -- * SQLite VFS. -- */ -- mozIStorageConnection openDatabaseWithVFS(in nsIFile aDatabaseFile, -- in ACString aVFSName); -- -- /** -- * Set a file size quota for a group of databases matching the given filename -- * pattern, optionally specifying a callback when the quota is exceeded. -- * -- * @param aPattern -- * A pattern to match filenames for inclusion in the quota system. May -- * contain the following special characters: -- * '*' Matches any sequence of zero or more characters. -- * '?' Matches exactly one character. -- * [...] Matches one character from the enclosed list of characters. -- * [^...] Matches one character not in the enclosed list. -- * -- * @param aSizeLimit -- * The size limit (in bytes) for the quota group. -- * -- * @param aCallback -- * A callback that will be used when the quota is exceeded. -- * -- * @param aUserData -- * Additional information to be passed to the callback. -- */ -- void setQuotaForFilenamePattern(in ACString aPattern, -- in long long aSizeLimit, -- in mozIStorageQuotaCallback aCallback, -- in nsISupports aUserData); -- -- /** -- * Adds, removes, or updates the file size information maintained by the quota -- * system for files not opened through openDatabaseWithVFS(). -- * -- * Use this function when you want files to be included in quota calculations -- * that are either a) not SQLite databases, or b) SQLite databases that have -- * not been opened. -- * -- * This function will have no effect on files that do not match an existing -- * quota pattern (set previously by setQuotaForFilenamePattern()). -- * -- * @param aFile -- * The file for which quota information should be updated. If the file -- * exists then its size information will be added or refreshed. If the -- * file does not exist then the file will be removed from tracking -- * under the quota system. -- */ -- void updateQuotaInformationForFile(in nsIFile aFile); --}; -diff --git storage/public/storage.h storage/public/storage.h -index 8e571e2..08f39f3 100644 ---- mozilla/storage/public/storage.h -+++ mozilla/storage/public/storage.h -@@ -24,7 +24,6 @@ - #include "mozIStorageStatementCallback.h" - #include "mozIStorageBindingParamsArray.h" - #include "mozIStorageBindingParams.h" --#include "mozIStorageServiceQuotaManagement.h" - #include "mozIStorageVacuumParticipant.h" - #include "mozIStorageCompletionCallback.h" - #include "mozIStorageAsyncStatement.h" -diff --git storage/src/TelemetryVFS.cpp storage/src/TelemetryVFS.cpp -index 60de5c4..e4fce09 100644 ---- mozilla/storage/src/TelemetryVFS.cpp -+++ mozilla/storage/src/TelemetryVFS.cpp -@@ -10,6 +10,7 @@ - #include "sqlite3.h" - #include "nsThreadUtils.h" - #include "mozilla/Util.h" -+#include "mozilla/dom/quota/QuotaManager.h" - - /** - * This preference is a workaround to allow users/sysadmins to identify -@@ -24,6 +25,7 @@ - namespace { - - using namespace mozilla; -+using namespace mozilla::dom::quota; - - struct Histograms { - const char *name; -@@ -82,9 +84,17 @@ private: - }; - - struct telemetry_file { -- sqlite3_file base; // Base class. Must be first -- Histograms *histograms; // histograms pertaining to this file -- sqlite3_file pReal[1]; // This contains the vfs that actually does work -+ // Base class. Must be first -+ sqlite3_file base; -+ -+ // histograms pertaining to this file -+ Histograms *histograms; -+ -+ // quota object for this file -+ nsRefPtr quotaObject; -+ -+ // This contains the vfs that actually does work -+ sqlite3_file pReal[1]; - }; - - /* -@@ -99,6 +109,7 @@ xClose(sqlite3_file *pFile) - if( rc==SQLITE_OK ){ - delete p->base.pMethods; - p->base.pMethods = NULL; -+ p->quotaObject = nullptr; - } - return rc; - } -@@ -126,6 +137,9 @@ int - xWrite(sqlite3_file *pFile, const void *zBuf, int iAmt, sqlite_int64 iOfst) - { - telemetry_file *p = (telemetry_file *)pFile; -+ if (p->quotaObject && !p->quotaObject->MaybeAllocateMoreSpace(iOfst, iAmt)) { -+ return SQLITE_FULL; -+ } - IOThreadAutoTimer ioTimer(p->histograms->writeMS); - int rc; - rc = p->pReal->pMethods->xWrite(p->pReal, zBuf, iAmt, iOfst); -@@ -144,6 +158,9 @@ xTruncate(sqlite3_file *pFile, sqlite_int64 size) - int rc; - Telemetry::AutoTimer timer; - rc = p->pReal->pMethods->xTruncate(p->pReal, size); -+ if (rc == SQLITE_OK && p->quotaObject) { -+ p->quotaObject->UpdateSize(size); -+ } - return rc; - } - -@@ -300,6 +317,18 @@ xOpen(sqlite3_vfs* vfs, const char *zName, sqlite3_file* pFile, - break; - } - p->histograms = h; -+ -+ const char* origin; -+ if ((flags & SQLITE_OPEN_URI) && -+ (origin = sqlite3_uri_parameter(zName, "origin"))) { -+ QuotaManager* quotaManager = QuotaManager::Get(); -+ MOZ_ASSERT(quotaManager); -+ -+ p->quotaObject = quotaManager->GetQuotaObject(nsDependentCString(origin), -+ NS_ConvertUTF8toUTF16(zName)); -+ -+ } -+ - rc = orig_vfs->xOpen(orig_vfs, zName, p->pReal, flags, pOutFlags); - if( rc != SQLITE_OK ) - return rc; -diff --git storage/src/mozStorageConnection.cpp storage/src/mozStorageConnection.cpp -index 3afd3e1b..430824a 100644 ---- mozilla/storage/src/mozStorageConnection.cpp -+++ mozilla/storage/src/mozStorageConnection.cpp -@@ -12,6 +12,7 @@ - #include "nsIMemoryReporter.h" - #include "nsThreadUtils.h" - #include "nsIFile.h" -+#include "nsIFileURL.h" - #include "mozilla/Telemetry.h" - #include "mozilla/Mutex.h" - #include "mozilla/CondVar.h" -@@ -471,34 +472,83 @@ Connection::getAsyncExecutionTarget() - } - - nsresult --Connection::initialize(nsIFile *aDatabaseFile, -- const char* aVFSName) -+Connection::initialize() - { - NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); - SAMPLE_LABEL("storage", "Connection::initialize"); - -- int srv; -- nsresult rv; -+ // in memory database requested, sqlite uses a magic file name -+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, NULL); -+ if (srv != SQLITE_OK) { -+ mDBConn = nullptr; -+ return convertResultCode(srv); -+ } -+ -+ return initializeInternal(nullptr); -+} -+ -+nsresult -+Connection::initialize(nsIFile *aDatabaseFile) -+{ -+ NS_ASSERTION (aDatabaseFile, "Passed null file!"); -+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); -+ SAMPLE_LABEL("storage", "Connection::initialize"); - - mDatabaseFile = aDatabaseFile; - -- if (aDatabaseFile) { -- nsAutoString path; -- rv = aDatabaseFile->GetPath(path); -- NS_ENSURE_SUCCESS(rv, rv); -+ nsAutoString path; -+ nsresult rv = aDatabaseFile->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, rv); - -- srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn, mFlags, -- aVFSName); -- } -- else { -- // in memory database requested, sqlite uses a magic file name -- srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, aVFSName); -+ int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn, -+ mFlags, NULL); -+ if (srv != SQLITE_OK) { -+ mDBConn = nullptr; -+ return convertResultCode(srv); - } -+ -+ rv = initializeInternal(aDatabaseFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mDatabaseFile = aDatabaseFile; -+ -+ return NS_OK; -+} -+ -+nsresult -+Connection::initialize(nsIFileURL *aFileURL) -+{ -+ NS_ASSERTION (aFileURL, "Passed null file URL!"); -+ NS_ASSERTION (!mDBConn, "Initialize called on already opened database!"); -+ SAMPLE_LABEL("storage", "Connection::initialize"); -+ -+ nsCOMPtr databaseFile; -+ nsresult rv = aFileURL->GetFile(getter_AddRefs(databaseFile)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsAutoCString spec; -+ rv = aFileURL->GetSpec(spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, NULL); - if (srv != SQLITE_OK) { - mDBConn = nullptr; - return convertResultCode(srv); - } - -+ rv = initializeInternal(databaseFile); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ mFileURL = aFileURL; -+ mDatabaseFile = databaseFile; -+ -+ return NS_OK; -+} -+ -+ -+nsresult -+Connection::initializeInternal(nsIFile* aDatabaseFile) -+{ - // Properly wrap the database handle's mutex. - sharedDBMutex.initWithMutex(sqlite3_db_mutex(mDBConn)); - -@@ -522,14 +572,14 @@ Connection::initialize(nsIFile *aDatabaseFile, - nsAutoCString pageSizeQuery(MOZ_STORAGE_UNIQUIFY_QUERY_STR - "PRAGMA page_size = "); - pageSizeQuery.AppendInt(pageSize); -- rv = ExecuteSimpleSQL(pageSizeQuery); -+ nsresult rv = ExecuteSimpleSQL(pageSizeQuery); - NS_ENSURE_SUCCESS(rv, rv); - - // Get the current page_size, since it may differ from the specified value. - sqlite3_stmt *stmt; - NS_NAMED_LITERAL_CSTRING(pragma_page_size, - MOZ_STORAGE_UNIQUIFY_QUERY_STR "PRAGMA page_size"); -- srv = prepareStatement(pragma_page_size, &stmt); -+ int srv = prepareStatement(pragma_page_size, &stmt); - if (srv == SQLITE_OK) { - if (SQLITE_ROW == stepStatement(stmt)) { - pageSize = ::sqlite3_column_int64(stmt, 0); -@@ -962,7 +1012,8 @@ Connection::Clone(bool aReadOnly, - nsRefPtr clone = new Connection(mStorageService, flags); - NS_ENSURE_TRUE(clone, NS_ERROR_OUT_OF_MEMORY); - -- nsresult rv = clone->initialize(mDatabaseFile); -+ nsresult rv = mFileURL ? clone->initialize(mFileURL) -+ : clone->initialize(mDatabaseFile); - NS_ENSURE_SUCCESS(rv, rv); - - // Copy over pragmas from the original connection. -diff --git storage/src/mozStorageConnection.h storage/src/mozStorageConnection.h -index b71f5db..97f5cf8 100644 ---- mozilla/storage/src/mozStorageConnection.h -+++ mozilla/storage/src/mozStorageConnection.h -@@ -25,6 +25,7 @@ - - struct PRLock; - class nsIFile; -+class nsIFileURL; - class nsIEventTarget; - class nsIThread; - -@@ -63,18 +64,27 @@ public: - Connection(Service *aService, int aFlags); - - /** -+ * Creates the connection to an in-memory database. -+ */ -+ nsresult initialize(); -+ -+ /** - * Creates the connection to the database. - * - * @param aDatabaseFile - * The nsIFile of the location of the database to open, or create if it -- * does not exist. Passing in nullptr here creates an in-memory -- * database. -- * @param aVFSName -- * The VFS that SQLite will use when opening this database. NULL means -- * "default". -+ * does not exist. - */ -- nsresult initialize(nsIFile *aDatabaseFile, -- const char* aVFSName = NULL); -+ nsresult initialize(nsIFile *aDatabaseFile); -+ -+ /** -+ * Creates the connection to the database. -+ * -+ * @param aFileURL -+ * The nsIFileURL of the location of the database to open, or create if it -+ * does not exist. -+ */ -+ nsresult initialize(nsIFileURL *aFileURL); - - // fetch the native handle - sqlite3 *GetNativeConnection() { return mDBConn; } -@@ -155,6 +165,8 @@ public: - private: - ~Connection(); - -+ nsresult initializeInternal(nsIFile *aDatabaseFile); -+ - /** - * Sets the database into a closed state so no further actions can be - * performed. -@@ -206,6 +218,7 @@ private: - int progressHandler(); - - sqlite3 *mDBConn; -+ nsCOMPtr mFileURL; - nsCOMPtr mDatabaseFile; - - /** -diff --git storage/src/mozStorageService.cpp storage/src/mozStorageService.cpp -index 00661d6..862a7da 100644 ---- mozilla/storage/src/mozStorageService.cpp -+++ mozilla/storage/src/mozStorageService.cpp -@@ -24,8 +24,6 @@ - #include "mozilla/Preferences.h" - - #include "sqlite3.h" --#include "test_quota.h" --#include "test_quota.c" - - #ifdef SQLITE_OS_WIN - // "windows.h" was included and it can #define lots of things we care about... -@@ -35,61 +33,6 @@ - #include "nsIPromptService.h" - #include "nsIMemoryReporter.h" - --namespace { -- --class QuotaCallbackData --{ --public: -- QuotaCallbackData(mozIStorageQuotaCallback *aCallback, -- nsISupports *aUserData) -- : callback(aCallback), userData(aUserData) -- { -- MOZ_COUNT_CTOR(QuotaCallbackData); -- } -- -- ~QuotaCallbackData() -- { -- MOZ_COUNT_DTOR(QuotaCallbackData); -- } -- -- static void Callback(const char *zFilename, -- sqlite3_int64 *piLimit, -- sqlite3_int64 iSize, -- void *pArg) -- { -- NS_ASSERTION(zFilename && strlen(zFilename), "Null or empty filename!"); -- NS_ASSERTION(piLimit, "Null pointer!"); -- -- QuotaCallbackData *data = static_cast(pArg); -- if (!data) { -- // No callback specified, return immediately. -- return; -- } -- -- NS_ASSERTION(data->callback, "Should never have a null callback!"); -- -- nsDependentCString filename(zFilename); -- -- int64_t newLimit; -- if (NS_SUCCEEDED(data->callback->QuotaExceeded(filename, *piLimit, -- iSize, data->userData, -- &newLimit))) { -- *piLimit = newLimit; -- } -- } -- -- static void Destroy(void *aUserData) -- { -- delete static_cast(aUserData); -- } -- --private: -- nsCOMPtr callback; -- nsCOMPtr userData; --}; -- --} // anonymous namespace -- - //////////////////////////////////////////////////////////////////////////////// - //// Defines - -@@ -345,11 +288,10 @@ private: - //////////////////////////////////////////////////////////////////////////////// - //// Service - --NS_IMPL_THREADSAFE_ISUPPORTS3( -+NS_IMPL_THREADSAFE_ISUPPORTS2( - Service, - mozIStorageService, -- nsIObserver, -- mozIStorageServiceQuotaManagement -+ nsIObserver - ) - - Service *Service::gService = nullptr; -@@ -438,10 +380,6 @@ Service::~Service() - - // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but - // there is nothing actionable we can do in that case. -- rc = ::sqlite3_quota_shutdown(); -- if (rc != SQLITE_OK) -- NS_WARNING("sqlite3 did not shutdown cleanly."); -- - rc = ::sqlite3_shutdown(); - if (rc != SQLITE_OK) - NS_WARNING("sqlite3 did not shutdown cleanly."); -@@ -636,9 +574,6 @@ Service::initialize() - } else { - NS_WARNING("Failed to register telemetry VFS"); - } -- rc = ::sqlite3_quota_initialize("telemetry-vfs", 0); -- if (rc != SQLITE_OK) -- return convertResultCode(rc); - - // Set the default value for the toolkit.storage.synchronous pref. It will be - // updated with the user preference on the main thread. -@@ -739,28 +674,24 @@ Service::OpenSpecialDatabase(const char *aStorageKey, - // connection to use a memory DB. - } - else if (::strcmp(aStorageKey, "profile") == 0) { -- - rv = NS_GetSpecialDirectory(NS_APP_STORAGE_50_FILE, - getter_AddRefs(storageFile)); - NS_ENSURE_SUCCESS(rv, rv); - -- nsString filename; -- storageFile->GetPath(filename); -- nsCString filename8 = NS_ConvertUTF16toUTF8(filename.get()); - // fall through to DB initialization - } - else { - return NS_ERROR_INVALID_ARG; - } - -- Connection *msc = new Connection(this, SQLITE_OPEN_READWRITE); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); -+ nsRefPtr msc = new Connection(this, SQLITE_OPEN_READWRITE); - -- rv = msc->initialize(storageFile); -+ rv = storageFile ? msc->initialize(storageFile) : msc->initialize(); - NS_ENSURE_SUCCESS(rv, rv); - -- NS_ADDREF(*_connection = msc); -+ msc.forget(_connection); - return NS_OK; -+ - } - - NS_IMETHODIMP -@@ -774,12 +705,11 @@ Service::OpenDatabase(nsIFile *aDatabaseFile, - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE | - SQLITE_OPEN_CREATE; - nsRefPtr msc = new Connection(this, flags); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); - - nsresult rv = msc->initialize(aDatabaseFile); - NS_ENSURE_SUCCESS(rv, rv); - -- NS_ADDREF(*_connection = msc); -+ msc.forget(_connection); - return NS_OK; - } - -@@ -794,12 +724,30 @@ Service::OpenUnsharedDatabase(nsIFile *aDatabaseFile, - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_PRIVATECACHE | - SQLITE_OPEN_CREATE; - nsRefPtr msc = new Connection(this, flags); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); - - nsresult rv = msc->initialize(aDatabaseFile); - NS_ENSURE_SUCCESS(rv, rv); - -- NS_ADDREF(*_connection = msc); -+ msc.forget(_connection); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+Service::OpenDatabaseWithFileURL(nsIFileURL *aFileURL, -+ mozIStorageConnection **_connection) -+{ -+ NS_ENSURE_ARG(aFileURL); -+ -+ // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility -+ // reasons. -+ int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE | -+ SQLITE_OPEN_CREATE | SQLITE_OPEN_URI; -+ nsRefPtr msc = new Connection(this, flags); -+ -+ nsresult rv = msc->initialize(aFileURL); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ msc.forget(_connection); - return NS_OK; - } - -@@ -885,67 +833,5 @@ Service::Observe(nsISupports *, const char *aTopic, const PRUnichar *) - return NS_OK; - } - --//////////////////////////////////////////////////////////////////////////////// --//// mozIStorageServiceQuotaManagement -- --NS_IMETHODIMP --Service::OpenDatabaseWithVFS(nsIFile *aDatabaseFile, -- const nsACString &aVFSName, -- mozIStorageConnection **_connection) --{ -- NS_ENSURE_ARG(aDatabaseFile); -- -- // Always ensure that SQLITE_OPEN_CREATE is passed in for compatibility -- // reasons. -- int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_SHAREDCACHE | -- SQLITE_OPEN_CREATE; -- nsRefPtr msc = new Connection(this, flags); -- NS_ENSURE_TRUE(msc, NS_ERROR_OUT_OF_MEMORY); -- -- nsresult rv = msc->initialize(aDatabaseFile, -- PromiseFlatCString(aVFSName).get()); -- NS_ENSURE_SUCCESS(rv, rv); -- -- NS_ADDREF(*_connection = msc); -- return NS_OK; --} -- --NS_IMETHODIMP --Service::SetQuotaForFilenamePattern(const nsACString &aPattern, -- int64_t aSizeLimit, -- mozIStorageQuotaCallback *aCallback, -- nsISupports *aUserData) --{ -- NS_ENSURE_FALSE(aPattern.IsEmpty(), NS_ERROR_INVALID_ARG); -- -- nsAutoPtr data; -- if (aSizeLimit && aCallback) { -- data = new QuotaCallbackData(aCallback, aUserData); -- } -- -- int rc = ::sqlite3_quota_set(PromiseFlatCString(aPattern).get(), -- aSizeLimit, QuotaCallbackData::Callback, -- data, QuotaCallbackData::Destroy); -- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc)); -- -- data.forget(); -- return NS_OK; --} -- --NS_IMETHODIMP --Service::UpdateQuotaInformationForFile(nsIFile *aFile) --{ -- NS_ENSURE_ARG_POINTER(aFile); -- -- nsString path; -- nsresult rv = aFile->GetPath(path); -- NS_ENSURE_SUCCESS(rv, rv); -- -- int rc = ::sqlite3_quota_file(NS_ConvertUTF16toUTF8(path).get()); -- NS_ENSURE_TRUE(rc == SQLITE_OK, convertResultCode(rc)); -- -- return NS_OK; --} -- - } // namespace storage - } // namespace mozilla -diff --git storage/src/mozStorageService.h storage/src/mozStorageService.h -index 21c1ff8..3f5a546 100644 ---- mozilla/storage/src/mozStorageService.h -+++ mozilla/storage/src/mozStorageService.h -@@ -15,7 +15,6 @@ - #include "mozilla/Mutex.h" - - #include "mozIStorageService.h" --#include "mozIStorageServiceQuotaManagement.h" - - class nsIMemoryReporter; - class nsIMemoryMultiReporter; -@@ -28,7 +27,6 @@ namespace storage { - class Connection; - class Service : public mozIStorageService - , public nsIObserver -- , public mozIStorageServiceQuotaManagement - { - public: - /** -@@ -58,7 +56,6 @@ public: - NS_DECL_ISUPPORTS - NS_DECL_MOZISTORAGESERVICE - NS_DECL_NSIOBSERVER -- NS_DECL_MOZISTORAGESERVICEQUOTAMANAGEMENT - - /** - * Obtains an already AddRefed pointer to XPConnect. This is used by -diff --git toolkit/toolkit-makefiles.sh toolkit/toolkit-makefiles.sh -index 6a7d714..8f1bbe0 100644 ---- mozilla/toolkit/toolkit-makefiles.sh -+++ mozilla/toolkit/toolkit-makefiles.sh -@@ -68,6 +68,7 @@ MAKEFILES_dom=" - dom/plugins/base/Makefile - dom/plugins/ipc/Makefile - dom/power/Makefile -+ dom/quota/Makefile - dom/settings/Makefile - dom/sms/Makefile - dom/sms/interfaces/Makefile Modified: trunk/www/seamonkey/files/patch-bug807492 ============================================================================== --- trunk/www/seamonkey/files/patch-bug807492 Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/seamonkey/files/patch-bug807492 Tue Feb 26 04:18:43 2013 (r1192) @@ -17,7 +17,7 @@ index c167461..8346c11 100644 --- mozilla/configure.in +++ mozilla/configure.in -@@ -1413,16 +1413,27 @@ if test "$GNU_CC"; then +@@ -1449,16 +1449,27 @@ if test "$GNU_CC"; then _SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -mssse3" AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes]) @@ -45,7 +45,7 @@ # -Werror=return-type - catches missing returns, zero false positives # -Wtype-limits - catches overflow bugs, few false positives # -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives -@@ -5232,17 +5243,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow +@@ -5255,17 +5266,17 @@ dnl Turn off webrtc for OS's we don't ha dnl --enable-webrtc to override. Can disable for everything in dnl the master list above. if test -n "$MOZ_WEBRTC"; then @@ -64,13 +64,13 @@ ;; esac fi -@@ -8909,16 +8920,21 @@ if test "${OS_TARGET}" = "WINNT"; then - if test "$HAVE_64BIT_OS"; then - OS_BITS=64 +@@ -9061,16 +9072,21 @@ elif test "${OS_TARGET}" = "Android"; th + EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android " + if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then + EXTRA_GYP_DEFINES+=" -D armv7=0 " else - OS_BITS=32 + EXTRA_GYP_DEFINES+=" -D armv7=1 " fi - EXTRA_GYP_DEFINES="-D MSVS_VERSION=${_MSVS_VERSION} -D MSVS_OS_BITS=${OS_BITS}" fi +# Don't try to compile sse4.1 code if toolchain doesn't support @@ -85,7 +85,7 @@ dnl so that regeneration via dependencies works correctly WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi" - GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" + GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" diff --git js/src/config/system-headers js/src/config/system-headers index 9bd1efa..1095a01 100644 --- mozilla/js/src/config/system-headers @@ -114,20 +114,20 @@ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \ $(NULL) --ifeq ($(OS_ARCH), Darwin) +-ifeq ($(OS_TARGET), Darwin) +ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LOCAL_INCLUDES += \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \ $(NULL) -+ifeq ($(OS_ARCH), Darwin) ++ifeq ($(OS_TARGET), Darwin) DEFINES += -DDARWIN +else +DEFINES += -DBSD +endif endif - ifeq ($(OS_ARCH), Linux) + ifeq ($(OS_TARGET), Linux) LOCAL_INCLUDES += \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include \ -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \ @@ -146,7 +146,7 @@ endif endif --ifeq ($(OS_ARCH), Darwin) +-ifeq ($(OS_TARGET), Darwin) +ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include +ifeq ($(OS_TARGET), Darwin) @@ -156,13 +156,13 @@ endif +endif - ifeq ($(OS_ARCH), Linux) + ifeq ($(OS_TARGET), Linux) LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include endif - ifneq ($(OS_TARGET),WINNT) - CPP_UNIT_TESTS = \ - ice_unittest.cpp \ + ifeq ($(OS_TARGET), Android) + LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include + diff --git media/mtransport/third_party/nICEr/nicer.gyp media/mtransport/third_party/nICEr/nicer.gyp index 0e1f8b4..9a4b995 100644 --- mozilla/media/mtransport/third_party/nICEr/nicer.gyp @@ -341,13 +341,13 @@ if (!(my_locale = r_strdup(setlocale(LC_CTYPE, 0)))) ABORT(R_NO_MEMORY); -@@ -91,28 +99,28 @@ mbslen(const char *s, size_t *ncharsp) - if (!strstr(my_locale, "UTF-8")) - ABORT(R_NOT_FOUND); +@@ -93,28 +101,28 @@ mbslen(const char *s, size_t *ncharsp) #else - /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */ - if (! strcasestr(setlocale(LC_CTYPE, 0), "UTF-8")) - ABORT(R_NOT_FOUND); + /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */ + /* null-checking setlocale is required because Android */ + char *locale = setlocale(LC_CTYPE, 0); + if (!locale || !strcasestr(locale, "UTF-8")) + ABORT(R_NOT_FOUND); #endif -#ifdef DARWIN @@ -499,15 +499,15 @@ if (! buf) diff --git media/webrtc/signaling/signaling.gyp media/webrtc/signaling/signaling.gyp -index f0cbf870..ba0f801 100644 +index 2a91e3d..31de641 100644 --- mozilla/media/webrtc/signaling/signaling.gyp +++ mozilla/media/webrtc/signaling/signaling.gyp -@@ -208,16 +208,29 @@ +@@ -212,16 +212,29 @@ 'SIPCC_BUILD', 'HAVE_WINSOCK2_H', 'CPR_STDINT_INCLUDE=\\"mozilla/StandardInteger.h\\"' ], - + 'cflags_mozilla': [ ], }], @@ -529,34 +529,34 @@ ], 'defines': [ 'SIP_OS_OSX', - 'OSX', + 'OSX', '_FORTIFY_SOURCE=2', ], -@@ -701,17 +714,17 @@ +@@ -747,17 +760,17 @@ 'EXTERNAL_TICK_REQUIRED', 'GIPS_VER=3480', ], - + 'cflags_mozilla': [ ], - + }], - ['OS=="mac"', { + ['OS=="mac" or os_bsd==1', { 'include_dirs': [ ], - + 'sources': [ # SIPSTACK './src/sipcc/core/sipstack/sip_platform_task.c', - -@@ -746,24 +759,23 @@ + +@@ -792,24 +805,23 @@ './src/sipcc/cpr/darwin/cpr_darwin_timers_using_select.c', './src/sipcc/cpr/darwin/cpr_darwin_tst.h', './src/sipcc/cpr/darwin/cpr_darwin_types.h', ], - + 'defines' : [ 'SIP_OS_OSX', @@ -571,12 +571,12 @@ - '_DARWIN_C_SOURCE', 'NO_NSPR_10_SUPPORT', ], - + 'cflags_mozilla': [ ], }], ], - + diff --git media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c index a7c47e1..4f191de 100644 --- mozilla/media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c @@ -611,7 +611,7 @@ index a30e330..cfbd8a3 100644 --- mozilla/media/webrtc/signaling/test/Makefile.in +++ mozilla/media/webrtc/signaling/test/Makefile.in -@@ -22,32 +22,32 @@ LIBS = \ +@@ -22,17 +22,17 @@ LIBS = \ $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \ $(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \ $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \ @@ -620,7 +620,7 @@ $(NULL) ifdef MOZ_SYDNEYAUDIO --ifeq ($(OS_ARCH),Linux) +-ifeq ($(OS_TARGET),Linux) +ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LIBS += \ $(MOZ_ALSA_LIBS) \ @@ -628,22 +628,25 @@ endif endif - ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT)) + ifeq ($(OS_TARGET),Android) + LIBS += \ +@@ -65,17 +65,17 @@ endif + ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) LIBS += \ $(XLIBS) \ - $(MOZ_GTK2_LIBS) \ - -lgthread-2.0 \ + $(TK_LIBS) \ + $(MOZ_PANGO_LIBS) \ $(NULL) endif --ifeq ($(OS_ARCH),Linux) +-ifeq ($(OS_TARGET),Linux) +ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) LIBS += \ $(MOZ_CAIRO_OSLIBS) \ $(NULL) endif - ifeq ($(OS_ARCH),Darwin) + ifeq ($(OS_TARGET),Darwin) LIBS += \ -framework AudioToolbox \ diff --git media/webrtc/trunk/build/common.gypi media/webrtc/trunk/build/common.gypi Deleted: trunk/www/seamonkey/files/patch-bug817267 ============================================================================== --- trunk/www/seamonkey/files/patch-bug817267 Tue Feb 26 04:18:43 2013 (r1191) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,36 +0,0 @@ -commit faafeb1 -Author: Jan Beich -Date: Sat Dec 1 21:25:24 2012 -0500 - - Bug 817267 - dirfd() is a macro on some BSDs, fix build there. r=yoric ---- - dom/system/OSFileConstants.cpp | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp -index 75a41dc..63fc6b1 100644 ---- mozilla/dom/system/OSFileConstants.cpp -+++ mozilla/dom/system/OSFileConstants.cpp -@@ -41,6 +41,11 @@ - #include "OSFileConstants.h" - #include "nsIOSFileConstantsService.h" - -+#if defined(__DragonFly__) || defined(__FreeBSD__) \ -+ || defined(__NetBSD__) || defined(__OpenBSD__) -+#define __dd_fd dd_fd -+#endif -+ - /** - * This module defines the basic libc constants (error numbers, open modes, - * etc.) used by OS.File and possibly other OS-bound JavaScript libraries. -@@ -383,8 +388,8 @@ static dom::ConstantSpec gLibcProperties[] = - { "OSFILE_OFFSETOF_DIRENT_D_TYPE", INT_TO_JSVAL(offsetof (struct dirent, d_type)) }, - #endif // defined(DT_UNKNOWN) - -- // Under MacOS X, |dirfd| is a macro rather than a function, so we -- // need a little help to get it to work -+ // Under MacOS X and BSDs, |dirfd| is a macro rather than a -+ // function, so we need a little help to get it to work - #if defined(dirfd) - { "OSFILE_SIZEOF_DIR", INT_TO_JSVAL(sizeof (DIR)) }, - Added: trunk/www/seamonkey/files/patch-bug824317 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/seamonkey/files/patch-bug824317 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,14 @@ +diff --git a/xpcom/string/public/nsAlgorithm.h b/xpcom/string/public/nsAlgorithm.h +index fa50194a..c5f5737 100644 +--- mozilla/xpcom/string/public/nsAlgorithm.h ++++ mozilla/xpcom/string/public/nsAlgorithm.h +@@ -42,7 +42,8 @@ NS_MAX( const T& a, const T& b ) + return a > b ? a : b; + } + +-#if defined(_MSC_VER) && (_MSC_VER < 1600) ++#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || \ ++ (defined(_GLIBCXX_USE_LONG_LONG) && (!_GLIBCXX_USE_C99 || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC)) + namespace std { + inline + long long Modified: trunk/www/seamonkey/files/patch-bug826985 ============================================================================== --- trunk/www/seamonkey/files/patch-bug826985 Tue Feb 26 04:18:30 2013 (r1191) +++ trunk/www/seamonkey/files/patch-bug826985 Tue Feb 26 04:18:43 2013 (r1192) @@ -15,10 +15,10 @@ index 6d05f9c..297615f 100644 --- mozilla/configure.in +++ mozilla/configure.in -@@ -5270,6 +5270,17 @@ if test -n "$MOZ_WEBRTC"; then - MOZ_VP8=1 - MOZ_VP8_ENCODER=1 - MOZ_VP8_ERROR_CONCEALMENT=1 +@@ -5267,6 +5267,18 @@ if test -n "$MOZ_WEBRTC"; then + ;; + esac + + dnl use libv4l on Linux to support more cameras + case "$target" in + *-android*|*-linuxandroid*) @@ -30,11 +30,12 @@ + AC_MSG_ERROR([WebRTC on Linux needs libv4l2 for video format conversion.])]) + ;; + esac ++ dnl enable once Signaling lands MOZ_WEBRTC_SIGNALING=1 AC_DEFINE(MOZ_WEBRTC_SIGNALING) -@@ -5288,6 +5299,7 @@ fi - AC_SUBST(MOZ_WEBRTC) +@@ -5311,6 +5323,7 @@ AC_SUBST(MOZ_WEBRTC) + AC_SUBST(MOZ_WEBRTC_LEAKING_TESTS) AC_SUBST(MOZ_WEBRTC_SIGNALING) AC_SUBST(MOZ_PEERCONNECTION) +AC_SUBST(MOZ_WEBRTC_LIBV4L) Added: trunk/www/seamonkey/files/patch-bug827521 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/seamonkey/files/patch-bug827521 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,147 @@ +commit ab46441 +Author: Graeme McCutcheon +Date: Thu Jan 10 14:37:30 2013 +0000 + + Bug 827521 - Work around spurious operator ambiguity errors in buggy versions of Clang. r=longsonr +--- + .../svg/content/src/SVGAnimatedPreserveAspectRatio.cpp | 17 ++++++++--------- + .../svg/content/src/SVGAnimatedPreserveAspectRatio.h | 7 +++---- + content/svg/content/src/SVGPreserveAspectRatio.h | 17 +++++++++++++---- + 3 files changed, 24 insertions(+), 17 deletions(-) + +diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +index 6593461..56956b2 100644 +--- mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp ++++ mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +@@ -54,7 +54,7 @@ GetAlignForString(const nsAString &aAlignString) + { + for (uint32_t i = 0 ; i < ArrayLength(sAlignStrings) ; i++) { + if (aAlignString.EqualsASCII(sAlignStrings[i])) { +- return (i + SVG_PRESERVEASPECTRATIO_NONE); ++ return (i + SVG_ALIGN_MIN_VALID); + } + } + +@@ -65,12 +65,11 @@ static void + GetAlignString(nsAString& aAlignString, uint16_t aAlign) + { + NS_ASSERTION( +- aAlign >= SVG_PRESERVEASPECTRATIO_NONE && +- aAlign <= SVG_PRESERVEASPECTRATIO_XMAXYMAX, ++ aAlign >= SVG_ALIGN_MIN_VALID && aAlign <= SVG_ALIGN_MAX_VALID, + "Unknown align"); + + aAlignString.AssignASCII( +- sAlignStrings[aAlign - SVG_PRESERVEASPECTRATIO_NONE]); ++ sAlignStrings[aAlign - SVG_ALIGN_MIN_VALID]); + } + + static uint16_t +@@ -78,7 +77,7 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice) + { + for (uint32_t i = 0 ; i < ArrayLength(sMeetOrSliceStrings) ; i++) { + if (aMeetOrSlice.EqualsASCII(sMeetOrSliceStrings[i])) { +- return (i + SVG_MEETORSLICE_MEET); ++ return (i + SVG_MEETORSLICE_MIN_VALID); + } + } + +@@ -89,12 +88,12 @@ static void + GetMeetOrSliceString(nsAString& aMeetOrSliceString, uint16_t aMeetOrSlice) + { + NS_ASSERTION( +- aMeetOrSlice >= SVG_MEETORSLICE_MEET && +- aMeetOrSlice <= SVG_MEETORSLICE_SLICE, ++ aMeetOrSlice >= SVG_MEETORSLICE_MIN_VALID && ++ aMeetOrSlice <= SVG_MEETORSLICE_MAX_VALID, + "Unknown meetOrSlice"); + + aMeetOrSliceString.AssignASCII( +- sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MEET]); ++ sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MIN_VALID]); + } + + already_AddRefed +@@ -226,7 +225,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString( + GetAlignString(tmpString, mBaseVal.mAlign); + aValueAsString.Append(tmpString); + +- if (mBaseVal.mAlign != SVG_PRESERVEASPECTRATIO_NONE) { ++ if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) { + + aValueAsString.AppendLiteral(" "); + GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice); +diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.h content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +index 61cfba7..b08fb60 100644 +--- mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h ++++ mozilla/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +@@ -42,8 +42,7 @@ public: + void SetBaseValue(const SVGPreserveAspectRatio &aValue, + nsSVGElement *aSVGElement); + nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) { +- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE || +- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) { ++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) { + return NS_ERROR_FAILURE; + } + SetBaseValue(SVGPreserveAspectRatio( +@@ -53,8 +52,8 @@ public: + return NS_OK; + } + nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) { +- if (aMeetOrSlice < SVG_MEETORSLICE_MEET || +- aMeetOrSlice > SVG_MEETORSLICE_SLICE) { ++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID || ++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) { + return NS_ERROR_FAILURE; + } + SetBaseValue(SVGPreserveAspectRatio( +diff --git content/svg/content/src/SVGPreserveAspectRatio.h content/svg/content/src/SVGPreserveAspectRatio.h +index 066ad52..ebe724e 100644 +--- mozilla/content/svg/content/src/SVGPreserveAspectRatio.h ++++ mozilla/content/svg/content/src/SVGPreserveAspectRatio.h +@@ -28,6 +28,11 @@ enum SVGAlign MOZ_ENUM_TYPE(uint8_t) { + SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10 + }; + ++// These constants represent the range of valid enum values for the ++// parameter. They exclude the sentinel _UNKNOWN value. ++const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE; ++const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX; ++ + // Meet-or-slice Types + enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) { + SVG_MEETORSLICE_UNKNOWN = 0, +@@ -35,6 +40,11 @@ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) { + SVG_MEETORSLICE_SLICE = 2 + }; + ++// These constants represent the range of valid enum values for the ++// parameter. They exclude the sentinel _UNKNOWN value. ++const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET; ++const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE; ++ + class SVGAnimatedPreserveAspectRatio; + + class SVGPreserveAspectRatio MOZ_FINAL +@@ -57,8 +67,7 @@ public: + {} + + nsresult SetAlign(uint16_t aAlign) { +- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE || +- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) ++ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) + return NS_ERROR_FAILURE; + mAlign = static_cast(aAlign); + return NS_OK; +@@ -69,8 +78,8 @@ public: + } + + nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) { +- if (aMeetOrSlice < SVG_MEETORSLICE_MEET || +- aMeetOrSlice > SVG_MEETORSLICE_SLICE) ++ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID || ++ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) + return NS_ERROR_FAILURE; + mMeetOrSlice = static_cast(aMeetOrSlice); + return NS_OK; Added: trunk/www/seamonkey/files/patch-bug836824 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/seamonkey/files/patch-bug836824 Tue Feb 26 04:18:43 2013 (r1192) @@ -0,0 +1,33 @@ +commit 35107a0 (HEAD) +Author: Paul Adenot +Date: Mon Feb 4 20:21:19 2013 +0100 + + Bug 836824 - libsoundtouch fails to build due to __get_cpuid() invocation, if you don't have xcode command line tools. r= +--- + media/libsoundtouch/moz-libsoundtouch.patch | 24 ++++++++++++++++++++++++ + media/libsoundtouch/src/cpu_detect_x86.cpp | 5 ++++- + 2 files changed, 28 insertions(+), 1 deletion(-) + +diff --git media/libsoundtouch/src/cpu_detect_x86.cpp media/libsoundtouch/src/cpu_detect_x86.cpp +index a42008e..7a31aa9 100644 +--- mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp ++++ mozilla/media/libsoundtouch/src/cpu_detect_x86.cpp +@@ -101,7 +101,7 @@ uint detectCPUextensions(void) + + uint res = 0; + +-#if defined(__GNUC__) ++#if defined(__GNUC__) && defined(HAVE_CPUID_H) + // GCC version of cpuid. Requires GCC 4.3.0 or later for __cpuid intrinsic support. + uint eax, ebx, ecx, edx; // unsigned int is the standard type. uint is defined by the compiler and not guaranteed to be portable. + +@@ -112,6 +112,9 @@ uint detectCPUextensions(void) + if (edx & bit_SSE) res = res | SUPPORT_SSE; + if (edx & bit_SSE2) res = res | SUPPORT_SSE2; + ++#elif defined(__GNUC__) ++ // No cpuid.h --> no cpuid support ++ return 0; + #else + // Window / VS version of cpuid. Notice that Visual Studio 2005 or later required + // for __cpuid intrinsic support. From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 26 13:10:34 2013 Return-Path: Delivered-To: gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 21FD165F for ; Tue, 26 Feb 2013 13:10:34 +0000 (UTC) (envelope-from bounces+73574-7089-gecko=freebsd.org@sendgrid.me) Received: from o3.shared.sendgrid.net (o3.shared.sendgrid.net [208.117.48.85]) by mx1.freebsd.org (Postfix) with SMTP id C5C5D1E2 for ; Tue, 26 Feb 2013 13:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from :mime-version:to:subject:content-type:content-transfer-encoding; s=smtpapi; bh=CSmJAvln0fyLsSsFDUvAf/Yd6Ho=; b=vHGqcw/t3JOEk7U9t ROmytKXnXuZ2n04uVUKVCjNwps0Go4m9cPFuBPIa+0Vf5q2RDuEm2RiVCI/ZbPkN NUb2wrDXQn/C2VYDxCT2VOXLH/RPfAokfUibqt5nDnMS/c7xP1cs10uJOHt3ArK1 uRYNN2vdZGZBQnCoXPR32kH5I0= Received: by 10.37.85.72 with SMTP id mf94.6611.512CB448B Tue, 26 Feb 2013 07:10:32 -0600 (CST) Received: from mail.tarsnap.com (unknown [10.60.208.15]) by mi19 (SG) with ESMTP id 512cb448.20d9.5d7600 for ; Tue, 26 Feb 2013 07:10:32 -0600 (CST) Received: (qmail 35102 invoked from network); 26 Feb 2013 13:10:31 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 26 Feb 2013 13:10:31 -0000 Received: (qmail 41221 invoked from network); 26 Feb 2013 13:09:45 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 26 Feb 2013 13:09:45 -0000 Message-ID: <512CB419.6010705@freebsd.org> Date: Tue, 26 Feb 2013 05:09:45 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130131 Thunderbird/17.0.2 MIME-Version: 1.0 To: gecko@FreeBSD.org, Ports Management Team Subject: request: limit patch file names to 100 characters X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: xuJRKdYmKpTN+zMpf9lf9PodWoWR4XjkcvZVKbiMpfkNI5pg3uMp30itW4TUt0170Tm7hE6DFcg5IJtOD1h/I4b0L8WSHzqC+AwS9MnVaR7ZyjTMz1qFq0jhSMDhw2uV X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 13:10:34 -0000 Hi all, I just uncovered a slight glitch in portsnap while doing my latest testing: It has problems with the www/seamonkey port due to the patch file "patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc". More precisely, because this file name is 107 characters long, it can't fit into a ustar header, so bsdtar switches to the pax extended format, which contains additional information like the access time and inode #, which of course changes from run to run of the portsnap build code. As a result, this one port is identified as "changing" every single time the build runs. Gecko folks, would you mind renaming this to something shorter? Portmgr, can we have a policy of "no file names over 100 characters"? I can work around this by hacking up the copy of tar on the portsnap buildbox to exclude the changing fields, but I'd prefer to minimize the hurdles facing anyone else who wants to use the portsnap build code. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 26 14:17:52 2013 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7444E580; Tue, 26 Feb 2013 14:17:52 +0000 (UTC) (envelope-from miwi@bsdhash.org) Received: from bsdhash.org (bsdhash.org [94.23.250.27]) by mx1.freebsd.org (Postfix) with ESMTP id 175A574F; Tue, 26 Feb 2013 14:17:52 +0000 (UTC) Received: by bsdhash.org (Postfix, from userid 1002) id 7951251135; Tue, 26 Feb 2013 22:17:50 +0800 (MYT) Date: Tue, 26 Feb 2013 22:17:50 +0800 From: Martin Wilke To: Colin Percival Subject: Re: request: limit patch file names to 100 characters Message-ID: <20130226141750.GC2419@bsdhash.org> References: <512CB419.6010705@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed In-Reply-To: <512CB419.6010705@freebsd.org> X-Editor: Vim http://www.vim.org/ X-Mailer: Mutt http://www.mutt.org/ User-Agent: Mutt/1.5.21 (2010-09-15) Cc: gecko@FreeBSD.org, Ports Management Team X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Martin Wilke List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 14:17:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Feb 26, 2013 at 05:09:45AM -0800, Colin Percival wrote: > Hi all, > > I just uncovered a slight glitch in portsnap while doing my latest testing: > It has problems with the www/seamonkey port due to the patch file > "patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc". > > More precisely, because this file name is 107 characters long, it can't fit > into a ustar header, so bsdtar switches to the pax extended format, which > contains additional information like the access time and inode #, which of > course changes from run to run of the portsnap build code. As a result, this > one port is identified as "changing" every single time the build runs. > > Gecko folks, would you mind renaming this to something shorter? > > Portmgr, can we have a policy of "no file names over 100 characters"? > I think that should be fine. > I can work around this by hacking up the copy of tar on the portsnap buildbox > to exclude the changing fields, but I'd prefer to minimize the hurdles facing > anyone else who wants to use the portsnap build code. > > -- > Colin Percival > Security Officer Emeritus, FreeBSD | The power to serve > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid > - -- +-----------------oOO--(_)--OOo-------------------------+ With best Regards, Martin Wilke (miwi_(at)_FreeBSD.org) Mess with the Best, Die like the Rest -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEsxA0ACgkQdLJIhLHm/OmwTACeNe3Ibz9qiM0ZovRjiXEdTVFj JEwAn05tk1JZtsxEDo+gzTm/ZQfESuEN =EjyN -----END PGP SIGNATURE----- From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 26 14:38:17 2013 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5D355DC0; Tue, 26 Feb 2013 14:38:17 +0000 (UTC) (envelope-from miwi@bsdhash.org) Received: from bsdhash.org (bsdhash.org [94.23.250.27]) by mx1.freebsd.org (Postfix) with ESMTP id C784C842; Tue, 26 Feb 2013 14:38:16 +0000 (UTC) Received: by bsdhash.org (Postfix, from userid 1002) id 50BCC51137; Tue, 26 Feb 2013 22:38:15 +0800 (MYT) Date: Tue, 26 Feb 2013 22:38:15 +0800 From: Martin Wilke To: Colin Percival Subject: Re: request: limit patch file names to 100 characters Message-ID: <20130226143815.GD2419@bsdhash.org> References: <512CB419.6010705@freebsd.org> <20130226141750.GC2419@bsdhash.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed In-Reply-To: <20130226141750.GC2419@bsdhash.org> X-Editor: Vim http://www.vim.org/ X-Mailer: Mutt http://www.mutt.org/ User-Agent: Mutt/1.5.21 (2010-09-15) Cc: gecko@FreeBSD.org, Ports Management Team X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Martin Wilke List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 14:38:17 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, Feb 26, 2013 at 10:17:50PM +0800, Martin Wilke wrote: > On Tue, Feb 26, 2013 at 05:09:45AM -0800, Colin Percival wrote: > > Hi all, > > > > I just uncovered a slight glitch in portsnap while doing my latest testing: > > It has problems with the www/seamonkey port due to the patch file > > "patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc". > > > > More precisely, because this file name is 107 characters long, it can't fit > > into a ustar header, so bsdtar switches to the pax extended format, which > > contains additional information like the access time and inode #, which of > > course changes from run to run of the portsnap build code. As a result, this > > one port is identified as "changing" every single time the build runs. > > > > Gecko folks, would you mind renaming this to something shorter? Done! > > > > Portmgr, can we have a policy of "no file names over 100 characters"? > > > > > I think that should be fine. > > > > I can work around this by hacking up the copy of tar on the portsnap buildbox > > to exclude the changing fields, but I'd prefer to minimize the hurdles facing > > anyone else who wants to use the portsnap build code. > > > > > -- > > Colin Percival > > Security Officer Emeritus, FreeBSD | The power to serve > > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid > > > > -- > +-----------------oOO--(_)--OOo-------------------------+ > With best Regards, > Martin Wilke (miwi_(at)_FreeBSD.org) > > > Mess with the Best, Die like the Rest > > > - -- +-----------------oOO--(_)--OOo-------------------------+ With best Regards, Martin Wilke (miwi_(at)_FreeBSD.org) Mess with the Best, Die like the Rest -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlEsyNYACgkQdLJIhLHm/OlnUACeJ6xS09zX3rj1+5KpbCoBsyMQ 7q4AnifBw7Sz3MSvauqxIgt2Rqu9SOvt =mwDU -----END PGP SIGNATURE----- From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 26 19:28:22 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2ED5F7DF for ; Tue, 26 Feb 2013 19:28:22 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id AFF281AAE for ; Tue, 26 Feb 2013 19:28:21 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1QJSJHQ098421 for ; Tue, 26 Feb 2013 19:28:19 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1QJSEM9097629 for freebsd-gecko@freebsd.org; Tue, 26 Feb 2013 19:28:14 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Tue, 26 Feb 2013 19:28:14 GMT Message-Id: <201302261928.r1QJSEM9097629@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1193 - in trunk: mail/thunderbird/files www/seamonkey/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 19:28:22 -0000 Author: flo Date: Tue Feb 26 19:28:14 2013 New Revision: 1193 Log: Patch file names should not be longer than 100 characters. The same was done in ports svn for www/seamonkey Added: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc - copied unchanged from r1192, trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc - copied unchanged from r1192, trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Deleted: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Copied: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc (from r1192, trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc Tue Feb 26 19:28:14 2013 (r1193, copy of r1192, trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc) @@ -0,0 +1,37 @@ +--- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ ++++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc +@@ -31,6 +31,10 @@ + #include + #endif + ++#ifdef __FreeBSD__ ++#include ++#endif ++ + // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. + using namespace webrtc; + +@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { + + inline static const char *GetDllError() { + #ifdef WEBRTC_LINUX ++#if __FreeBSD_version < 800505 ++ const char *err = dlerror(); ++#else + char *err = dlerror(); ++#endif + if (err) { + return err; + } else { +@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, + void **symbol) { + #ifdef WEBRTC_LINUX + *symbol = dlsym(handle, symbol_name); ++#if __FreeBSD_version < 800505 ++ const char *err = dlerror(); ++#else + char *err = dlerror(); ++#endif + if (err) { + WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, + "Error loading symbol %s : %d", symbol_name, err); Deleted: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Tue Feb 26 19:28:14 2013 (r1192) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,37 +0,0 @@ ---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ -+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc -@@ -31,6 +31,10 @@ - #include - #endif - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. - using namespace webrtc; - -@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { - - inline static const char *GetDllError() { - #ifdef WEBRTC_LINUX -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - return err; - } else { -@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, - void **symbol) { - #ifdef WEBRTC_LINUX - *symbol = dlsym(handle, symbol_name); -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - "Error loading symbol %s : %d", symbol_name, err); Copied: trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc (from r1192, trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc Tue Feb 26 19:28:14 2013 (r1193, copy of r1192, trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc) @@ -0,0 +1,37 @@ +--- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ ++++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc +@@ -31,6 +31,10 @@ + #include + #endif + ++#ifdef __FreeBSD__ ++#include ++#endif ++ + // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. + using namespace webrtc; + +@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { + + inline static const char *GetDllError() { + #ifdef WEBRTC_LINUX ++#if __FreeBSD_version < 800505 ++ const char *err = dlerror(); ++#else + char *err = dlerror(); ++#endif + if (err) { + return err; + } else { +@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, + void **symbol) { + #ifdef WEBRTC_LINUX + *symbol = dlsym(handle, symbol_name); ++#if __FreeBSD_version < 800505 ++ const char *err = dlerror(); ++#else + char *err = dlerror(); ++#endif + if (err) { + WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, + "Error loading symbol %s : %d", symbol_name, err); Deleted: trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Tue Feb 26 19:28:14 2013 (r1192) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,37 +0,0 @@ ---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ -+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc -@@ -31,6 +31,10 @@ - #include - #endif - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. - using namespace webrtc; - -@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { - - inline static const char *GetDllError() { - #ifdef WEBRTC_LINUX -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - return err; - } else { -@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, - void **symbol) { - #ifdef WEBRTC_LINUX - *symbol = dlsym(handle, symbol_name); -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - "Error loading symbol %s : %d", symbol_name, err); From owner-freebsd-gecko@FreeBSD.ORG Wed Feb 27 08:29:19 2013 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 75DFB20D; Wed, 27 Feb 2013 08:29:19 +0000 (UTC) (envelope-from ml@netfence.it) Received: from smtp.eutelia.it (mp1-smtp-2.eutelia.it [62.94.10.162]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF24F8; Wed, 27 Feb 2013 08:29:18 +0000 (UTC) Received: from ns2.biolchim.it (ip-188-188.sn2.eutelia.it [83.211.188.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eutelia.it (Eutelia) with ESMTP id 94CF9CAEAC; Wed, 27 Feb 2013 09:29:16 +0100 (CET) Received: from soth.ventu (adsl-ull-238-253.41-151.net24.it [151.41.253.238]) (authenticated bits=0) by ns2.biolchim.it (8.14.6/8.14.6) with ESMTP id r1R8T6gv023514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 27 Feb 2013 09:29:10 +0100 (CET) (envelope-from ml@netfence.it) Received: from alamar.ventu (alamar.ventu [10.1.2.18]) by soth.ventu (8.14.6/8.14.5) with ESMTP id r1R8Swxw003347; Wed, 27 Feb 2013 09:28:58 +0100 (CET) (envelope-from ml@netfence.it) Message-ID: <512DC3CA.3070207@netfence.it> Date: Wed, 27 Feb 2013 09:28:58 +0100 From: Andrea Venturoli User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 MIME-Version: 1.0 To: gecko@FreeBSD.org, ports@freebsd.org Subject: Re: Firefox upgrade fails References: <51260890.6030807@netfence.it> <51274D65.3060900@FreeBSD.org> In-Reply-To: <51274D65.3060900@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 X-Scanned-By: MIMEDefang 2.73 on 10.1.2.13 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ns2.biolchim.it [192.168.2.203]); Wed, 27 Feb 2013 09:29:11 +0100 (CET) Cc: tmueller@sysgo.com, Dimitry Andric X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 08:29:19 -0000 On 02/22/13 11:50, Dimitry Andric wrote: > In any case, this looks like Firefox is attempting to use profile guided > optimization (via -fprofile-generate, etc), which is currently not > supported. Try turning it off. I never enabled this... > Disable PGO I thought I'd try this, but see below; however I would be curious why it suddenly stopped working... > or build with GCC (I used "make USE_GCC=4.6+"). I thought I was using GCC... Anyway, the next day, after another update of the port tree, compilation went fine. Thanks to all av. From owner-freebsd-gecko@FreeBSD.ORG Wed Feb 27 14:06:32 2013 Return-Path: Delivered-To: gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 81ED1B4C for ; Wed, 27 Feb 2013 14:06:32 +0000 (UTC) (envelope-from portscout@portscout.freebsd.org) Received: from null.zi0r.com (null.zi0r.com [71.245.171.204]) by mx1.freebsd.org (Postfix) with ESMTP id 4342E28D for ; Wed, 27 Feb 2013 14:06:32 +0000 (UTC) Received: from null.zi0r.com (localhost [127.0.0.1]) by null.zi0r.com (8.14.5/8.14.5) with ESMTP id r1RE6QXf050931 for ; Wed, 27 Feb 2013 09:06:26 -0500 (EST) (envelope-from portscout@null.zi0r.com) Received: (from portscout@localhost) by null.zi0r.com (8.14.5/8.14.5/Submit) id r1RE6QGI050812; Wed, 27 Feb 2013 09:06:26 -0500 (EST) (envelope-from portscout) Message-Id: <201302271406.r1RE6QGI050812@null.zi0r.com> MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain Date: Wed, 27 Feb 2013 09:06:26 -0500 From: portscout@portscout.freebsd.org To: gecko@freebsd.org Subject: FreeBSD ports you maintain which are out of date X-Mailer: portscout/0.8.1 X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 14:06:32 -0000 Dear port maintainer, The portscout new distfile checker has detected that one or more of your ports appears to be out of date. Please take the opportunity to check each of the ports listed below, and if possible and appropriate, submit/commit an update. If any ports have already been updated, you can safely ignore the entry. You will not be e-mailed again for any of the port/version combinations below. Full details can be found at the following URL: http://portscout.freebsd.org/gecko@freebsd.org.html Port | Current version | New version ------------------------------------------------+-----------------+------------ www/xpi-tabmixplus | 0.4.0.4 | 0.4.0.5 ------------------------------------------------+-----------------+------------ If any of the above results are invalid, please check the following page for details on how to improve portscout's detection and selection of distfiles on a per-port basis: http://portscout.freebsd.org/info/portscout-portconfig.txt If wish to stop receiving portscout reminders, please contact portscout@portscout.freebsd.org Thanks. From owner-freebsd-gecko@FreeBSD.ORG Wed Feb 27 23:32:58 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5B943C65 for ; Wed, 27 Feb 2013 23:32:58 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id D0140A60 for ; Wed, 27 Feb 2013 23:32:57 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1RNWoMT008232 for ; Wed, 27 Feb 2013 23:32:50 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1RNWjZl006737 for freebsd-gecko@freebsd.org; Wed, 27 Feb 2013 23:32:45 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Wed, 27 Feb 2013 23:32:45 GMT Message-Id: <201302272332.r1RNWjZl006737@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1194 - in trunk/www: firefox firefox-nightly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2013 23:32:58 -0000 Author: jbeich Date: Wed Feb 27 23:32:44 2013 New Revision: 1194 Log: update Modified: trunk/www/firefox-nightly/Makefile.hgrev trunk/www/firefox-nightly/distinfo trunk/www/firefox/Makefile trunk/www/firefox/distinfo Modified: trunk/www/firefox-nightly/Makefile.hgrev ============================================================================== --- trunk/www/firefox-nightly/Makefile.hgrev Tue Feb 26 19:28:14 2013 (r1193) +++ trunk/www/firefox-nightly/Makefile.hgrev Wed Feb 27 23:32:44 2013 (r1194) @@ -1 +1 @@ -HGREV= 122889:73f0c5b00572 +HGREV= 123148:0a91da5f5eab Modified: trunk/www/firefox-nightly/distinfo ============================================================================== --- trunk/www/firefox-nightly/distinfo Tue Feb 26 19:28:14 2013 (r1193) +++ trunk/www/firefox-nightly/distinfo Wed Feb 27 23:32:44 2013 (r1194) @@ -1,2 +1,2 @@ -SHA256 (firefox-nightly/73f0c5b00572.tar.bz2) = 312f9b740ae089ebb5f922dc37033c47a1e70e1cb643a67f050d751fefea381a -SIZE (firefox-nightly/73f0c5b00572.tar.bz2) = 104060373 +SHA256 (firefox-nightly/0a91da5f5eab.tar.bz2) = b0ae0f9749bef1bbcc3caaffa6a3795e3f9c61d5c8718585a71a8d4042d0ddfc +SIZE (firefox-nightly/0a91da5f5eab.tar.bz2) = 104132598 Modified: trunk/www/firefox/Makefile ============================================================================== --- trunk/www/firefox/Makefile Tue Feb 26 19:28:14 2013 (r1193) +++ trunk/www/firefox/Makefile Wed Feb 27 23:32:44 2013 (r1194) @@ -2,7 +2,7 @@ # $FreeBSD: head/www/firefox/Makefile 310227 2013-01-11 10:22:40Z ehaupt $ PORTNAME= firefox -DISTVERSION= 20.0b1 +DISTVERSION= 20.0b2 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} Modified: trunk/www/firefox/distinfo ============================================================================== --- trunk/www/firefox/distinfo Tue Feb 26 19:28:14 2013 (r1193) +++ trunk/www/firefox/distinfo Wed Feb 27 23:32:44 2013 (r1194) @@ -1,2 +1,2 @@ -SHA256 (firefox-20.0b1.source.tar.bz2) = 53c83d8127c8af5a3c19e2b04f8241d1fa373f702ee1c7d38743d8281a843880 -SIZE (firefox-20.0b1.source.tar.bz2) = 99995547 +SHA256 (firefox-20.0b2.source.tar.bz2) = 40dc7947130cdedf3c6e762fa3270cd42ef8d24ddfd3d212e08b75406dddd88a +SIZE (firefox-20.0b2.source.tar.bz2) = 100014190 From owner-freebsd-gecko@FreeBSD.ORG Thu Feb 28 13:52:56 2013 Return-Path: Delivered-To: gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 51FD1C90 for ; Thu, 28 Feb 2013 13:52:56 +0000 (UTC) (envelope-from portscout@portscout.freebsd.org) Received: from null.zi0r.com (null.zi0r.com [71.245.171.204]) by mx1.freebsd.org (Postfix) with ESMTP id 1767E6B8 for ; Thu, 28 Feb 2013 13:52:56 +0000 (UTC) Received: from null.zi0r.com (localhost [127.0.0.1]) by null.zi0r.com (8.14.5/8.14.5) with ESMTP id r1SDqtul041248 for ; Thu, 28 Feb 2013 08:52:55 -0500 (EST) (envelope-from portscout@null.zi0r.com) Received: (from portscout@localhost) by null.zi0r.com (8.14.5/8.14.5/Submit) id r1SDqtNJ041191; Thu, 28 Feb 2013 08:52:55 -0500 (EST) (envelope-from portscout) Message-Id: <201302281352.r1SDqtNJ041191@null.zi0r.com> MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain Date: Thu, 28 Feb 2013 08:52:55 -0500 From: portscout@portscout.freebsd.org To: gecko@freebsd.org Subject: FreeBSD ports you maintain which are out of date X-Mailer: portscout/0.8.1 X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2013 13:52:56 -0000 Dear port maintainer, The portscout new distfile checker has detected that one or more of your ports appears to be out of date. Please take the opportunity to check each of the ports listed below, and if possible and appropriate, submit/commit an update. If any ports have already been updated, you can safely ignore the entry. You will not be e-mailed again for any of the port/version combinations below. Full details can be found at the following URL: http://portscout.freebsd.org/gecko@freebsd.org.html Port | Current version | New version ------------------------------------------------+-----------------+------------ www/xpi-greasemonkey | 1.7.1 | 1.8 ------------------------------------------------+-----------------+------------ If any of the above results are invalid, please check the following page for details on how to improve portscout's detection and selection of distfiles on a per-port basis: http://portscout.freebsd.org/info/portscout-portconfig.txt If wish to stop receiving portscout reminders, please contact portscout@portscout.freebsd.org Thanks. From owner-freebsd-gecko@FreeBSD.ORG Fri Mar 1 05:12:11 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8889FCFB for ; Fri, 1 Mar 2013 05:12:11 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id C322C817 for ; Fri, 1 Mar 2013 05:12:10 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r215C3YT015891 for ; Fri, 1 Mar 2013 05:12:03 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r215BvlC009534 for freebsd-gecko@freebsd.org; Fri, 1 Mar 2013 05:11:57 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Fri, 1 Mar 2013 05:11:57 GMT Message-Id: <201303010511.r215BvlC009534@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1195 - in trunk: . Mk mail/thunderbird-esr/files mail/thunderbird/files security/nss www/firefox www/firefox-esr www/firefox-esr/files www/firefox-nightly www/firefox-nightly/files www/firefox/files www/libxul/files www/seamonkey/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2013 05:12:11 -0000 Author: jbeich Date: Fri Mar 1 05:11:57 2013 New Revision: 1195 Log: prune legacy support for FreeBSD < 8.3/9.0 Deleted: trunk/mail/thunderbird-esr/files/patch-mozilla-content-media-nsAudioStream.cpp trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp trunk/mail/thunderbird/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h trunk/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc trunk/mail/thunderbird/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c trunk/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp trunk/www/firefox-nightly/files/patch-content-media-AudioStream.cpp trunk/www/firefox-nightly/files/patch-gfx-ots-include-opentype-sanitiser.h trunk/www/firefox-nightly/files/patch-ipc-chromium-src-base-platform_thread_posix.cc trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc trunk/www/firefox-nightly/files/patch-python-psutil-psutil-_psutil_bsd.c trunk/www/firefox/files/patch-content-media-AudioStream.cpp trunk/www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h trunk/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc trunk/www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc trunk/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc trunk/www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp trunk/www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h trunk/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc trunk/www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c Modified: trunk/Gecko_ChangeLog trunk/Mk/bsd.gecko.mk trunk/mail/thunderbird-esr/files/patch-bug753046 trunk/security/nss/Makefile trunk/www/firefox-esr/files/patch-bug753046 trunk/www/firefox-esr/pkg-message trunk/www/firefox-nightly/pkg-message trunk/www/firefox/pkg-message trunk/www/libxul/files/patch-bug753046 Modified: trunk/Gecko_ChangeLog ============================================================================== --- trunk/Gecko_ChangeLog Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/Gecko_ChangeLog Fri Mar 1 05:11:57 2013 (r1195) @@ -0,0 +1,3 @@ +20.0: +- prune support for old FreeBSD versions; users of 8.2, 7.4 or earlier + are advised to upgrade - http://www.freebsd.org/security/ Modified: trunk/Mk/bsd.gecko.mk ============================================================================== --- trunk/Mk/bsd.gecko.mk Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/Mk/bsd.gecko.mk Fri Mar 1 05:11:57 2013 (r1195) @@ -543,13 +543,7 @@ MOZ_OPTIONS+= --prefix="${FAKEDIR}" CPPFLAGS+= -isystem${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib - -.if ${OSVERSION} > 800072 -LDFLAGS+= -Wl,-z,origin -Wl,-rpath,\\\$$\$$ORIGIN -.else -LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH} -.endif +LDFLAGS+= -L${LOCALBASE}/lib -Wl,-z,origin -Wl,-rpath,\\\$$\$$ORIGIN .if ${MOZILLA_VER:R:R} >= 19 || ${MOZILLA:Mseamonkey*} # prefer clang @@ -1032,13 +1026,6 @@ ${TAR} cf - -C${FAKEDIR}/${dir} -s'|${FAKEDIR}|${PREFIX}|s' . | \ ${TAR} xof - -C${PREFIX}/${dir} .endfor -.if (${OSVERSION} < 800081 ) - # XXX: make sure bsdtar(1) corrected symlinks - ${FIND} ${FAKEDIR} -type l -exec \ - ${ECHO_CMD} stat -f \'${LN} -hfs \"%Y\" \"%N\"\' {} + | \ - ${SED} s'|${FAKEDIR}|${PREFIX}|g' | ${SH} | \ - ${SED} -n s'|${FAKEDIR}|${PREFIX}|p' | ${SH} -x -.endif .for pcfile in ${MOZ_PKGCONFIG_FILES} ${INSTALL_DATA} ${FAKEDIR}/libdata/pkgconfig/${pcfile}.pc \ ${PREFIX}/libdata/pkgconfig/${pcfile}.pc Modified: trunk/mail/thunderbird-esr/files/patch-bug753046 ============================================================================== --- trunk/mail/thunderbird-esr/files/patch-bug753046 Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/mail/thunderbird-esr/files/patch-bug753046 Fri Mar 1 05:11:57 2013 (r1195) @@ -460,7 +460,7 @@ --- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc -@@ -9,16 +9,30 @@ +@@ -9,16 +9,24 @@ #if defined(OS_MACOSX) #include @@ -474,13 +474,7 @@ -#include +#elif defined(OS_FREEBSD) +#include -+#if __FreeBSD_version > 802500 +#include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif #endif + +#if !defined(OS_MACOSX) Deleted: trunk/mail/thunderbird-esr/files/patch-mozilla-content-media-nsAudioStream.cpp ============================================================================== --- trunk/mail/thunderbird-esr/files/patch-mozilla-content-media-nsAudioStream.cpp Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,14 +0,0 @@ ---- mozilla/content/media/nsAudioStream.cpp~ -+++ mozilla/content/media/nsAudioStream.cpp -@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref - gVolumeScale = NS_MAX(0, PR_strtod(utf8.get(), nsnull)); - } - } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) { -+#if defined(__FreeBSD__) && __FreeBSD_version < 800097 -+ bool value = Preferences::GetBool(aPref, false); -+#else - bool value = Preferences::GetBool(aPref, true); -+#endif - mozilla::MutexAutoLock lock(*gAudioPrefsLock); - gUseCubeb = value; - } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) { Deleted: trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,11 +0,0 @@ ---- mozilla/content/media/AudioStream.cpp~ -+++ mozilla/content/media/AudioStream.cpp -@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure) - gVolumeScale = NS_MAX(0, PR_strtod(utf8.get(), nullptr)); - } - } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) { --#ifdef MOZ_WIDGET_GONK -+#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097 - bool value = Preferences::GetBool(aPref, false); - #else - bool value = Preferences::GetBool(aPref, true); Deleted: trunk/mail/thunderbird/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,18 +0,0 @@ -diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h -index f42822e..1a5a699 100644 ---- mozilla/gfx/ots/include/opentype-sanitiser.h -+++ mozilla/gfx/ots/include/opentype-sanitiser.h -@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t; - #include - #endif - -+#ifdef __FreeBSD__ -+# include -+# if __FreeBSD_version < 800067 -+# include // for off_t -+# endif -+#endif -+ - #include // for std::min - #include - #include Deleted: trunk/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc~ -+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc -@@ -16,7 +16,13 @@ - #include - #elif defined(OS_FREEBSD) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if !defined(OS_MACOSX) Deleted: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,37 +0,0 @@ ---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ -+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc -@@ -31,6 +31,10 @@ - #include - #endif - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. - using namespace webrtc; - -@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { - - inline static const char *GetDllError() { - #ifdef WEBRTC_LINUX -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - return err; - } else { -@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, - void **symbol) { - #ifdef WEBRTC_LINUX - *symbol = dlsym(handle, symbol_name); -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - "Error loading symbol %s : %d", symbol_name, err); Deleted: trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- mozilla/media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~ -+++ mozilla/media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc -@@ -62,7 +62,13 @@ - #include - #elif defined(__FreeBSD__) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if defined(WEBRTC_BSD) && !defined(__NetBSD__) Deleted: trunk/mail/thunderbird/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c ============================================================================== --- trunk/mail/thunderbird/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,13 +0,0 @@ ---- mozilla/python/psutil/psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800 -+++ mozilla/python/psutil/psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800 -@@ -1376,8 +1376,10 @@ - strlcat(opts, ",noclusterr", sizeof(opts)); - if (flags & MNT_NOCLUSTERW) - strlcat(opts, ",noclusterw", sizeof(opts)); -+#if __FreeBSD_version >= 800000 - if (flags & MNT_NFS4ACLS) - strlcat(opts, ",nfs4acls", sizeof(opts)); -+#endif - - py_tuple = Py_BuildValue("(ssss)", fs[i].f_mntfromname, // device - fs[i].f_mntonname, // mount point Modified: trunk/security/nss/Makefile ============================================================================== --- trunk/security/nss/Makefile Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/security/nss/Makefile Fri Mar 1 05:11:57 2013 (r1195) @@ -58,10 +58,6 @@ .if defined(WITH_CLANG_IS_CC) || ${CC:Mcc} && ${OSVERSION} > 1000023 EXTRA_PATCHES+= ${FILESDIR}/extra-bug835050 .endif -.if ${CC:Mcc} && (${OSVERSION} >= 800000 && ${OSVERSION} < 802503 \ - || ${OSVERSION} < 704101) -USE_GCC?= yes # -mssse3 -.endif .endif check regression-test test: Modified: trunk/www/firefox-esr/files/patch-bug753046 ============================================================================== --- trunk/www/firefox-esr/files/patch-bug753046 Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/www/firefox-esr/files/patch-bug753046 Fri Mar 1 05:11:57 2013 (r1195) @@ -460,7 +460,7 @@ --- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/platform_thread_posix.cc -@@ -9,16 +9,30 @@ +@@ -9,16 +9,24 @@ #if defined(OS_MACOSX) #include @@ -474,13 +474,7 @@ -#include +#elif defined(OS_FREEBSD) +#include -+#if __FreeBSD_version > 802500 +#include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif #endif + +#if !defined(OS_MACOSX) Deleted: trunk/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp ============================================================================== --- trunk/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,14 +0,0 @@ ---- content/media/nsAudioStream.cpp~ -+++ content/media/nsAudioStream.cpp -@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref - gVolumeScale = NS_MAX(0, PR_strtod(utf8.get(), nsnull)); - } - } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) { -+#if defined(__FreeBSD__) && __FreeBSD_version < 800097 -+ bool value = Preferences::GetBool(aPref, false); -+#else - bool value = Preferences::GetBool(aPref, true); -+#endif - mozilla::MutexAutoLock lock(*gAudioPrefsLock); - gUseCubeb = value; - } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) { Modified: trunk/www/firefox-esr/pkg-message ============================================================================== --- trunk/www/firefox-esr/pkg-message Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/www/firefox-esr/pkg-message Fri Mar 1 05:11:57 2013 (r1195) @@ -17,7 +17,7 @@ Firefox and HTML5 Certain functions used to display HTML5 elements need the sem module -on 7.x and 8.x releases. +only on 8.x releases. If your Firefox crashes with the following message while viewing a HTML5 page: Deleted: trunk/www/firefox-nightly/files/patch-content-media-AudioStream.cpp ============================================================================== --- trunk/www/firefox-nightly/files/patch-content-media-AudioStream.cpp Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,11 +0,0 @@ ---- content/media/AudioStream.cpp~ -+++ content/media/AudioStream.cpp -@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure) - gVolumeScale = NS_MAX(0, PR_strtod(utf8.get(), nullptr)); - } - } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) { --#ifdef MOZ_WIDGET_GONK -+#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097 - bool value = Preferences::GetBool(aPref, false); - #else - bool value = Preferences::GetBool(aPref, true); Deleted: trunk/www/firefox-nightly/files/patch-gfx-ots-include-opentype-sanitiser.h ============================================================================== --- trunk/www/firefox-nightly/files/patch-gfx-ots-include-opentype-sanitiser.h Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,18 +0,0 @@ -diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h -index f42822e..1a5a699 100644 ---- gfx/ots/include/opentype-sanitiser.h -+++ gfx/ots/include/opentype-sanitiser.h -@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t; - #include - #endif - -+#ifdef __FreeBSD__ -+# include -+# if __FreeBSD_version < 800067 -+# include // for off_t -+# endif -+#endif -+ - #include // for std::min - #include - #include Deleted: trunk/www/firefox-nightly/files/patch-ipc-chromium-src-base-platform_thread_posix.cc ============================================================================== --- trunk/www/firefox-nightly/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- ipc/chromium/src/base/platform_thread_posix.cc~ -+++ ipc/chromium/src/base/platform_thread_posix.cc -@@ -16,7 +16,13 @@ - #include - #elif defined(OS_FREEBSD) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if !defined(OS_MACOSX) Deleted: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc ============================================================================== --- trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,37 +0,0 @@ ---- media/webrtc/trunk/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc~ -+++ media/webrtc/trunk/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc -@@ -31,6 +31,10 @@ - #include - #endif - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. - using namespace webrtc; - -@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { - - inline static const char *GetDllError() { - #ifdef WEBRTC_LINUX -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - return err; - } else { -@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, - void **symbol) { - #ifdef WEBRTC_LINUX - *symbol = dlsym(handle, symbol_name); -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - "Error loading symbol %s : %d", symbol_name, err); Deleted: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc ============================================================================== --- trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc~ -+++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc -@@ -62,7 +62,13 @@ - #include - #elif defined(__FreeBSD__) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if defined(WEBRTC_BSD) && !defined(__NetBSD__) Deleted: trunk/www/firefox-nightly/files/patch-python-psutil-psutil-_psutil_bsd.c ============================================================================== --- trunk/www/firefox-nightly/files/patch-python-psutil-psutil-_psutil_bsd.c Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,13 +0,0 @@ ---- python/psutil/psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800 -+++ python/psutil/psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800 -@@ -1376,8 +1376,10 @@ - strlcat(opts, ",noclusterr", sizeof(opts)); - if (flags & MNT_NOCLUSTERW) - strlcat(opts, ",noclusterw", sizeof(opts)); -+#if __FreeBSD_version >= 800000 - if (flags & MNT_NFS4ACLS) - strlcat(opts, ",nfs4acls", sizeof(opts)); -+#endif - - py_tuple = Py_BuildValue("(ssss)", fs[i].f_mntfromname, // device - fs[i].f_mntonname, // mount point Modified: trunk/www/firefox-nightly/pkg-message ============================================================================== --- trunk/www/firefox-nightly/pkg-message Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/www/firefox-nightly/pkg-message Fri Mar 1 05:11:57 2013 (r1195) @@ -17,7 +17,7 @@ Firefox and HTML5 Certain functions used to display HTML5 elements need the sem module -on 7.x and 8.x releases. +only on 8.x releases. If your Firefox crashes with the following message while viewing a HTML5 page: Deleted: trunk/www/firefox/files/patch-content-media-AudioStream.cpp ============================================================================== --- trunk/www/firefox/files/patch-content-media-AudioStream.cpp Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,11 +0,0 @@ ---- content/media/AudioStream.cpp~ -+++ content/media/AudioStream.cpp -@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure) - gVolumeScale = NS_MAX(0, PR_strtod(utf8.get(), nullptr)); - } - } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) { --#ifdef MOZ_WIDGET_GONK -+#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097 - bool value = Preferences::GetBool(aPref, false); - #else - bool value = Preferences::GetBool(aPref, true); Deleted: trunk/www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h ============================================================================== --- trunk/www/firefox/files/patch-gfx-ots-include-opentype-sanitiser.h Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,18 +0,0 @@ -diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h -index f42822e..1a5a699 100644 ---- gfx/ots/include/opentype-sanitiser.h -+++ gfx/ots/include/opentype-sanitiser.h -@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t; - #include - #endif - -+#ifdef __FreeBSD__ -+# include -+# if __FreeBSD_version < 800067 -+# include // for off_t -+# endif -+#endif -+ - #include // for std::min - #include - #include Deleted: trunk/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc ============================================================================== --- trunk/www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- ipc/chromium/src/base/platform_thread_posix.cc~ -+++ ipc/chromium/src/base/platform_thread_posix.cc -@@ -16,7 +16,13 @@ - #include - #elif defined(OS_FREEBSD) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if !defined(OS_MACOSX) Deleted: trunk/www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc ============================================================================== --- trunk/www/firefox/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,37 +0,0 @@ ---- media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ -+++ media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc -@@ -31,6 +31,10 @@ - #include - #endif - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. - using namespace webrtc; - -@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { - - inline static const char *GetDllError() { - #ifdef WEBRTC_LINUX -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - return err; - } else { -@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, - void **symbol) { - #ifdef WEBRTC_LINUX - *symbol = dlsym(handle, symbol_name); -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - "Error loading symbol %s : %d", symbol_name, err); Deleted: trunk/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc ============================================================================== --- trunk/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~ -+++ media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc -@@ -62,7 +62,13 @@ - #include - #elif defined(__FreeBSD__) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if defined(WEBRTC_BSD) && !defined(__NetBSD__) Deleted: trunk/www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c ============================================================================== --- trunk/www/firefox/files/patch-python-psutil-psutil-_psutil_bsd.c Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,13 +0,0 @@ ---- python/psutil/psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800 -+++ python/psutil/psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800 -@@ -1376,8 +1376,10 @@ - strlcat(opts, ",noclusterr", sizeof(opts)); - if (flags & MNT_NOCLUSTERW) - strlcat(opts, ",noclusterw", sizeof(opts)); -+#if __FreeBSD_version >= 800000 - if (flags & MNT_NFS4ACLS) - strlcat(opts, ",nfs4acls", sizeof(opts)); -+#endif - - py_tuple = Py_BuildValue("(ssss)", fs[i].f_mntfromname, // device - fs[i].f_mntonname, // mount point Modified: trunk/www/firefox/pkg-message ============================================================================== --- trunk/www/firefox/pkg-message Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/www/firefox/pkg-message Fri Mar 1 05:11:57 2013 (r1195) @@ -17,7 +17,7 @@ Firefox and HTML5 Certain functions used to display HTML5 elements need the sem module -on 7.x and 8.x releases. +only on 8.x releases. If your Firefox crashes with the following message while viewing a HTML5 page: Modified: trunk/www/libxul/files/patch-bug753046 ============================================================================== --- trunk/www/libxul/files/patch-bug753046 Wed Feb 27 23:32:44 2013 (r1194) +++ trunk/www/libxul/files/patch-bug753046 Fri Mar 1 05:11:57 2013 (r1195) @@ -469,7 +469,7 @@ --- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000 +++ ipc/chromium/src/base/platform_thread_posix.cc -@@ -9,9 +9,23 @@ +@@ -9,9 +9,17 @@ #if defined(OS_MACOSX) #include @@ -482,13 +482,7 @@ +#include +#elif defined(OS_FREEBSD) +#include -+#if __FreeBSD_version > 802500 +#include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif +#include #endif Deleted: trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,11 +0,0 @@ ---- mozilla/content/media/AudioStream.cpp~ -+++ mozilla/content/media/AudioStream.cpp -@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure) - gVolumeScale = NS_MAX(0, PR_strtod(utf8.get(), nullptr)); - } - } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) { --#ifdef MOZ_WIDGET_GONK -+#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097 - bool value = Preferences::GetBool(aPref, false); - #else - bool value = Preferences::GetBool(aPref, true); Deleted: trunk/www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-gfx-ots-include-opentype-sanitiser.h Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,18 +0,0 @@ -diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h -index f42822e..1a5a699 100644 ---- mozilla/gfx/ots/include/opentype-sanitiser.h -+++ mozilla/gfx/ots/include/opentype-sanitiser.h -@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t; - #include - #endif - -+#ifdef __FreeBSD__ -+# include -+# if __FreeBSD_version < 800067 -+# include // for off_t -+# endif -+#endif -+ - #include // for std::min - #include - #include Deleted: trunk/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc~ -+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc -@@ -16,7 +16,13 @@ - #include - #elif defined(OS_FREEBSD) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if !defined(OS_MACOSX) Deleted: trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebind_linux.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,37 +0,0 @@ ---- mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ -+++ mozilla/media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc -@@ -31,6 +31,10 @@ - #include - #endif - -+#ifdef __FreeBSD__ -+#include -+#endif -+ - // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead. - using namespace webrtc; - -@@ -38,7 +42,11 @@ namespace webrtc_adm_linux { - - inline static const char *GetDllError() { - #ifdef WEBRTC_LINUX -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - return err; - } else { -@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle, - void **symbol) { - #ifdef WEBRTC_LINUX - *symbol = dlsym(handle, symbol_name); -+#if __FreeBSD_version < 800505 -+ const char *err = dlerror(); -+#else - char *err = dlerror(); -+#endif - if (err) { - WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1, - "Error loading symbol %s : %d", symbol_name, err); Deleted: trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,16 +0,0 @@ ---- mozilla/media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~ -+++ mozilla/media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc -@@ -62,7 +62,13 @@ - #include - #elif defined(__FreeBSD__) - #include -+#if __FreeBSD_version > 802500 - #include -+#else -+_Pragma("GCC visibility push(default)") -+extern "C" int thr_self(long *); -+_Pragma("GCC visibility pop") -+#endif - #endif - - #if defined(WEBRTC_BSD) && !defined(__NetBSD__) Deleted: trunk/www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c ============================================================================== --- trunk/www/seamonkey/files/patch-mozilla-python-psutil-psutil-_psutil_bsd.c Fri Mar 1 05:11:57 2013 (r1194) +++ /dev/null 00:00:00 1970 (deleted) @@ -1,13 +0,0 @@ ---- mozilla/python/psutil/psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800 -+++ mozilla/python/psutil/psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800 -@@ -1376,8 +1376,10 @@ - strlcat(opts, ",noclusterr", sizeof(opts)); - if (flags & MNT_NOCLUSTERW) - strlcat(opts, ",noclusterw", sizeof(opts)); -+#if __FreeBSD_version >= 800000 - if (flags & MNT_NFS4ACLS) - strlcat(opts, ",nfs4acls", sizeof(opts)); -+#endif - - py_tuple = Py_BuildValue("(ssss)", fs[i].f_mntfromname, // device - fs[i].f_mntonname, // mount point