update to xulrunner-1.9.0.6 and sync patches from www/firefox3

This commit is contained in:
Tobias Nygren 2009-02-13 12:58:35 +00:00 committed by Thomas Klausner
parent 7ccabc5bd7
commit fe63e59126
6 changed files with 292 additions and 21 deletions

View file

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.3 2009/01/18 20:45:09 tnn2 Exp $
# $NetBSD: Makefile,v 1.4 2009/02/13 12:58:35 tnn2 Exp $
#
DISTNAME= xulrunner-1.9.0.5-source
DISTNAME= xulrunner-1.9.0.6-source
PKGNAME= ${DISTNAME:S/-source//}
CATEGORIES= www devel
MASTER_SITES= ${MASTER_SITE_MOZILLA:=xulrunner/releases/1.9.0.5/source/}
MASTER_SITES= ${MASTER_SITE_MOZILLA:=xulrunner/releases/1.9.0.6/source/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org

View file

@ -1,8 +1,8 @@
$NetBSD: distinfo,v 1.2 2009/01/18 20:45:09 tnn2 Exp $
$NetBSD: distinfo,v 1.3 2009/02/13 12:58:35 tnn2 Exp $
SHA1 (xulrunner-1.9.0.5-source.tar.bz2) = f934e073efaad3d4dde847c8491fa9529564d5d2
RMD160 (xulrunner-1.9.0.5-source.tar.bz2) = ec6e7eab65649c5c79587a5a8ffb9b6b386b5a18
Size (xulrunner-1.9.0.5-source.tar.bz2) = 36948252 bytes
SHA1 (xulrunner-1.9.0.6-source.tar.bz2) = e2845c07b507308664f6f39086a050b2773382fb
RMD160 (xulrunner-1.9.0.6-source.tar.bz2) = 89621d5c2e02f359a2552b714685b78cbdfbbf0e
Size (xulrunner-1.9.0.6-source.tar.bz2) = 37081721 bytes
SHA1 (patch-aa) = f995b5e53fa11ecb659ab2dd10551db1c71cc5f3
SHA1 (patch-ab) = dd388a040f99f71a79cf03a328de810e8d623374
SHA1 (patch-ac) = c814530c1a8574739b7557d007563232b6070c51
@ -40,7 +40,9 @@ SHA1 (patch-eh) = 60aca7f94ee04c957386014f7d4df9e3c8ac8ff1
SHA1 (patch-ei) = 4484d57e19e39ef86760716d5886ebf2a3e69f63
SHA1 (patch-ej) = 9b9c708483399fa89c6bf5bdc15e79b31793c89d
SHA1 (patch-ek) = b94debcf16ba6f0dccc0a812b5e5fa38a150c413
SHA1 (patch-el) = 8a1586e4ebb76f584dc7b1cbc19f0c389ea206f7
SHA1 (patch-em) = 6b8b470fc78a4a56400e77af1057b9266634dcc9
SHA1 (patch-en) = 39926ce5669119c358e8600e2d70d08236e67443
SHA1 (patch-wc) = 2de8665ed6c23c26566ca6d50165c0cf413a753d
SHA1 (patch-wd) = aacbe43f32fdc86fc32470da0afa699e4f361ea8
SHA1 (patch-we) = f7fecce05454e9794ff7a4e7789031a5ef49c42d
SHA1 (patch-wf) = c5adc9d3a6b23132399c23ea130f26e7a30a259d

217
xulrunner/patches/patch-el Normal file
View file

@ -0,0 +1,217 @@
$NetBSD: patch-el,v 1.1 2009/02/13 12:58:35 tnn2 Exp $
# Ensure correct alignment for nsCSSValue objects inside nsCSSValue::Array.
# (Bug 476345)
--- layout/style/nsCSSValue.h.orig 2008-07-02 00:51:43.000000000 +0200
+++ layout/style/nsCSSValue.h 2009-02-01 21:43:29.000000000 +0100
@@ -286,104 +286,7 @@
// failure.
static nsStringBuffer* BufferFromString(const nsString& aValue);
- struct Array {
-
- // return |Array| with reference count of zero
- static Array* Create(PRUint16 aItemCount) {
- return new (aItemCount) Array(aItemCount);
- }
-
- nsCSSValue& operator[](PRUint16 aIndex) {
- NS_ASSERTION(aIndex < mCount, "out of range");
- return *(First() + aIndex);
- }
-
- const nsCSSValue& operator[](PRUint16 aIndex) const {
- NS_ASSERTION(aIndex < mCount, "out of range");
- return *(First() + aIndex);
- }
-
- nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; }
- const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; }
-
- PRUint16 Count() const { return mCount; }
-
- PRBool operator==(const Array& aOther) const
- {
- if (mCount != aOther.mCount)
- return PR_FALSE;
- for (PRUint16 i = 0; i < mCount; ++i)
- if ((*this)[i] != aOther[i])
- return PR_FALSE;
- return PR_TRUE;
- }
-
- void AddRef() {
- if (mRefCnt == PR_UINT16_MAX) {
- NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
- return;
- }
- ++mRefCnt;
- NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
- }
- void Release() {
- if (mRefCnt == PR_UINT16_MAX) {
- NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
- return;
- }
- --mRefCnt;
- NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
- if (mRefCnt == 0)
- delete this;
- }
-
- private:
-
- PRUint16 mRefCnt;
- PRUint16 mCount;
-
- void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW {
- return ::operator new(aSelfSize + sizeof(nsCSSValue)*aItemCount);
- }
-
- void operator delete(void* aPtr) { ::operator delete(aPtr); }
-
- nsCSSValue* First() {
- return (nsCSSValue*) (((char*)this) + sizeof(*this));
- }
-
- const nsCSSValue* First() const {
- return (const nsCSSValue*) (((const char*)this) + sizeof(*this));
- }
-
-#define CSSVALUE_LIST_FOR_VALUES(var) \
- for (nsCSSValue *var = First(), *var##_end = var + mCount; \
- var != var##_end; ++var)
-
- Array(PRUint16 aItemCount)
- : mRefCnt(0)
- , mCount(aItemCount)
- {
- MOZ_COUNT_CTOR(nsCSSValue::Array);
- CSSVALUE_LIST_FOR_VALUES(val) {
- new (val) nsCSSValue();
- }
- }
-
- ~Array()
- {
- MOZ_COUNT_DTOR(nsCSSValue::Array);
- CSSVALUE_LIST_FOR_VALUES(val) {
- val->~nsCSSValue();
- }
- }
-
-#undef CSSVALUE_LIST_FOR_VALUES
-
- private:
- Array(const Array& aOther); // not to be implemented
- };
-
+ struct Array;
struct URL {
// Methods are not inline because using an nsIPrincipal means requiring
// caps, which leads to REQUIRES hell, since this header is included all
@@ -454,5 +357,102 @@
} mValue;
};
-#endif /* nsCSSValue_h___ */
+struct nsCSSValue::Array {
+
+ // return |Array| with reference count of zero
+ static Array* Create(PRUint16 aItemCount) {
+ return new (aItemCount) Array(aItemCount);
+ }
+
+ nsCSSValue& operator[](PRUint16 aIndex) {
+ NS_ASSERTION(aIndex < mCount, "out of range");
+ return mArray[aIndex];
+ }
+
+ const nsCSSValue& operator[](PRUint16 aIndex) const {
+ NS_ASSERTION(aIndex < mCount, "out of range");
+ return mArray[aIndex];
+ }
+
+ nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; }
+ const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; }
+
+ PRUint16 Count() const { return mCount; }
+
+ PRBool operator==(const Array& aOther) const
+ {
+ if (mCount != aOther.mCount)
+ return PR_FALSE;
+ for (PRUint16 i = 0; i < mCount; ++i)
+ if ((*this)[i] != aOther[i])
+ return PR_FALSE;
+ return PR_TRUE;
+ }
+
+ void AddRef() {
+ if (mRefCnt == PR_UINT16_MAX) {
+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
+ return;
+ }
+ ++mRefCnt;
+ NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
+ }
+ void Release() {
+ if (mRefCnt == PR_UINT16_MAX) {
+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
+ return;
+ }
+ --mRefCnt;
+ NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
+ if (mRefCnt == 0)
+ delete this;
+ }
+
+private:
+
+ PRUint16 mRefCnt;
+ const PRUint16 mCount;
+ // This must be the last sub-object, since we extend this array to
+ // be of size mCount; it needs to be a sub-object so it gets proper
+ // alignment.
+ nsCSSValue mArray[1];
+ void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW {
+ return ::operator new(aSelfSize + sizeof(nsCSSValue) * (aItemCount - 1));
+ }
+
+ void operator delete(void* aPtr) { ::operator delete(aPtr); }
+
+ nsCSSValue* First() { return mArray; }
+
+ const nsCSSValue* First() const { return mArray; }
+
+#define CSSVALUE_LIST_FOR_EXTRA_VALUES(var) \
+for (nsCSSValue *var = First() + 1, *var##_end = First() + mCount; \
+ var != var##_end; ++var)
+
+ Array(PRUint16 aItemCount)
+ : mRefCnt(0)
+ , mCount(aItemCount)
+ {
+ MOZ_COUNT_CTOR(nsCSSValue::Array);
+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
+ new (val) nsCSSValue();
+ }
+ }
+
+ ~Array()
+ {
+ MOZ_COUNT_DTOR(nsCSSValue::Array);
+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
+ val->~nsCSSValue();
+ }
+ }
+
+#undef CSSVALUE_LIST_FOR_VALUES
+
+private:
+ Array(const Array& aOther); // not to be implemented
+};
+
+#endif /* nsCSSValue_h___ */

