From owner-svn-ports-head@FreeBSD.ORG Tue Jan 20 23:59:05 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF61C881; Tue, 20 Jan 2015 23:59:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C836FA9; Tue, 20 Jan 2015 23:59:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KNx5Fx017068; Tue, 20 Jan 2015 23:59:05 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KNx4At017060; Tue, 20 Jan 2015 23:59:04 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201501202359.t0KNx4At017060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Tue, 20 Jan 2015 23:59:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r377564 - in head: mail/thunderbird/files www/firefox-esr/files www/firefox/files www/libxul/files www/seamonkey/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:59:06 -0000 Author: jbeich Date: Tue Jan 20 23:59:03 2015 New Revision: 377564 URL: https://svnweb.freebsd.org/changeset/ports/377564 QAT: https://qat.redports.org/buildarchive/r377564/ Log: Backport Wikipedia crashfix for clang 3.5 PR: 196802 Reported by: dumbbell Obtained from: https://github.com/mozilla/gecko-dev/commit/87f367b Obtained from: https://github.com/mozilla/gecko-dev/commit/c97894b (esr31 version) Differential Revision: https://reviews.freebsd.org/D1568 Approved by: flo (mentor) MFH: 2015Q1 Added: head/mail/thunderbird/files/patch-bug1083461 (contents, props changed) head/www/firefox-esr/files/patch-bug1083461 (contents, props changed) head/www/firefox/files/patch-bug1083461 (contents, props changed) head/www/libxul/files/patch-bug1083461 (contents, props changed) head/www/seamonkey/files/patch-bug1083461 (contents, props changed) Added: head/mail/thunderbird/files/patch-bug1083461 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/thunderbird/files/patch-bug1083461 Tue Jan 20 23:59:03 2015 (r377564) @@ -0,0 +1,156 @@ +commit c97894b +Author: L. David Baron +Date: Sun Oct 19 23:31:39 2014 -0400 + + Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky approval-mozilla-esr31=bkerensa +--- + layout/style/nsCSSValue.cpp | 28 ++++++++++++++++------------ + layout/style/nsCSSValue.h | 22 ++++++++++++++++------ + layout/style/nsStyleAnimation.cpp | 6 ++++-- + 3 files changed, 36 insertions(+), 20 deletions(-) + +diff --git layout/style/nsCSSValue.cpp layout/style/nsCSSValue.cpp +index 781ef65..4bbc979 100644 +--- mozilla/layout/style/nsCSSValue.cpp ++++ mozilla/layout/style/nsCSSValue.cpp +@@ -253,13 +253,14 @@ bool nsCSSValue::operator==(const nsCSSValue& aOther) const + return *mValue.mRect == *aOther.mValue.mRect; + } + else if (eCSSUnit_List == mUnit) { +- return *mValue.mList == *aOther.mValue.mList; ++ return nsCSSValueList::Equal(mValue.mList, aOther.mValue.mList); + } + else if (eCSSUnit_SharedList == mUnit) { + return *mValue.mSharedList == *aOther.mValue.mSharedList; + } + else if (eCSSUnit_PairList == mUnit) { +- return *mValue.mPairList == *aOther.mValue.mPairList; ++ return nsCSSValuePairList::Equal(mValue.mPairList, ++ aOther.mValue.mPairList); + } + else if (eCSSUnit_GridTemplateAreas == mUnit) { + return *mValue.mGridTemplateAreas == *aOther.mValue.mGridTemplateAreas; +@@ -1740,13 +1741,15 @@ nsCSSValueList::AppendToString(nsCSSProperty aProperty, nsAString& aResult, + } + } + +-bool +-nsCSSValueList::operator==(const nsCSSValueList& aOther) const ++/* static */ bool ++nsCSSValueList::Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValueList *p1 = this, *p2 = &aOther; ++ const nsCSSValueList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mValue != p2->mValue) + return false; +@@ -1799,8 +1802,7 @@ nsCSSValueSharedList::AppendToString(nsCSSProperty aProperty, nsAString& aResult + bool + nsCSSValueSharedList::operator==(const nsCSSValueSharedList& aOther) const + { +- return !mHead == !aOther.mHead && +- (!mHead || *mHead == *aOther.mHead); ++ return nsCSSValueList::Equal(mHead, aOther.mHead); + } + + size_t +@@ -2010,13 +2012,15 @@ nsCSSValuePairList::AppendToString(nsCSSProperty aProperty, + } + } + +-bool +-nsCSSValuePairList::operator==(const nsCSSValuePairList& aOther) const ++/* static */ bool ++nsCSSValuePairList::Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValuePairList *p1 = this, *p2 = &aOther; ++ const nsCSSValuePairList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mXValue != p2->mXValue || + p1->mYValue != p2->mYValue) +diff --git layout/style/nsCSSValue.h layout/style/nsCSSValue.h +index 753938c..77eeef0 100644 +--- mozilla/layout/style/nsCSSValue.h ++++ mozilla/layout/style/nsCSSValue.h +@@ -806,9 +806,8 @@ struct nsCSSValueList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(nsCSSValueList const& aOther) const; +- bool operator!=(const nsCSSValueList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -821,6 +820,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValueList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(nsCSSValueList const& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValueList& aOther) const MOZ_DELETE; + }; + + // nsCSSValueList_heap differs from nsCSSValueList only in being +@@ -1199,9 +1204,8 @@ struct nsCSSValuePairList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(const nsCSSValuePairList& aOther) const; +- bool operator!=(const nsCSSValuePairList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -1215,6 +1219,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValuePairList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(const nsCSSValuePairList& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValuePairList& aOther) const MOZ_DELETE; + }; + + // nsCSSValuePairList_heap differs from nsCSSValuePairList only in being +diff --git layout/style/nsStyleAnimation.cpp layout/style/nsStyleAnimation.cpp +index 6c2ccb0..8dbe404 100644 +--- mozilla/layout/style/nsStyleAnimation.cpp ++++ mozilla/layout/style/nsStyleAnimation.cpp +@@ -3816,11 +3816,13 @@ nsStyleAnimation::Value::operator==(const Value& aOther) const + case eUnit_Filter: + case eUnit_Shadow: + case eUnit_BackgroundPosition: +- return *mValue.mCSSValueList == *aOther.mValue.mCSSValueList; ++ return nsCSSValueList::Equal(mValue.mCSSValueList, ++ aOther.mValue.mCSSValueList); + case eUnit_Transform: + return *mValue.mCSSValueSharedList == *aOther.mValue.mCSSValueSharedList; + case eUnit_CSSValuePairList: +- return *mValue.mCSSValuePairList == *aOther.mValue.mCSSValuePairList; ++ return nsCSSValuePairList::Equal(mValue.mCSSValuePairList, ++ aOther.mValue.mCSSValuePairList); + case eUnit_UnparsedString: + return (NS_strcmp(GetStringBufferValue(), + aOther.GetStringBufferValue()) == 0); Added: head/www/firefox-esr/files/patch-bug1083461 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox-esr/files/patch-bug1083461 Tue Jan 20 23:59:03 2015 (r377564) @@ -0,0 +1,156 @@ +commit c97894b +Author: L. David Baron +Date: Sun Oct 19 23:31:39 2014 -0400 + + Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky approval-mozilla-esr31=bkerensa +--- + layout/style/nsCSSValue.cpp | 28 ++++++++++++++++------------ + layout/style/nsCSSValue.h | 22 ++++++++++++++++------ + layout/style/nsStyleAnimation.cpp | 6 ++++-- + 3 files changed, 36 insertions(+), 20 deletions(-) + +diff --git layout/style/nsCSSValue.cpp layout/style/nsCSSValue.cpp +index 781ef65..4bbc979 100644 +--- layout/style/nsCSSValue.cpp ++++ layout/style/nsCSSValue.cpp +@@ -253,13 +253,14 @@ bool nsCSSValue::operator==(const nsCSSValue& aOther) const + return *mValue.mRect == *aOther.mValue.mRect; + } + else if (eCSSUnit_List == mUnit) { +- return *mValue.mList == *aOther.mValue.mList; ++ return nsCSSValueList::Equal(mValue.mList, aOther.mValue.mList); + } + else if (eCSSUnit_SharedList == mUnit) { + return *mValue.mSharedList == *aOther.mValue.mSharedList; + } + else if (eCSSUnit_PairList == mUnit) { +- return *mValue.mPairList == *aOther.mValue.mPairList; ++ return nsCSSValuePairList::Equal(mValue.mPairList, ++ aOther.mValue.mPairList); + } + else if (eCSSUnit_GridTemplateAreas == mUnit) { + return *mValue.mGridTemplateAreas == *aOther.mValue.mGridTemplateAreas; +@@ -1740,13 +1741,15 @@ nsCSSValueList::AppendToString(nsCSSProperty aProperty, nsAString& aResult, + } + } + +-bool +-nsCSSValueList::operator==(const nsCSSValueList& aOther) const ++/* static */ bool ++nsCSSValueList::Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValueList *p1 = this, *p2 = &aOther; ++ const nsCSSValueList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mValue != p2->mValue) + return false; +@@ -1799,8 +1802,7 @@ nsCSSValueSharedList::AppendToString(nsCSSProperty aProperty, nsAString& aResult + bool + nsCSSValueSharedList::operator==(const nsCSSValueSharedList& aOther) const + { +- return !mHead == !aOther.mHead && +- (!mHead || *mHead == *aOther.mHead); ++ return nsCSSValueList::Equal(mHead, aOther.mHead); + } + + size_t +@@ -2010,13 +2012,15 @@ nsCSSValuePairList::AppendToString(nsCSSProperty aProperty, + } + } + +-bool +-nsCSSValuePairList::operator==(const nsCSSValuePairList& aOther) const ++/* static */ bool ++nsCSSValuePairList::Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValuePairList *p1 = this, *p2 = &aOther; ++ const nsCSSValuePairList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mXValue != p2->mXValue || + p1->mYValue != p2->mYValue) +diff --git layout/style/nsCSSValue.h layout/style/nsCSSValue.h +index 753938c..77eeef0 100644 +--- layout/style/nsCSSValue.h ++++ layout/style/nsCSSValue.h +@@ -806,9 +806,8 @@ struct nsCSSValueList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(nsCSSValueList const& aOther) const; +- bool operator!=(const nsCSSValueList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -821,6 +820,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValueList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(nsCSSValueList const& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValueList& aOther) const MOZ_DELETE; + }; + + // nsCSSValueList_heap differs from nsCSSValueList only in being +@@ -1199,9 +1204,8 @@ struct nsCSSValuePairList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(const nsCSSValuePairList& aOther) const; +- bool operator!=(const nsCSSValuePairList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -1215,6 +1219,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValuePairList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(const nsCSSValuePairList& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValuePairList& aOther) const MOZ_DELETE; + }; + + // nsCSSValuePairList_heap differs from nsCSSValuePairList only in being +diff --git layout/style/nsStyleAnimation.cpp layout/style/nsStyleAnimation.cpp +index 6c2ccb0..8dbe404 100644 +--- layout/style/nsStyleAnimation.cpp ++++ layout/style/nsStyleAnimation.cpp +@@ -3816,11 +3816,13 @@ nsStyleAnimation::Value::operator==(const Value& aOther) const + case eUnit_Filter: + case eUnit_Shadow: + case eUnit_BackgroundPosition: +- return *mValue.mCSSValueList == *aOther.mValue.mCSSValueList; ++ return nsCSSValueList::Equal(mValue.mCSSValueList, ++ aOther.mValue.mCSSValueList); + case eUnit_Transform: + return *mValue.mCSSValueSharedList == *aOther.mValue.mCSSValueSharedList; + case eUnit_CSSValuePairList: +- return *mValue.mCSSValuePairList == *aOther.mValue.mCSSValuePairList; ++ return nsCSSValuePairList::Equal(mValue.mCSSValuePairList, ++ aOther.mValue.mCSSValuePairList); + case eUnit_UnparsedString: + return (NS_strcmp(GetStringBufferValue(), + aOther.GetStringBufferValue()) == 0); Added: head/www/firefox/files/patch-bug1083461 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/firefox/files/patch-bug1083461 Tue Jan 20 23:59:03 2015 (r377564) @@ -0,0 +1,159 @@ +commit 87f367b +Author: L. David Baron +Date: Sun Oct 19 23:31:39 2014 -0400 + + Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky + + --HG-- + extra : transplant_source : %CD%5D%9BE%FE%DE%A4%F2%B8%CF%D7%AE%84%90%3B%E8%A0d%D7%2B +--- + layout/style/StyleAnimationValue.cpp | 6 ++++-- + layout/style/nsCSSValue.cpp | 28 ++++++++++++++++------------ + layout/style/nsCSSValue.h | 22 ++++++++++++++++------ + 3 files changed, 36 insertions(+), 20 deletions(-) + +diff --git layout/style/StyleAnimationValue.cpp layout/style/StyleAnimationValue.cpp +index 40bc8bf..1898fe6 100644 +--- layout/style/StyleAnimationValue.cpp ++++ layout/style/StyleAnimationValue.cpp +@@ -3851,11 +3851,13 @@ StyleAnimationValue::operator==(const StyleAnimationValue& aOther) const + case eUnit_Filter: + case eUnit_Shadow: + case eUnit_BackgroundPosition: +- return *mValue.mCSSValueList == *aOther.mValue.mCSSValueList; ++ return nsCSSValueList::Equal(mValue.mCSSValueList, ++ aOther.mValue.mCSSValueList); + case eUnit_Transform: + return *mValue.mCSSValueSharedList == *aOther.mValue.mCSSValueSharedList; + case eUnit_CSSValuePairList: +- return *mValue.mCSSValuePairList == *aOther.mValue.mCSSValuePairList; ++ return nsCSSValuePairList::Equal(mValue.mCSSValuePairList, ++ aOther.mValue.mCSSValuePairList); + case eUnit_UnparsedString: + return (NS_strcmp(GetStringBufferValue(), + aOther.GetStringBufferValue()) == 0); +diff --git layout/style/nsCSSValue.cpp layout/style/nsCSSValue.cpp +index dcb8496..fefb4f9 100644 +--- layout/style/nsCSSValue.cpp ++++ layout/style/nsCSSValue.cpp +@@ -264,13 +264,14 @@ bool nsCSSValue::operator==(const nsCSSValue& aOther) const + return *mValue.mRect == *aOther.mValue.mRect; + } + else if (eCSSUnit_List == mUnit) { +- return *mValue.mList == *aOther.mValue.mList; ++ return nsCSSValueList::Equal(mValue.mList, aOther.mValue.mList); + } + else if (eCSSUnit_SharedList == mUnit) { + return *mValue.mSharedList == *aOther.mValue.mSharedList; + } + else if (eCSSUnit_PairList == mUnit) { +- return *mValue.mPairList == *aOther.mValue.mPairList; ++ return nsCSSValuePairList::Equal(mValue.mPairList, ++ aOther.mValue.mPairList); + } + else if (eCSSUnit_GridTemplateAreas == mUnit) { + return *mValue.mGridTemplateAreas == *aOther.mValue.mGridTemplateAreas; +@@ -1875,13 +1876,15 @@ nsCSSValueList::AppendToString(nsCSSProperty aProperty, nsAString& aResult, + } + } + +-bool +-nsCSSValueList::operator==(const nsCSSValueList& aOther) const ++/* static */ bool ++nsCSSValueList::Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValueList *p1 = this, *p2 = &aOther; ++ const nsCSSValueList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mValue != p2->mValue) + return false; +@@ -1934,8 +1937,7 @@ nsCSSValueSharedList::AppendToString(nsCSSProperty aProperty, nsAString& aResult + bool + nsCSSValueSharedList::operator==(const nsCSSValueSharedList& aOther) const + { +- return !mHead == !aOther.mHead && +- (!mHead || *mHead == *aOther.mHead); ++ return nsCSSValueList::Equal(mHead, aOther.mHead); + } + + size_t +@@ -2148,13 +2150,15 @@ nsCSSValuePairList::AppendToString(nsCSSProperty aProperty, + } + } + +-bool +-nsCSSValuePairList::operator==(const nsCSSValuePairList& aOther) const ++/* static */ bool ++nsCSSValuePairList::Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValuePairList *p1 = this, *p2 = &aOther; ++ const nsCSSValuePairList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mXValue != p2->mXValue || + p1->mYValue != p2->mYValue) +diff --git layout/style/nsCSSValue.h layout/style/nsCSSValue.h +index 8418a2d..f0c4e63 100644 +--- layout/style/nsCSSValue.h ++++ layout/style/nsCSSValue.h +@@ -871,9 +871,8 @@ struct nsCSSValueList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(nsCSSValueList const& aOther) const; +- bool operator!=(const nsCSSValueList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -886,6 +885,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValueList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(nsCSSValueList const& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValueList& aOther) const MOZ_DELETE; + }; + + // nsCSSValueList_heap differs from nsCSSValueList only in being +@@ -1264,9 +1269,8 @@ struct nsCSSValuePairList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(const nsCSSValuePairList& aOther) const; +- bool operator!=(const nsCSSValuePairList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -1280,6 +1284,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValuePairList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(const nsCSSValuePairList& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValuePairList& aOther) const MOZ_DELETE; + }; + + // nsCSSValuePairList_heap differs from nsCSSValuePairList only in being Added: head/www/libxul/files/patch-bug1083461 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/libxul/files/patch-bug1083461 Tue Jan 20 23:59:03 2015 (r377564) @@ -0,0 +1,156 @@ +commit c97894b +Author: L. David Baron +Date: Sun Oct 19 23:31:39 2014 -0400 + + Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky approval-mozilla-esr31=bkerensa +--- + layout/style/nsCSSValue.cpp | 28 ++++++++++++++++------------ + layout/style/nsCSSValue.h | 22 ++++++++++++++++------ + layout/style/nsStyleAnimation.cpp | 6 ++++-- + 3 files changed, 36 insertions(+), 20 deletions(-) + +diff --git layout/style/nsCSSValue.cpp layout/style/nsCSSValue.cpp +index 781ef65..4bbc979 100644 +--- layout/style/nsCSSValue.cpp ++++ layout/style/nsCSSValue.cpp +@@ -253,13 +253,14 @@ bool nsCSSValue::operator==(const nsCSSValue& aOther) const + return *mValue.mRect == *aOther.mValue.mRect; + } + else if (eCSSUnit_List == mUnit) { +- return *mValue.mList == *aOther.mValue.mList; ++ return nsCSSValueList::Equal(mValue.mList, aOther.mValue.mList); + } + else if (eCSSUnit_SharedList == mUnit) { + return *mValue.mSharedList == *aOther.mValue.mSharedList; + } + else if (eCSSUnit_PairList == mUnit) { +- return *mValue.mPairList == *aOther.mValue.mPairList; ++ return nsCSSValuePairList::Equal(mValue.mPairList, ++ aOther.mValue.mPairList); + } + else if (eCSSUnit_GridTemplateAreas == mUnit) { + return *mValue.mGridTemplateAreas == *aOther.mValue.mGridTemplateAreas; +@@ -1740,13 +1741,15 @@ nsCSSValueList::AppendToString(nsCSSProperty aProperty, nsAString& aResult, + } + } + +-bool +-nsCSSValueList::operator==(const nsCSSValueList& aOther) const ++/* static */ bool ++nsCSSValueList::Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValueList *p1 = this, *p2 = &aOther; ++ const nsCSSValueList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mValue != p2->mValue) + return false; +@@ -1799,8 +1802,7 @@ nsCSSValueSharedList::AppendToString(nsCSSProperty aProperty, nsAString& aResult + bool + nsCSSValueSharedList::operator==(const nsCSSValueSharedList& aOther) const + { +- return !mHead == !aOther.mHead && +- (!mHead || *mHead == *aOther.mHead); ++ return nsCSSValueList::Equal(mHead, aOther.mHead); + } + + size_t +@@ -2010,13 +2012,15 @@ nsCSSValuePairList::AppendToString(nsCSSProperty aProperty, + } + } + +-bool +-nsCSSValuePairList::operator==(const nsCSSValuePairList& aOther) const ++/* static */ bool ++nsCSSValuePairList::Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValuePairList *p1 = this, *p2 = &aOther; ++ const nsCSSValuePairList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mXValue != p2->mXValue || + p1->mYValue != p2->mYValue) +diff --git layout/style/nsCSSValue.h layout/style/nsCSSValue.h +index 753938c..77eeef0 100644 +--- layout/style/nsCSSValue.h ++++ layout/style/nsCSSValue.h +@@ -806,9 +806,8 @@ struct nsCSSValueList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(nsCSSValueList const& aOther) const; +- bool operator!=(const nsCSSValueList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -821,6 +820,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValueList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(nsCSSValueList const& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValueList& aOther) const MOZ_DELETE; + }; + + // nsCSSValueList_heap differs from nsCSSValueList only in being +@@ -1199,9 +1204,8 @@ struct nsCSSValuePairList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(const nsCSSValuePairList& aOther) const; +- bool operator!=(const nsCSSValuePairList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -1215,6 +1219,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValuePairList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(const nsCSSValuePairList& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValuePairList& aOther) const MOZ_DELETE; + }; + + // nsCSSValuePairList_heap differs from nsCSSValuePairList only in being +diff --git layout/style/nsStyleAnimation.cpp layout/style/nsStyleAnimation.cpp +index 6c2ccb0..8dbe404 100644 +--- layout/style/nsStyleAnimation.cpp ++++ layout/style/nsStyleAnimation.cpp +@@ -3816,11 +3816,13 @@ nsStyleAnimation::Value::operator==(const Value& aOther) const + case eUnit_Filter: + case eUnit_Shadow: + case eUnit_BackgroundPosition: +- return *mValue.mCSSValueList == *aOther.mValue.mCSSValueList; ++ return nsCSSValueList::Equal(mValue.mCSSValueList, ++ aOther.mValue.mCSSValueList); + case eUnit_Transform: + return *mValue.mCSSValueSharedList == *aOther.mValue.mCSSValueSharedList; + case eUnit_CSSValuePairList: +- return *mValue.mCSSValuePairList == *aOther.mValue.mCSSValuePairList; ++ return nsCSSValuePairList::Equal(mValue.mCSSValuePairList, ++ aOther.mValue.mCSSValuePairList); + case eUnit_UnparsedString: + return (NS_strcmp(GetStringBufferValue(), + aOther.GetStringBufferValue()) == 0); Added: head/www/seamonkey/files/patch-bug1083461 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/seamonkey/files/patch-bug1083461 Tue Jan 20 23:59:03 2015 (r377564) @@ -0,0 +1,159 @@ +commit 87f367b +Author: L. David Baron +Date: Sun Oct 19 23:31:39 2014 -0400 + + Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky + + --HG-- + extra : transplant_source : %CD%5D%9BE%FE%DE%A4%F2%B8%CF%D7%AE%84%90%3B%E8%A0d%D7%2B +--- + layout/style/StyleAnimationValue.cpp | 6 ++++-- + layout/style/nsCSSValue.cpp | 28 ++++++++++++++++------------ + layout/style/nsCSSValue.h | 22 ++++++++++++++++------ + 3 files changed, 36 insertions(+), 20 deletions(-) + +diff --git layout/style/StyleAnimationValue.cpp layout/style/StyleAnimationValue.cpp +index 40bc8bf..1898fe6 100644 +--- mozilla/layout/style/StyleAnimationValue.cpp ++++ mozilla/layout/style/StyleAnimationValue.cpp +@@ -3851,11 +3851,13 @@ StyleAnimationValue::operator==(const StyleAnimationValue& aOther) const + case eUnit_Filter: + case eUnit_Shadow: + case eUnit_BackgroundPosition: +- return *mValue.mCSSValueList == *aOther.mValue.mCSSValueList; ++ return nsCSSValueList::Equal(mValue.mCSSValueList, ++ aOther.mValue.mCSSValueList); + case eUnit_Transform: + return *mValue.mCSSValueSharedList == *aOther.mValue.mCSSValueSharedList; + case eUnit_CSSValuePairList: +- return *mValue.mCSSValuePairList == *aOther.mValue.mCSSValuePairList; ++ return nsCSSValuePairList::Equal(mValue.mCSSValuePairList, ++ aOther.mValue.mCSSValuePairList); + case eUnit_UnparsedString: + return (NS_strcmp(GetStringBufferValue(), + aOther.GetStringBufferValue()) == 0); +diff --git layout/style/nsCSSValue.cpp layout/style/nsCSSValue.cpp +index dcb8496..fefb4f9 100644 +--- mozilla/layout/style/nsCSSValue.cpp ++++ mozilla/layout/style/nsCSSValue.cpp +@@ -264,13 +264,14 @@ bool nsCSSValue::operator==(const nsCSSValue& aOther) const + return *mValue.mRect == *aOther.mValue.mRect; + } + else if (eCSSUnit_List == mUnit) { +- return *mValue.mList == *aOther.mValue.mList; ++ return nsCSSValueList::Equal(mValue.mList, aOther.mValue.mList); + } + else if (eCSSUnit_SharedList == mUnit) { + return *mValue.mSharedList == *aOther.mValue.mSharedList; + } + else if (eCSSUnit_PairList == mUnit) { +- return *mValue.mPairList == *aOther.mValue.mPairList; ++ return nsCSSValuePairList::Equal(mValue.mPairList, ++ aOther.mValue.mPairList); + } + else if (eCSSUnit_GridTemplateAreas == mUnit) { + return *mValue.mGridTemplateAreas == *aOther.mValue.mGridTemplateAreas; +@@ -1875,13 +1876,15 @@ nsCSSValueList::AppendToString(nsCSSProperty aProperty, nsAString& aResult, + } + } + +-bool +-nsCSSValueList::operator==(const nsCSSValueList& aOther) const ++/* static */ bool ++nsCSSValueList::Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValueList *p1 = this, *p2 = &aOther; ++ const nsCSSValueList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mValue != p2->mValue) + return false; +@@ -1934,8 +1937,7 @@ nsCSSValueSharedList::AppendToString(nsCSSProperty aProperty, nsAString& aResult + bool + nsCSSValueSharedList::operator==(const nsCSSValueSharedList& aOther) const + { +- return !mHead == !aOther.mHead && +- (!mHead || *mHead == *aOther.mHead); ++ return nsCSSValueList::Equal(mHead, aOther.mHead); + } + + size_t +@@ -2148,13 +2150,15 @@ nsCSSValuePairList::AppendToString(nsCSSProperty aProperty, + } + } + +-bool +-nsCSSValuePairList::operator==(const nsCSSValuePairList& aOther) const ++/* static */ bool ++nsCSSValuePairList::Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2) + { +- if (this == &aOther) ++ if (aList1 == aList2) { + return true; ++ } + +- const nsCSSValuePairList *p1 = this, *p2 = &aOther; ++ const nsCSSValuePairList *p1 = aList1, *p2 = aList2; + for ( ; p1 && p2; p1 = p1->mNext, p2 = p2->mNext) { + if (p1->mXValue != p2->mXValue || + p1->mYValue != p2->mYValue) +diff --git layout/style/nsCSSValue.h layout/style/nsCSSValue.h +index 8418a2d..f0c4e63 100644 +--- mozilla/layout/style/nsCSSValue.h ++++ mozilla/layout/style/nsCSSValue.h +@@ -871,9 +871,8 @@ struct nsCSSValueList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(nsCSSValueList const& aOther) const; +- bool operator!=(const nsCSSValueList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValueList* aList1, ++ const nsCSSValueList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -886,6 +885,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValueList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(nsCSSValueList const& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValueList& aOther) const MOZ_DELETE; + }; + + // nsCSSValueList_heap differs from nsCSSValueList only in being +@@ -1264,9 +1269,8 @@ struct nsCSSValuePairList { + void AppendToString(nsCSSProperty aProperty, nsAString& aResult, + nsCSSValue::Serialization aValueSerialization) const; + +- bool operator==(const nsCSSValuePairList& aOther) const; +- bool operator!=(const nsCSSValuePairList& aOther) const +- { return !(*this == aOther); } ++ static bool Equal(const nsCSSValuePairList* aList1, ++ const nsCSSValuePairList* aList2); + + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + +@@ -1280,6 +1284,12 @@ private: + { + MOZ_COUNT_CTOR(nsCSSValuePairList); + } ++ ++ // We don't want operator== or operator!= because they wouldn't be ++ // null-safe, which is generally what we need. Use |Equal| method ++ // above instead. ++ bool operator==(const nsCSSValuePairList& aOther) const MOZ_DELETE; ++ bool operator!=(const nsCSSValuePairList& aOther) const MOZ_DELETE; + }; + + // nsCSSValuePairList_heap differs from nsCSSValuePairList only in being