MFH: r469963

www/waterfox: update to 56.2.0

Changes:	https://github.com/MrAlex94/Waterfox/compare/edfc016bc021c...56.2.0
Approved by:	ports-secteam blanket
This commit is contained in:
Jan Beich 2018-05-14 20:28:23 +00:00
parent 2723513625
commit b542ff14b5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=469964
15 changed files with 14 additions and 799 deletions

View File

@ -1,15 +1,14 @@
# $FreeBSD$
PORTNAME= waterfox
DISTVERSION= 56.1.0-111178
DISTVERSIONSUFFIX= -gedfc016bc021c
DISTVERSION= 56.2.0
CATEGORIES= www ipv6
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Distilled fork of Firefox
DEPRECATED= Temporary experiment
EXPIRATION_DATE=2018-05-16
EXPIRATION_DATE=2018-07-03
BUILD_DEPENDS= nspr>=4.16:devel/nspr \
nss>=3.32.1:security/nss \

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1526290324
SHA256 (MrAlex94-Waterfox-56.1.0-111178-gedfc016bc021c_GH0.tar.gz) = a34715f6954e5b557e976166b69f976f0ae3bc92b168ca26ab6d3ba62bf8e6ec
SIZE (MrAlex94-Waterfox-56.1.0-111178-gedfc016bc021c_GH0.tar.gz) = 394952776
TIMESTAMP = 1526323182
SHA256 (MrAlex94-Waterfox-56.2.0_GH0.tar.gz) = b4f8ee4ef6544bacb6b0575e99e05d399cf83f983d3b0193cd9df39bd509f0d2
SIZE (MrAlex94-Waterfox-56.2.0_GH0.tar.gz) = 395158434

View File

