MFH: r471734

www/waterfox: apply some FF61 fixes

Approved by:	ports-secteam blanket
This commit is contained in:
Jan Beich 2018-06-04 23:39:46 +00:00
parent 6ec94f453f
commit 948b962b1f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=471735
3 changed files with 121 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= waterfox
DISTVERSION= 56.2.0-31
DISTVERSIONSUFFIX= -gf435a827f82ac
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www ipv6
MAINTAINER= jbeich@FreeBSD.org

View File

@ -0,0 +1,68 @@
commit b175f5f2113b
Author: Boris Zbarsky <bzbarsky@mit.edu>
Date: Thu May 31 12:43:01 2018 -0400
Bug 1464784 - Hold a strong ref to the document in callers of ConvertNodesOrStringsIntoNode. r=smaug, a=abillings
---
dom/base/nsINode.cpp | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git dom/base/nsINode.cpp dom/base/nsINode.cpp
index 3a649a61d0274..fbbf1efcb2dde 100644
--- dom/base/nsINode.cpp
+++ dom/base/nsINode.cpp
@@ -1777,8 +1777,8 @@ nsINode::Before(const Sequence<OwningNodeOrString>& aNodes,
nsCOMPtr<nsINode> viablePreviousSibling =
FindViablePreviousSibling(*this, aNodes);
- nsCOMPtr<nsINode> node =
- ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+ nsCOMPtr<nsIDocument> doc = OwnerDoc();
+ nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
if (aRv.Failed()) {
return;
}
@@ -1800,8 +1800,8 @@ nsINode::After(const Sequence<OwningNodeOrString>& aNodes,
nsCOMPtr<nsINode> viableNextSibling = FindViableNextSibling(*this, aNodes);
- nsCOMPtr<nsINode> node =
- ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+ nsCOMPtr<nsIDocument> doc = OwnerDoc();
+ nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
if (aRv.Failed()) {
return;
}
@@ -1820,8 +1820,8 @@ nsINode::ReplaceWith(const Sequence<OwningNodeOrString>& aNodes,
nsCOMPtr<nsINode> viableNextSibling = FindViableNextSibling(*this, aNodes);
- nsCOMPtr<nsINode> node =
- ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+ nsCOMPtr<nsIDocument> doc = OwnerDoc();
+ nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
if (aRv.Failed()) {
return;
}
@@ -1880,8 +1880,8 @@ void
nsINode::Prepend(const Sequence<OwningNodeOrString>& aNodes,
ErrorResult& aRv)
{
- nsCOMPtr<nsINode> node =
- ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+ nsCOMPtr<nsIDocument> doc = OwnerDoc();
+ nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
if (aRv.Failed()) {
return;
}
@@ -1894,8 +1894,8 @@ void
nsINode::Append(const Sequence<OwningNodeOrString>& aNodes,
ErrorResult& aRv)
{
- nsCOMPtr<nsINode> node =
- ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
+ nsCOMPtr<nsIDocument> doc = OwnerDoc();
+ nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
if (aRv.Failed()) {
return;
}

View File

@ -0,0 +1,52 @@
commit e963f75ef278
Author: Lee Salzman <lsalzman@mozilla.com>
Date: Fri Jun 1 15:52:26 2018 -0400
Bug 1465686 - Validate SkArenaAlloc sizes. r=rhunt, a=RyanVM
MozReview-Commit-ID: Cc4cxKeF4xn
--HG--
extra : source : 9019db1eaddb79dbfd1d4c357765599499eb02b4
---
gfx/skia/skia/src/core/SkArenaAlloc.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git gfx/skia/skia/src/core/SkArenaAlloc.h gfx/skia/skia/src/core/SkArenaAlloc.h
index c9e7274e63ded..b93054cff0177 100644
--- gfx/skia/skia/src/core/SkArenaAlloc.h
+++ gfx/skia/skia/src/core/SkArenaAlloc.h
@@ -112,9 +112,14 @@ public:
return sk_sp<T>(SkRef(this->make<T>(std::forward<Args>(args)...)));
}
+ uint32_t safeU32(size_t n) {
+ SkASSERT_RELEASE(SkTFitsIn<uint32_t>(n));
+ return uint32_t(n);
+ }
+
template <typename T>
T* makeArrayDefault(size_t count) {
- uint32_t safeCount = SkTo<uint32_t>(count);
+ uint32_t safeCount = safeU32(count);
T* array = (T*)this->commonArrayAlloc<T>(safeCount);
// If T is primitive then no initialization takes place.
@@ -126,7 +131,7 @@ public:
template <typename T>
T* makeArray(size_t count) {
- uint32_t safeCount = SkTo<uint32_t>(count);
+ uint32_t safeCount = safeU32(count);
T* array = (T*)this->commonArrayAlloc<T>(safeCount);
// If T is primitive then the memory is initialized. For example, an array of chars will
@@ -139,7 +144,7 @@ public:
// Only use makeBytesAlignedTo if none of the typed variants are impractical to use.
void* makeBytesAlignedTo(size_t size, size_t align) {
- auto objStart = this->allocObject(SkTo<uint32_t>(size), SkTo<uint32_t>(align));
+ auto objStart = this->allocObject(safeU32(size), safeU32(align));
fCursor = objStart + size;
return objStart;
}