View file

@ -0,0 +1,17 @@
$NetBSD: patch-em,v 1.1 2009/02/13 12:58:35 tnn2 Exp $
SHA1_Update conflicts with openssl which may be dynamically loaded
at runtime via libcups or libgssapi so causing a crash due to using
the wrong binding. So rename here to avoid conflict.
--- security/nss/lib/freebl/blapi.h.orig 2007-11-10 07:49:32.000000000 +1300
+++ security/nss/lib/freebl/blapi.h
@@ -899,6 +899,8 @@ extern void SHA1_DestroyContext(SHA1Cont
*/
extern void SHA1_Begin(SHA1Context *cx);
+#define SHA1_Update NSS_SHA1_Update
+
/*
** Update the SHA-1 hash function with more data.
** "cx" the context

View file

@ -0,0 +1,48 @@
$NetBSD: patch-en,v 1.1 2009/02/13 12:58:35 tnn2 Exp $
SHA1_Update conflicts with openssl which may be dynamically loaded
at runtime via libcups or libgssapi so causing a crash due to using
the wrong binding. So rename here to avoid conflict.
--- security/nss/lib/freebl/sha-fast-amd64-sun.s.orig 2007-10-12 14:44:43.000000000 +1300
+++ security/nss/lib/freebl/sha-fast-amd64-sun.s
@@ -1712,9 +1712,9 @@ shaCompress:
.LFE7:
.size shaCompress, .-shaCompress
.align 16
-.globl SHA1_Update
- .type SHA1_Update, @function
-SHA1_Update:
+.globl NSS_SHA1_Update
+ .type NSS_SHA1_Update, @function
+NSS_SHA1_Update:
.LFB5:
pushq %rbp
.LCFI5:
@@ -1800,7 +1800,7 @@ SHA1_Update:
call shaCompress
jmp .L245
.LFE5:
- .size SHA1_Update, .-SHA1_Update
+ .size NSS_SHA1_Update, .-NSS_SHA1_Update
.section .rodata
.align 32
.type bulk_pad.0, @object
@@ -1902,7 +1902,7 @@ SHA1_End:
subl %r8d, %edx
andl $63, %edx
incl %edx
- call SHA1_Update@PLT
+ call NSS_SHA1_Update@PLT
movq %rbx, %rdi
movq %r12, %rsi
shrq $32, %rdi
@@ -2018,7 +2018,7 @@ SHA1_HashBuf:
movl %r12d, %edx
movq %r13, %rsi
movq %rbx, %rdi
- call SHA1_Update@PLT
+ call NSS_SHA1_Update@PLT
leaq -292(%rbp), %rdx
movq %r14, %rsi
movq %rbx, %rdi

View file

@ -1,13 +0,0 @@
$NetBSD: patch-wf,v 1.1 2009/01/18 18:33:06 tnn2 Exp $
--- nsprpub/pr/src/md/unix/uxrng.c.orig 2005-12-24 09:25:29.000000000 +0100
+++ nsprpub/pr/src/md/unix/uxrng.c
@@ -149,7 +149,7 @@ static PRCallOnceType coOpenDevRandom;
static PRStatus OpenDevRandom( void )
{
- fdDevRandom = open( "/dev/random", O_RDONLY );
+ fdDevRandom = open( "/dev/urandom", O_RDONLY );
return((-1 == fdDevRandom)? PR_FAILURE : PR_SUCCESS );
} /* end OpenDevRandom() */