@ -1,25 +0,0 @@
commit 4536ef50d724
Author: Miko Mynttinen <mikokm@gmail.com>
Date: Thu Apr 12 14:18:03 2018 +0200
Bug 1393367 - Change MOZ_ASSERT to MOZ_RELEASE_ASSERT. r=mstange, r=fbraun, a=RyanVM
--HG--
extra : source : 1908cd8ed88dd4f77a99dff39c193d7d3f435195
---
gfx/2d/FilterNodeSoftware.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git gfx/2d/FilterNodeSoftware.cpp gfx/2d/FilterNodeSoftware.cpp
index 1d55425073b0..f1174f550d41 100644
--- gfx/2d/FilterNodeSoftware.cpp
+++ gfx/2d/FilterNodeSoftware.cpp
@@ -2798,7 +2798,7 @@ FilterNodeArithmeticCombineSoftware::SetAttribute(uint32_t aIndex,
uint32_t aSize)
{
MOZ_ASSERT(aIndex == ATT_ARITHMETIC_COMBINE_COEFFICIENTS);
- MOZ_ASSERT(aSize == 4);
+ MOZ_RELEASE_ASSERT(aSize == 4);
mK1 = aFloat[0];
mK2 = aFloat[1];

View File

@ -1,89 +0,0 @@
commit 362d0bb251e6
Author: Andrew Osmond <aosmond@mozilla.com>
Date: Tue Mar 27 09:01:14 2018 -0400
Bug 1409440. r=tnikkel, a=RyanVM
--HG--
extra : source : 52c14d32d9812951c12d92b2594056fc15c5de80
---
image/Downscaler.cpp | 14 ++++++++++----
image/DownscalingFilter.h | 14 ++++++++++----
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git image/Downscaler.cpp image/Downscaler.cpp
index 475d18319a19..f97d067720b6 100644
--- image/Downscaler.cpp
+++ image/Downscaler.cpp
@@ -195,13 +195,14 @@ Downscaler::CommitRow()
int32_t inLineToRead = filterOffset + mLinesInBuffer;
MOZ_ASSERT(mCurrentInLine <= inLineToRead, "Reading past end of input");
if (mCurrentInLine == inLineToRead) {
+ MOZ_RELEASE_ASSERT(mLinesInBuffer < mWindowCapacity, "Need more rows than capacity!");
mXFilter.ConvolveHorizontally(mRowBuffer.get(), mWindow[mLinesInBuffer++], mHasAlpha);
}
MOZ_ASSERT(mCurrentOutLine < mTargetSize.height,
"Writing past end of output");
- while (mLinesInBuffer == filterLength) {
+ while (mLinesInBuffer >= filterLength) {
DownscaleInputLine();
if (mCurrentOutLine == mTargetSize.height) {
@@ -297,9 +298,14 @@ Downscaler::DownscaleInputLine()
// Shift the buffer. We're just moving pointers here, so this is cheap.
mLinesInBuffer -= diff;
- mLinesInBuffer = max(mLinesInBuffer, 0);
- for (int32_t i = 0; i < mLinesInBuffer; ++i) {
- swap(mWindow[i], mWindow[filterLength - mLinesInBuffer + i]);
+ mLinesInBuffer = min(max(mLinesInBuffer, 0), mWindowCapacity);
+
+ // If we already have enough rows to satisfy the filter, there is no need
+ // to swap as we won't be writing more before the next convolution.
+ if (filterLength > mLinesInBuffer) {
+ for (int32_t i = 0; i < mLinesInBuffer; ++i) {
+ swap(mWindow[i], mWindow[filterLength - mLinesInBuffer + i]);
+ }
}
}
diff --git image/DownscalingFilter.h image/DownscalingFilter.h
index 6f516d0e0d90..764aade2e63b 100644
--- image/DownscalingFilter.h
+++ image/DownscalingFilter.h
@@ -232,13 +232,14 @@ protected:
int32_t inputRowToRead = filterOffset + mRowsInWindow;
MOZ_ASSERT(mInputRow <= inputRowToRead, "Reading past end of input");
if (mInputRow == inputRowToRead) {
+ MOZ_RELEASE_ASSERT(mRowsInWindow < mWindowCapacity, "Need more rows than capacity!");
mXFilter.ConvolveHorizontally(mRowBuffer.get(), mWindow[mRowsInWindow++], mHasAlpha);
}
MOZ_ASSERT(mOutputRow < mNext.InputSize().height,
"Writing past end of output");
- while (mRowsInWindow == filterLength) {
+ while (mRowsInWindow >= filterLength) {
DownscaleInputRow();
if (mOutputRow == mNext.InputSize().height) {
@@ -297,9 +298,14 @@ private:
// Shift the buffer. We're just moving pointers here, so this is cheap.
mRowsInWindow -= diff;
- mRowsInWindow = std::max(mRowsInWindow, 0);
- for (int32_t i = 0; i < mRowsInWindow; ++i) {
- std::swap(mWindow[i], mWindow[filterLength - mRowsInWindow + i]);
+ mRowsInWindow = std::min(std::max(mRowsInWindow, 0), mWindowCapacity);
+
+ // If we already have enough rows to satisfy the filter, there is no need
+ // to swap as we won't be writing more before the next convolution.
+ if (filterLength > mRowsInWindow) {
+ for (int32_t i = 0; i < mRowsInWindow; ++i) {
+ std::swap(mWindow[i], mWindow[filterLength - mRowsInWindow + i]);
+ }
}
}

View File

@ -26,91 +26,6 @@ index 594b90f808e4..79224b73cefa 100644
LOG(("CamerasSingleton: %p", this));
}
@@ -291,7 +293,7 @@ CamerasChild::NumberOfCapabilities(CaptureEngine aCapEngine,
LOG(("NumberOfCapabilities for %s", deviceUniqueIdUTF8));
nsCString unique_id(deviceUniqueIdUTF8);
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine, nsCString>(
+ mozilla::NewRunnableMethod<CaptureEngine, nsCString>(
"camera::PCamerasChild::SendNumberOfCapabilities",
this,
&CamerasChild::SendNumberOfCapabilities,
@@ -307,7 +309,7 @@ CamerasChild::NumberOfCaptureDevices(CaptureEngine aCapEngine)
{
LOG((__PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine>(
+ mozilla::NewRunnableMethod<CaptureEngine>(
"camera::PCamerasChild::SendNumberOfCaptureDevices",
this,
&CamerasChild::SendNumberOfCaptureDevices,
@@ -334,7 +336,7 @@ CamerasChild::EnsureInitialized(CaptureEngine aCapEngine)
{
LOG((__PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine>(
+ mozilla::NewRunnableMethod<CaptureEngine>(
"camera::PCamerasChild::SendEnsureInitialized",
this,
&CamerasChild::SendEnsureInitialized,
@@ -353,7 +355,7 @@ CamerasChild::GetCaptureCapability(CaptureEngine aCapEngine,
LOG(("GetCaptureCapability: %s %d", unique_idUTF8, capability_number));
nsCString unique_id(unique_idUTF8);
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine, nsCString, unsigned int>(
+ mozilla::NewRunnableMethod<CaptureEngine, nsCString, unsigned int>(
"camera::PCamerasChild::SendGetCaptureCapability",
this,
&CamerasChild::SendGetCaptureCapability,
@@ -395,7 +397,7 @@ CamerasChild::GetCaptureDevice(CaptureEngine aCapEngine,
{
LOG((__PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine, unsigned int>(
+ mozilla::NewRunnableMethod<CaptureEngine, unsigned int>(
"camera::PCamerasChild::SendGetCaptureDevice",
this,
&CamerasChild::SendGetCaptureDevice,
@@ -439,9 +441,9 @@ CamerasChild::AllocateCaptureDevice(CaptureEngine aCapEngine,
LOG((__PRETTY_FUNCTION__));
nsCString unique_id(unique_idUTF8);
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine,
- nsCString,
- const mozilla::ipc::PrincipalInfo&>(
+ mozilla::NewRunnableMethod<CaptureEngine,
+ nsCString,
+ const mozilla::ipc::PrincipalInfo&>(
"camera::PCamerasChild::SendAllocateCaptureDevice",
this,
&CamerasChild::SendAllocateCaptureDevice,
@@ -475,7 +477,7 @@ CamerasChild::ReleaseCaptureDevice(CaptureEngine aCapEngine,
{
LOG((__PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine, int>(
+ mozilla::NewRunnableMethod<CaptureEngine, int>(
"camera::PCamerasChild::SendReleaseCaptureDevice",
this,
&CamerasChild::SendReleaseCaptureDevice,
@@ -526,7 +528,7 @@ CamerasChild::StartCapture(CaptureEngine aCapEngine,
webrtcCaps.codecType,
webrtcCaps.interlaced);
nsCOMPtr<nsIRunnable> runnable = mozilla::
- NewNonOwningRunnableMethod<CaptureEngine, int, VideoCaptureCapability>(
+ NewRunnableMethod<CaptureEngine, int, VideoCaptureCapability>(
"camera::PCamerasChild::SendStartCapture",
this,
&CamerasChild::SendStartCapture,
@@ -542,7 +544,7 @@ CamerasChild::StopCapture(CaptureEngine aCapEngine, const int capture_id)
{
LOG((__PRETTY_FUNCTION__));
nsCOMPtr<nsIRunnable> runnable =
- mozilla::NewNonOwningRunnableMethod<CaptureEngine, int>(
+ mozilla::NewRunnableMethod<CaptureEngine, int>(
"camera::PCamerasChild::SendStopCapture",
this,
&CamerasChild::SendStopCapture,
@@ -559,6 +561,9 @@ void
Shutdown(void)
{
@ -121,15 +36,6 @@ index 594b90f808e4..79224b73cefa 100644
CamerasChild* child = CamerasSingleton::Child();
if (!child) {
// We don't want to cause everything to get fired up if we're
@@ -610,7 +615,7 @@ CamerasChild::ShutdownParent()
// Delete the parent actor.
// CamerasChild (this) will remain alive and is only deleted by the
// IPC layer when SendAllDone returns.
- nsCOMPtr<nsIRunnable> deleteRunnable = mozilla::NewNonOwningRunnableMethod(
+ nsCOMPtr<nsIRunnable> deleteRunnable = mozilla::NewRunnableMethod(
"camera::PCamerasChild::SendAllDone", this, &CamerasChild::SendAllDone);
CamerasSingleton::Thread()->Dispatch(deleteRunnable, NS_DISPATCH_NORMAL);
} else {
@@ -733,7 +738,7 @@ CamerasChild::~CamerasChild()
{
LOG(("~CamerasChild: %p", this));
@ -166,3 +72,12 @@ index b2029dbd6b9d..620c409b656f 100644
};
// Get a pointer to a CamerasChild object we can use to do IPC with.
@@ -149,7 +158,7 @@ class CamerasChild final : public PCamerasChild
public:
// We are owned by the PBackground thread only. CamerasSingleton
// takes a non-owning reference.
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CamerasChild)
+ NS_INLINE_DECL_REFCOUNTING(CamerasChild)
// IPC messages recevied, received on the PBackground thread
// these are the actual callbacks with data

View File

@ -1,102 +0,0 @@
commit 694ff7ca4925
Author: Eric Rahm <erahm@mozilla.com>
Date: Thu Feb 22 12:38:15 2018 -0800
Bug 1432323 - Refactor operator new in nsArrayEnumerator. r=froydnj
--HG--
extra : rebase_source : 9df6db9f17e14eff2f79cd29599b03619068cef3
---
xpcom/ds/nsArrayEnumerator.cpp | 44 ++++++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 15 deletions(-)
diff --git xpcom/ds/nsArrayEnumerator.cpp xpcom/ds/nsArrayEnumerator.cpp
index 54951222ae954..2e7d1f9af43a5 100644
--- xpcom/ds/nsArrayEnumerator.cpp
+++ xpcom/ds/nsArrayEnumerator.cpp
@@ -13,6 +13,7 @@
#include "nsCOMArray.h"
#include "nsCOMPtr.h"
+#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/RefPtr.h"
class nsSimpleArrayEnumerator final : public nsISimpleEnumerator
@@ -112,14 +113,21 @@ public:
// nsISimpleEnumerator interface
NS_DECL_NSISIMPLEENUMERATOR
- // nsSimpleArrayEnumerator methods
- nsCOMArrayEnumerator() : mIndex(0) {}
+ // Use this instead of `new`.
+ static nsCOMArrayEnumerator* Allocate(const nsCOMArray_base& aArray);
// specialized operator to make sure we make room for mValues
- void* operator new(size_t aSize, const nsCOMArray_base& aArray) CPP_THROW_NEW;
- void operator delete(void* aPtr) { ::operator delete(aPtr); }
+ void operator delete(void* aPtr) { free(aPtr); }
private:
+ // nsSimpleArrayEnumerator methods
+ nsCOMArrayEnumerator()
+ : mIndex(0)
+ , mArraySize(0)
+ {
+ mValueArray[0] = nullptr;
+ }
+
~nsCOMArrayEnumerator(void);
protected:
@@ -176,26 +184,32 @@ nsCOMArrayEnumerator::GetNext(nsISupports** aResult)
return NS_OK;
}
-void*
-nsCOMArrayEnumerator::operator new(size_t aSize,
- const nsCOMArray_base& aArray) CPP_THROW_NEW
+nsCOMArrayEnumerator*
+nsCOMArrayEnumerator::Allocate(const nsCOMArray_base& aArray)
{
// create enough space such that mValueArray points to a large
// enough value. Note that the initial value of aSize gives us
// space for mValueArray[0], so we must subtract
- aSize += (aArray.Count() - 1) * sizeof(aArray[0]);
+ size_t size = sizeof(nsCOMArrayEnumerator);
+ uint32_t count;
+ if (aArray.Count() > 0) {
+ count = static_cast<uint32_t>(aArray.Count());
+ size += (count - 1) * sizeof(aArray[0]);
+ } else {
+ count = 0;
+ }
+
+ // Allocate a buffer large enough to contain our object and its array.
+ void* mem = moz_xmalloc(size);
+ auto result = new (mozilla::KnownNotNull, mem) nsCOMArrayEnumerator();
- // do the actual allocation
- nsCOMArrayEnumerator* result =
- static_cast<nsCOMArrayEnumerator*>(::operator new(aSize));
+ result->mArraySize = count;
// now need to copy over the values, and addref each one
// now this might seem like a lot of work, but we're actually just
// doing all our AddRef's ahead of time since GetNext() doesn't
// need to AddRef() on the way out
- uint32_t i;
- uint32_t max = result->mArraySize = aArray.Count();
- for (i = 0; i < max; ++i) {
+ for (uint32_t i = 0; i < count; ++i) {
result->mValueArray[i] = aArray[i];
NS_IF_ADDREF(result->mValueArray[i]);
}
@@ -207,7 +221,7 @@ nsresult
NS_NewArrayEnumerator(nsISimpleEnumerator** aResult,
const nsCOMArray_base& aArray)
{
- RefPtr<nsCOMArrayEnumerator> enumerator = new (aArray) nsCOMArrayEnumerator();
+ RefPtr<nsCOMArrayEnumerator> enumerator = nsCOMArrayEnumerator::Allocate(aArray);
enumerator.forget(aResult);
return NS_OK;
}

View File

@ -1,26 +0,0 @@
commit a9c9593126c7
Author: Michael Froman <mfroman@mozilla.com>
Date: Wed Feb 14 14:24:50 2018 -0600
Bug 1436759 - Release NrIceMediaStreams on sts thread in transport_unittests.cpp. r=bwc
MozReview-Commit-ID: BLasqfQJxw
--HG--
extra : rebase_source : bca09672917ce5fc4a5450864c9f461952847b3f
---
media/mtransport/test/transport_unittests.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git media/mtransport/test/transport_unittests.cpp media/mtransport/test/transport_unittests.cpp
index 167a14be1fd52..4bf6195122182 100644
--- media/mtransport/test/transport_unittests.cpp
+++ media/mtransport/test/transport_unittests.cpp
@@ -481,6 +481,7 @@ class TransportTestPeer : public sigslot::has_slots<> {
flow_ = nullptr;
}
ice_ctx_ = nullptr;
+ streams_.clear();
}
void DisconnectDestroyFlow() {

View File

@ -1,26 +0,0 @@
commit 821df39aefc0
Author: Nathan Froyd <froydnj@mozilla.com>
Date: Mon Feb 26 11:08:55 2018 -0500
Bug 1439723 - use a temporary in Animation::Tick(); r=mattwoodrow
---
dom/animation/Animation.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git dom/animation/Animation.cpp dom/animation/Animation.cpp
index 6c5a55f0baf6e..7b89365f86811 100644
--- dom/animation/Animation.cpp
+++ dom/animation/Animation.cpp
@@ -693,8 +693,10 @@ Animation::Tick()
// during the *previous* tick of the refresh driver, it can still be
// ahead of the *current* timeline time when we are using the
// vsync timer so we need to clamp it to the timeline time.
- mPendingReadyTime.SetValue(std::min(mTimeline->GetCurrentTime().Value(),
- mPendingReadyTime.Value()));
+ TimeDuration currentTime = mTimeline->GetCurrentTime().Value();
+ if (currentTime < mPendingReadyTime.Value()) {
+ mPendingReadyTime.SetValue(currentTime);
+ }
FinishPendingAt(mPendingReadyTime.Value());
mPendingReadyTime.SetNull();
}

View File

@ -1,35 +0,0 @@
commit 4afe466a9d1d
Author: Randell Jesup <rjesup@jesup.org>
Date: Thu Apr 5 17:15:07 2018 -0400
Bug 1448705 - Use input latency for draining. r=jya, a=jcristau
--HG--
extra : source : b2904f128f854a71216f299b835da5a422ceb3cd
---
dom/media/AudioConverter.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git dom/media/AudioConverter.cpp dom/media/AudioConverter.cpp
index 9293b09bd5e0..f0f816ab8a3f 100644
--- dom/media/AudioConverter.cpp
+++ dom/media/AudioConverter.cpp
@@ -365,15 +365,13 @@ size_t
AudioConverter::ResampleRecipientFrames(size_t aFrames) const
{
if (!aFrames && mIn.Rate() != mOut.Rate()) {
- // The resampler will be drained, account for frames currently buffered
- // in the resampler.
if (!mResampler) {
return 0;
}
- return speex_resampler_get_output_latency(mResampler);
- } else {
- return (uint64_t)aFrames * mOut.Rate() / mIn.Rate() + 1;
+ // We drain by pushing in get_input_latency() samples of 0
+ aFrames = speex_resampler_get_input_latency(mResampler);
}
+ return (uint64_t)aFrames * mOut.Rate() / mIn.Rate() + 1;
}
size_t

View File

@ -1,173 +0,0 @@
commit ece500858fb2
Author: Jonathan Kew <jkew@mozilla.com>
Date: Wed Mar 28 10:17:51 2018 +0100
Bug 1448771 - Update hnjstdio to handle additional functions from stdio.h that libhyphen wants to use. r=glandium, a=RyanVM
--HG--
extra : source : 846bcaa210aa2264bec412c0595113964fafc972
---
intl/hyphenation/glue/hnjalloc.h | 6 +++++
intl/hyphenation/glue/hnjstdio.cpp | 50 ++++++++++++++++++++++++++------------
2 files changed, 41 insertions(+), 15 deletions(-)
diff --git intl/hyphenation/glue/hnjalloc.h intl/hyphenation/glue/hnjalloc.h
index fec3a4bc9009..5cee1be1b6d7 100644
--- intl/hyphenation/glue/hnjalloc.h
+++ intl/hyphenation/glue/hnjalloc.h
@@ -31,6 +31,8 @@
#define fopen(path,mode) hnjFopen(path,mode)
#define fclose(file) hnjFclose(file)
#define fgets(buf,count,file) hnjFgets(buf,count,file)
+#define feof(file) hnjFeof(file)
+#define fgetc(file) hnjFgetc(file)
typedef struct hnjFile_ hnjFile;
@@ -44,6 +46,10 @@ int hnjFclose(hnjFile* f);
char* hnjFgets(char* s, int n, hnjFile* f);
+int hnjFeof(hnjFile* f);
+
+int hnjFgetc(hnjFile* f);
+
#ifdef __cplusplus
}
#endif
diff --git intl/hyphenation/glue/hnjstdio.cpp intl/hyphenation/glue/hnjstdio.cpp
index 660ebaf13291..8d50ae17f57b 100644
--- intl/hyphenation/glue/hnjstdio.cpp
+++ intl/hyphenation/glue/hnjstdio.cpp
@@ -22,6 +22,7 @@ struct hnjFile_ {
char mBuffer[BUFSIZE];
uint32_t mCurPos;
uint32_t mLimit;
+ bool mEOF;
};
// replacement for fopen()
@@ -58,6 +59,7 @@ hnjFopen(const char* aURISpec, const char* aMode)
f->mStream = instream;
f->mCurPos = 0;
f->mLimit = 0;
+ f->mEOF = false;
return f;
}
@@ -79,6 +81,27 @@ hnjFclose(hnjFile* f)
return result;
}
+// replacement for fgetc()
+int
+hnjFgetc(hnjFile* f)
+{
+ if (f->mCurPos >= f->mLimit) {
+ f->mCurPos = 0;
+
+ nsresult rv = f->mStream->Read(f->mBuffer, BUFSIZE, &f->mLimit);
+ if (NS_FAILED(rv)) {
+ f->mLimit = 0;
+ }
+
+ if (f->mLimit == 0) {
+ f->mEOF = true;
+ return EOF;
+ }
+ }
+
+ return f->mBuffer[f->mCurPos++];
+}
+
// replacement for fgets()
// (not a full reimplementation, but sufficient for libhyphen's needs)
char*
@@ -88,24 +111,15 @@ hnjFgets(char* s, int n, hnjFile* f)
int i = 0;
while (i < n - 1) {
- if (f->mCurPos < f->mLimit) {
- char c = f->mBuffer[f->mCurPos++];
- s[i++] = c;
- if (c == '\n' || c == '\r') {
- break;
- }
- continue;
- }
-
- f->mCurPos = 0;
+ int c = hnjFgetc(f);
- nsresult rv = f->mStream->Read(f->mBuffer, BUFSIZE, &f->mLimit);
- if (NS_FAILED(rv)) {
- f->mLimit = 0;
- return nullptr;
+ if (c == EOF) {
+ break;
}
- if (f->mLimit == 0) {
+ s[i++] = c;
+
+ if (c == '\n' || c == '\r') {
break;
}
}
@@ -117,3 +131,9 @@ hnjFgets(char* s, int n, hnjFile* f)
s[i] = '\0'; // null-terminate the returned string
return s;
}
+
+int
+hnjFeof(hnjFile* f)
+{
+ return f->mEOF ? EOF : 0;
+}
commit 5174306ad60c
Author: Jonathan Kew <jkew@mozilla.com>
Date: Mon Mar 26 20:35:48 2018 +0100
Bug 1448771 - Merge fix from upstream. r=ryanvm, a=RyanVM
--HG--
extra : source : f5db47b5c6416a3cef546de1aa9089d98109f95f
---
intl/hyphenation/hyphen/hyphen.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git intl/hyphenation/hyphen/hyphen.c intl/hyphenation/hyphen/hyphen.c
index 9a132d0262f2..9f2b7112c848 100644
--- intl/hyphenation/hyphen/hyphen.c
+++ intl/hyphenation/hyphen/hyphen.c
@@ -438,11 +438,25 @@ for (k = 0; k < 2; k++) {
}
if (k == 0 || nextlevel) {
- while (fgets (buf, sizeof(buf), f) != NULL) {
+ while (fgets(buf, sizeof(buf), f) != NULL) {
+
+ /* discard lines that don't fit in buffer */
+ if (!feof(f) && strchr(buf, '\n') == NULL) {
+ int c;
+ while ((c = fgetc(f)) != '\n' && c != EOF);
+ /* issue warning if not a comment */
+ if (buf[0] != '%') {
+ fprintf(stderr, "Warning: skipping too long pattern (more than %lu chars)\n", sizeof(buf));
+ }
+ continue;
+ }
+
if (strncmp(buf, "NEXTLEVEL", 9) == 0) {
- nextlevel = 1;
- break;
- } else if (buf[0] != '%') hnj_hyphen_load_line(buf, dict[k], hashtab);
+ nextlevel = 1;
+ break;
+ } else if (buf[0] != '%') {
+ hnj_hyphen_load_line(buf, dict[k], hashtab);
+ }
}
} else if (k == 1) {
/* default first level: hyphen and ASCII apostrophe */

View File

@ -1,51 +0,0 @@
commit 98fd83a90019
Author: Alex Gaynor <agaynor@mozilla.com>
Date: Tue Apr 17 10:14:20 2018 -0400
Bug 1449358 - Consistently use PR memory functions. r=mayhemer a=lizzard
--HG--
extra : source : b876ed208711bc346d7ca95b0599f6e4eb02ff2e
---
extensions/auth/nsAuthSambaNTLM.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git extensions/auth/nsAuthSambaNTLM.cpp extensions/auth/nsAuthSambaNTLM.cpp
index 6aa34e211be6..86c408ec5bf4 100644
--- extensions/auth/nsAuthSambaNTLM.cpp
+++ extensions/auth/nsAuthSambaNTLM.cpp
@@ -5,6 +5,7 @@
#include "nsAuth.h"
#include "nsAuthSambaNTLM.h"
+#include "nspr.h"
#include "prenv.h"
#include "plbase64.h"
#include "prerror.h"
@@ -23,7 +24,7 @@ nsAuthSambaNTLM::~nsAuthSambaNTLM()
// ntlm_auth reads from stdin regularly so closing our file handles
// should cause it to exit.
Shutdown();
- free(mInitialMessage);
+ PR_Free(mInitialMessage);
}
void
@@ -248,7 +249,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
nsCString request;
request.AssignLiteral("TT ");
request.Append(encoded);
- free(encoded);
+ PR_Free(encoded);
request.Append('\n');
if (!WriteString(mToChildFD, request))
@@ -265,7 +266,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
if (!buf)
return NS_ERROR_FAILURE;
*outToken = nsMemory::Clone(buf, *outTokenLen);
- free(buf);
+ PR_Free(buf);
if (!*outToken) {
return NS_ERROR_OUT_OF_MEMORY;
}

View File

@ -1,48 +0,0 @@
commit 1a02eb4cc78c
Author: Bob Owen <bobowencode@gmail.com>
Date: Tue Apr 10 15:36:26 2018 +0100
Bug 1451376 - Properly enforce single PrintingParent per content process. r=jld, a=RyanVM
--HG--
extra : source : 6e0fe40d8a55a986a26844393853722824918ffe
---
dom/ipc/ContentParent.cpp | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git dom/ipc/ContentParent.cpp dom/ipc/ContentParent.cpp
index 3c3d2fbc3735..538b8edf121b 100644
--- dom/ipc/ContentParent.cpp
+++ dom/ipc/ContentParent.cpp
@@ -3347,11 +3347,15 @@ PPrintingParent*
ContentParent::AllocPPrintingParent()
{
#ifdef NS_PRINTING
- MOZ_ASSERT(!mPrintingParent,
- "Only one PrintingParent should be created per process.");
+ MOZ_RELEASE_ASSERT(!mPrintingParent,
+ "Only one PrintingParent should be created per process.");
// Create the printing singleton for this process.
mPrintingParent = new PrintingParent();
+
+ // Take another reference for IPDL code.
+ mPrintingParent.get()->AddRef();
+
return mPrintingParent.get();
#else
MOZ_ASSERT_UNREACHABLE("Should never be created if no printing.");
@@ -3363,8 +3367,11 @@ bool
ContentParent::DeallocPPrintingParent(PPrintingParent* printing)
{
#ifdef NS_PRINTING
- MOZ_ASSERT(mPrintingParent == printing,
- "Only one PrintingParent should have been created per process.");
+ MOZ_RELEASE_ASSERT(mPrintingParent == printing,
+ "Only one PrintingParent should have been created per process.");
+
+ // Release reference taken for IPDL code.
+ static_cast<PrintingParent*>(printing)->Release();
mPrintingParent = nullptr;
#else

View File

@ -1,39 +0,0 @@
commit aad12e2cf1e8
Author: Eric Rahm <erahm@mozilla.com>
Date: Mon Apr 9 11:01:59 2018 -0700
Bug 1452202 - Clean up PLDHashTable move operator. r=froydnj, a=RyanVM
--HG--
extra : source : 9036c64b7a66ffe93e717ca97642a4400e396d9c
---
xpcom/ds/PLDHashTable.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git xpcom/ds/PLDHashTable.cpp xpcom/ds/PLDHashTable.cpp
index 9f4954c158f7..6cdf285e367e 100644
--- xpcom/ds/PLDHashTable.cpp
+++ xpcom/ds/PLDHashTable.cpp
@@ -224,17 +224,17 @@ PLDHashTable::operator=(PLDHashTable&& aOther)
return *this;
}
- // Destruct |this|.
- this->~PLDHashTable();
-
- // |mOps| and |mEntrySize| are const so we can't assign them. Instead, we
- // require that they are equal. The justification for this is that they're
+ // |mOps| and |mEntrySize| are required to stay the same, they're
// conceptually part of the type -- indeed, if PLDHashTable was a templated
// type like nsTHashtable, they *would* be part of the type -- so it only
// makes sense to assign in cases where they match.
MOZ_RELEASE_ASSERT(mOps == aOther.mOps);
MOZ_RELEASE_ASSERT(mEntrySize == aOther.mEntrySize);
+ // Reconstruct |this|.
+ this->~PLDHashTable();
+ new (KnownNotNull, this) PLDHashTable(aOther.mOps, aOther.mEntrySize, 0);
+
// Move non-const pieces over.
mHashShift = Move(aOther.mHashShift);
mEntryCount = Move(aOther.mEntryCount);

View File

@ -1,30 +0,0 @@
commit 0cd6747277f1
Author: Valentin Gosu <valentin.gosu@gmail.com>
Date: Tue Apr 10 22:07:47 2018 +0200
Bug 1452417 - Hold a ref to mRequest in PACResolver::Notify. r=bagder, a=abillings
MozReview-Commit-ID: 1QeFlAiTCNt
--HG--
extra : source : f7fb95c9979452fe25e42873f54cf56a80a0a0d8
---
netwerk/base/ProxyAutoConfig.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git netwerk/base/ProxyAutoConfig.cpp netwerk/base/ProxyAutoConfig.cpp
index 2c965f8e8f4d..d562f321bb45 100644
--- netwerk/base/ProxyAutoConfig.cpp
+++ netwerk/base/ProxyAutoConfig.cpp
@@ -307,8 +307,9 @@ public:
// nsITimerCallback
NS_IMETHOD Notify(nsITimer *timer) override
{
- if (mRequest)
- mRequest->Cancel(NS_ERROR_NET_TIMEOUT);
+ nsCOMPtr<nsICancelable> request(mRequest);
+ if (request)
+ request->Cancel(NS_ERROR_NET_TIMEOUT);
mTimer = nullptr;
return NS_OK;
}

View File

@ -1,55 +0,0 @@
Mismerges found by comparing changes with Firefox 56
--- browser/components/customizableui/CustomizeMode.jsm
+++ browser/components/customizableui/CustomizeMode.jsm
@@ -735,7 +735,6 @@ CustomizeMode.prototype = {
// Put the tip contents in the popup.
let bundle = this.document.getElementById("bundle_browser");
const kLabelClass = "customization-tipPanel-link";
- // eslint-disable-next-line no-unsanitized/property
messageNode.unsafeSetInnerHTML(bundle.getFormattedString("customizeTips.tip0", [
"<label class=\"customization-tipPanel-em\" value=\"" +
bundle.getString("customizeTips.tip0.hint") + "\"/>",
--- dom/base/nsNodeUtils.cpp.orig
+++ dom/base/nsNodeUtils.cpp
@@ -589,6 +589,7 @@ nsNodeUtils::CloneAndAdopt(nsINode *aNode, bool aClone, bool aDeep,
if (wasRegistered) {
aNode->OwnerDoc()->UnregisterActivityObserver(aNode->AsElement());
}
+ aNode->mNodeInfo.swap(newNodeInfo);
if (elem) {
elem->NodeInfoChanged(newDoc);
}
--- dom/xslt/nsIDocumentTransformer.h
+++ dom/xslt/nsIDocumentTransformer.h
@@ -7,6 +7,7 @@
#include "nsISupports.h"
+class nsIContent;
class nsIDocument;
class nsIDOMNode;
class nsIURI;
--- security/nss/lib/softoken/softkver.h.orig
+++ security/nss/lib/softoken/softkver.h
@@ -26,6 +26,6 @@
#define SOFTOKEN_VMINOR 32
#define SOFTOKEN_VPATCH 1
#define SOFTOKEN_VBUILD 0
-#define SOFTOKEN_BETA PR_TRUE
+#define SOFTOKEN_BETA PR_FALSE
#endif /* _SOFTKVER_H_ */
--- widget/WidgetMessageUtils.h.orig
+++ widget/WidgetMessageUtils.h
@@ -35,10 +35,6 @@ struct ParamTraits<LookAndFeelInt>
};
template<>
-struct ParamTraits<nsTransparencyMode> : public ContiguousEnumSerializerInclusive<nsTransparencyMode, eTransparencyOpaque, eTransparencyBorderlessGlass>
-{ };
-
-template<>
struct ParamTraits<nsCursor>
: public ContiguousEnumSerializer<nsCursor, eCursor_standard, eCursorCount>
{