MFH: r467545
www/waterfox: apply some FF60 fixes Approved by: ports-secteam blanket
This commit is contained in:
parent
4eb4c9a184
commit
c123ea6f3e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=467548
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= waterfox
|
||||
DISTVERSION= 56.1.0
|
||||
PORTREVISION= 10
|
||||
PORTREVISION= 11
|
||||
CATEGORIES= www ipv6
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
25
www/waterfox/files/patch-bug1393367
Normal file
25
www/waterfox/files/patch-bug1393367
Normal file
@ -0,0 +1,25 @@
|
||||
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];
|
214
www/waterfox/files/patch-bug1448863
Normal file
214
www/waterfox/files/patch-bug1448863
Normal file
@ -0,0 +1,214 @@
|
||||
commit 7fd98bb22f4c
|
||||
Author: Byron Campen [:bwc] <docfaraday@gmail.com>
|
||||
Date: Mon Mar 26 10:19:31 2018 -0500
|
||||
|
||||
Bug 1448863 - Stop sync dispatching in Decode. r=jesup, a=RyanVM
|
||||
|
||||
MozReview-Commit-ID: 3EK0zAsFpHz
|
||||
|
||||
--HG--
|
||||
extra : source : 549f0b8075d587eca29a6a72b1b62caf84d4b4fc
|
||||
---
|
||||
.../src/media-conduit/WebrtcGmpVideoCodec.cpp | 122 ++++++++++-----------
|
||||
.../src/media-conduit/WebrtcGmpVideoCodec.h | 7 +-
|
||||
media/webrtc/webrtc.mozbuild | 4 +
|
||||
3 files changed, 65 insertions(+), 68 deletions(-)
|
||||
|
||||
diff --git media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
|
||||
index 6cd4a1e1e200..81fd5f099454 100644
|
||||
--- media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
|
||||
+++ media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
|
||||
@@ -770,14 +770,8 @@ WebrtcGmpVideoDecoder::GmpInitDone(GMPVideoDecoderProxy* aGMP,
|
||||
nsTArray<UniquePtr<GMPDecodeData>> temp;
|
||||
temp.SwapElements(mQueuedFrames);
|
||||
for (auto& queued : temp) {
|
||||
- int rv = Decode_g(queued->mImage,
|
||||
- queued->mMissingFrames,
|
||||
- nullptr,
|
||||
- nullptr,
|
||||
- queued->mRenderTimeMs);
|
||||
- if (rv) {
|
||||
- return rv;
|
||||
- }
|
||||
+ Decode_g(RefPtr<WebrtcGmpVideoDecoder>(this),
|
||||
+ nsAutoPtr<GMPDecodeData>(queued.release()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,61 +799,58 @@ WebrtcGmpVideoDecoder::Decode(const webrtc::EncodedImage& aInputImage,
|
||||
const webrtc::CodecSpecificInfo* aCodecSpecificInfo,
|
||||
int64_t aRenderTimeMs)
|
||||
{
|
||||
- int32_t ret;
|
||||
MOZ_ASSERT(mGMPThread);
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
- // Would be really nice to avoid this sync dispatch, but it would require a
|
||||
- // copy of the frame, since it doesn't appear to actually have a refcount.
|
||||
- // Passing 'this' is safe since this is synchronous.
|
||||
- mozilla::SyncRunnable::DispatchToThread(mGMPThread,
|
||||
- WrapRunnableRet(&ret, this,
|
||||
- &WebrtcGmpVideoDecoder::Decode_g,
|
||||
- aInputImage,
|
||||
- aMissingFrames,
|
||||
- aFragmentation,
|
||||
- aCodecSpecificInfo,
|
||||
- aRenderTimeMs));
|
||||
+ if (!aInputImage._length) {
|
||||
+ return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ nsAutoPtr<GMPDecodeData> decodeData(new GMPDecodeData(aInputImage,
|
||||
+ aMissingFrames,
|
||||
+ aRenderTimeMs));
|
||||
+
|
||||
+ mGMPThread->Dispatch(WrapRunnableNM(&WebrtcGmpVideoDecoder::Decode_g,
|
||||
+ RefPtr<WebrtcGmpVideoDecoder>(this),
|
||||
+ decodeData),
|
||||
+ NS_DISPATCH_NORMAL);
|
||||
|
||||
- return ret;
|
||||
+ return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
-int32_t
|
||||
-WebrtcGmpVideoDecoder::Decode_g(const webrtc::EncodedImage& aInputImage,
|
||||
- bool aMissingFrames,
|
||||
- const webrtc::RTPFragmentationHeader* aFragmentation,
|
||||
- const webrtc::CodecSpecificInfo* aCodecSpecificInfo,
|
||||
- int64_t aRenderTimeMs)
|
||||
-{
|
||||
- if (!mGMP) {
|
||||
- if (mInitting) {
|
||||
+/* static */
|
||||
+// Using nsAutoPtr because WrapRunnable doesn't support move semantics
|
||||
+void
|
||||
+WebrtcGmpVideoDecoder::Decode_g(const RefPtr<WebrtcGmpVideoDecoder>& aThis,
|
||||
+ nsAutoPtr<GMPDecodeData> aDecodeData)
|
||||
+{
|
||||
+ if (!aThis->mGMP) {
|
||||
+ if (aThis->mInitting) {
|
||||
// InitDone hasn't been called yet (race)
|
||||
- GMPDecodeData *data = new GMPDecodeData(aInputImage,
|
||||
- aMissingFrames,
|
||||
- aRenderTimeMs);
|
||||
- mQueuedFrames.AppendElement(data);
|
||||
- return WEBRTC_VIDEO_CODEC_OK;
|
||||
+ aThis->mQueuedFrames.AppendElement(aDecodeData.forget());
|
||||
+ return;
|
||||
}
|
||||
// destroyed via Terminate(), failed to init, or just not initted yet
|
||||
LOGD(("GMP Decode: not initted yet"));
|
||||
- return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
+ return;
|
||||
}
|
||||
- MOZ_ASSERT(mQueuedFrames.IsEmpty());
|
||||
- MOZ_ASSERT(mHost);
|
||||
|
||||
- if (!aInputImage._length) {
|
||||
- return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
- }
|
||||
+ MOZ_ASSERT(aThis->mQueuedFrames.IsEmpty());
|
||||
+ MOZ_ASSERT(aThis->mHost);
|
||||
|
||||
GMPVideoFrame* ftmp = nullptr;
|
||||
- GMPErr err = mHost->CreateFrame(kGMPEncodedVideoFrame, &ftmp);
|
||||
+ GMPErr err = aThis->mHost->CreateFrame(kGMPEncodedVideoFrame, &ftmp);
|
||||
if (err != GMPNoErr) {
|
||||
- return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
+ LOG(LogLevel::Error, ("%s: CreateFrame failed (%u)!",
|
||||
+ __PRETTY_FUNCTION__, static_cast<unsigned>(err)));
|
||||
+ return;
|
||||
}
|
||||
|
||||
GMPUniquePtr<GMPVideoEncodedFrame> frame(static_cast<GMPVideoEncodedFrame*>(ftmp));
|
||||
- err = frame->CreateEmptyFrame(aInputImage._length);
|
||||
+ err = frame->CreateEmptyFrame(aDecodeData->mImage._length);
|
||||
if (err != GMPNoErr) {
|
||||
- return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
+ LOG(LogLevel::Error, ("%s: CreateEmptyFrame failed (%u)!",
|
||||
+ __PRETTY_FUNCTION__, static_cast<unsigned>(err)));
|
||||
+ return;
|
||||
}
|
||||
|
||||
// XXX At this point, we only will get mode1 data (a single length and a buffer)
|
||||
@@ -867,18 +858,20 @@ WebrtcGmpVideoDecoder::Decode_g(const webrtc::EncodedImage& aInputImage,
|
||||
*(reinterpret_cast<uint32_t*>(frame->Buffer())) = frame->Size();
|
||||
|
||||
// XXX It'd be wonderful not to have to memcpy the encoded data!
|
||||
- memcpy(frame->Buffer()+4, aInputImage._buffer+4, frame->Size()-4);
|
||||
+ memcpy(frame->Buffer()+4, aDecodeData->mImage._buffer+4, frame->Size()-4);
|
||||
|
||||
- frame->SetEncodedWidth(aInputImage._encodedWidth);
|
||||
- frame->SetEncodedHeight(aInputImage._encodedHeight);
|
||||
- frame->SetTimeStamp((aInputImage._timeStamp * 1000ll)/90); // rounds down
|
||||
- frame->SetCompleteFrame(aInputImage._completeFrame);
|
||||
+ frame->SetEncodedWidth(aDecodeData->mImage._encodedWidth);
|
||||
+ frame->SetEncodedHeight(aDecodeData->mImage._encodedHeight);
|
||||
+ frame->SetTimeStamp((aDecodeData->mImage._timeStamp * 1000ll)/90); // rounds down
|
||||
+ frame->SetCompleteFrame(aDecodeData->mImage._completeFrame);
|
||||
frame->SetBufferType(GMP_BufferLength32);
|
||||
|
||||
GMPVideoFrameType ft;
|
||||
- int32_t ret = WebrtcFrameTypeToGmpFrameType(aInputImage._frameType, &ft);
|
||||
+ int32_t ret = WebrtcFrameTypeToGmpFrameType(aDecodeData->mImage._frameType, &ft);
|
||||
if (ret != WEBRTC_VIDEO_CODEC_OK) {
|
||||
- return ret;
|
||||
+ LOG(LogLevel::Error, ("%s: WebrtcFrameTypeToGmpFrameType failed (%u)!",
|
||||
+ __PRETTY_FUNCTION__, static_cast<unsigned>(ret)));
|
||||
+ return;
|
||||
}
|
||||
|
||||
// Bug XXXXXX: Set codecSpecific info
|
||||
@@ -889,20 +882,23 @@ WebrtcGmpVideoDecoder::Decode_g(const webrtc::EncodedImage& aInputImage,
|
||||
nsTArray<uint8_t> codecSpecificInfo;
|
||||
codecSpecificInfo.AppendElements((uint8_t*)&info, sizeof(GMPCodecSpecificInfo));
|
||||
|
||||
- LOGD(("GMP Decode: %" PRIu64 ", len %zu%s", frame->TimeStamp(), aInputImage._length,
|
||||
- ft == kGMPKeyFrame ? ", KeyFrame" : ""));
|
||||
- nsresult rv = mGMP->Decode(Move(frame),
|
||||
- aMissingFrames,
|
||||
- codecSpecificInfo,
|
||||
- aRenderTimeMs);
|
||||
+ LOGD(("GMP Decode: %" PRIu64 ", len %zu%s", frame->TimeStamp(),
|
||||
+ aDecodeData->mImage._length, ft == kGMPKeyFrame ? ", KeyFrame" : ""));
|
||||
+
|
||||
+ nsresult rv = aThis->mGMP->Decode(Move(frame),
|
||||
+ aDecodeData->mMissingFrames,
|
||||
+ codecSpecificInfo,
|
||||
+ aDecodeData->mRenderTimeMs);
|
||||
if (NS_FAILED(rv)) {
|
||||
- return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
+ LOG(LogLevel::Error, ("%s: Decode failed (rv=%u)!",
|
||||
+ __PRETTY_FUNCTION__, static_cast<unsigned>(rv)));
|
||||
}
|
||||
- if(mDecoderStatus != GMPNoErr){
|
||||
- mDecoderStatus = GMPNoErr;
|
||||
- return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
+
|
||||
+ if(aThis->mDecoderStatus != GMPNoErr){
|
||||
+ aThis->mDecoderStatus = GMPNoErr;
|
||||
+ LOG(LogLevel::Error, ("%s: Decoder status is bad (%u)!",
|
||||
+ __PRETTY_FUNCTION__, static_cast<unsigned>(aThis->mDecoderStatus)));
|
||||
}
|
||||
- return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
int32_t
|
||||
diff --git media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
|
||||
index 0f125d0b311a..92b5a270267e 100644
|
||||
--- media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
|
||||
+++ media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
|
||||
@@ -469,11 +469,8 @@ private:
|
||||
RefPtr<GmpInitDoneRunnable> mInitDone;
|
||||
};
|
||||
|
||||
- virtual int32_t Decode_g(const webrtc::EncodedImage& aInputImage,
|
||||
- bool aMissingFrames,
|
||||
- const webrtc::RTPFragmentationHeader* aFragmentation,
|
||||
- const webrtc::CodecSpecificInfo* aCodecSpecificInfo,
|
||||
- int64_t aRenderTimeMs);
|
||||
+ static void Decode_g(const RefPtr<WebrtcGmpVideoDecoder>& aThis,
|
||||
+ nsAutoPtr<GMPDecodeData> aDecodeData);
|
||||
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mMPS;
|
||||
nsCOMPtr<nsIThread> mGMPThread;
|
39
www/waterfox/files/patch-bug1452202
Normal file
39
www/waterfox/files/patch-bug1452202
Normal file
@ -0,0 +1,39 @@
|
||||
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);
|
30
www/waterfox/files/patch-bug1452417
Normal file
30
www/waterfox/files/patch-bug1452417
Normal file
@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
172
www/waterfox/files/patch-bug1453339
Normal file
172
www/waterfox/files/patch-bug1453339
Normal file
@ -0,0 +1,172 @@
|
||||
commit b1ce2aee618c
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Fri Apr 13 19:31:42 2018 -0400
|
||||
|
||||
Bug 1453339 - Make it harder to mess up Promise::All. r=peterv, a=abillings
|
||||
|
||||
MozReview-Commit-ID: UO4wssYHj7
|
||||
|
||||
--HG--
|
||||
extra : source : 438494d2d17bec92e4f4e38661a85b60680ab087
|
||||
---
|
||||
dom/base/nsFrameLoader.cpp | 4 +---
|
||||
dom/cache/Cache.cpp | 2 +-
|
||||
dom/promise/Promise.cpp | 27 +++++++++++++++------------
|
||||
dom/promise/Promise.h | 19 +++++++++++--------
|
||||
layout/style/FontFaceSet.cpp | 12 +-----------
|
||||
5 files changed, 29 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git dom/base/nsFrameLoader.cpp dom/base/nsFrameLoader.cpp
|
||||
index 705779d87b80..f2730dac80b3 100644
|
||||
--- dom/base/nsFrameLoader.cpp
|
||||
+++ dom/base/nsFrameLoader.cpp
|
||||
@@ -409,8 +409,6 @@ nsFrameLoader::FireWillChangeProcessEvent()
|
||||
return nullptr;
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
- GlobalObject global(cx, mOwnerContent->GetOwnerGlobal()->GetGlobalJSObject());
|
||||
- MOZ_ASSERT(!global.Failed());
|
||||
|
||||
// Set our mBrowserChangingProcessBlockers property to refer to the blockers
|
||||
// list. We will synchronously dispatch a DOM event to collect this list of
|
||||
@@ -433,7 +431,7 @@ nsFrameLoader::FireWillChangeProcessEvent()
|
||||
mBrowserChangingProcessBlockers = nullptr;
|
||||
|
||||
ErrorResult rv;
|
||||
- RefPtr<Promise> allPromise = Promise::All(global, blockers, rv);
|
||||
+ RefPtr<Promise> allPromise = Promise::All(cx, blockers, rv);
|
||||
return allPromise.forget();
|
||||
}
|
||||
|
||||
diff --git dom/cache/Cache.cpp dom/cache/Cache.cpp
|
||||
index 06df0f2a7cb9..3fb8b6c36040 100644
|
||||
--- dom/cache/Cache.cpp
|
||||
+++ dom/cache/Cache.cpp
|
||||
@@ -630,7 +630,7 @@ Cache::AddAll(const GlobalObject& aGlobal,
|
||||
new FetchHandler(mActor->GetWorkerHolder(), this,
|
||||
Move(aRequestList), promise);
|
||||
|
||||
- RefPtr<Promise> fetchPromise = Promise::All(aGlobal, fetchList, aRv);
|
||||
+ RefPtr<Promise> fetchPromise = Promise::All(aGlobal.Context(), fetchList, aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
diff --git dom/promise/Promise.cpp dom/promise/Promise.cpp
|
||||
index d259d6cedfcb..88f026b26976 100644
|
||||
--- dom/promise/Promise.cpp
|
||||
+++ dom/promise/Promise.cpp
|
||||
@@ -134,37 +134,40 @@ Promise::Reject(nsIGlobalObject* aGlobal, JSContext* aCx,
|
||||
|
||||
// static
|
||||
already_AddRefed<Promise>
|
||||
-Promise::All(const GlobalObject& aGlobal,
|
||||
+Promise::All(JSContext* aCx,
|
||||
const nsTArray<RefPtr<Promise>>& aPromiseList, ErrorResult& aRv)
|
||||
{
|
||||
- nsCOMPtr<nsIGlobalObject> global;
|
||||
- global = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
- if (!global) {
|
||||
+ JS::Rooted<JSObject*> globalObj(aCx, JS::CurrentGlobalOrNull(aCx));
|
||||
+ if (!globalObj) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
- JSContext* cx = aGlobal.Context();
|
||||
+ nsCOMPtr<nsIGlobalObject> global = xpc::NativeGlobal(globalObj);
|
||||
+ if (!global) {
|
||||
+ aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
+ return nullptr;
|
||||
+ }
|
||||
|
||||
- JS::AutoObjectVector promises(cx);
|
||||
+ JS::AutoObjectVector promises(aCx);
|
||||
if (!promises.reserve(aPromiseList.Length())) {
|
||||
- aRv.NoteJSContextException(cx);
|
||||
+ aRv.NoteJSContextException(aCx);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (auto& promise : aPromiseList) {
|
||||
- JS::Rooted<JSObject*> promiseObj(cx, promise->PromiseObj());
|
||||
+ JS::Rooted<JSObject*> promiseObj(aCx, promise->PromiseObj());
|
||||
// Just in case, make sure these are all in the context compartment.
|
||||
- if (!JS_WrapObject(cx, &promiseObj)) {
|
||||
- aRv.NoteJSContextException(cx);
|
||||
+ if (!JS_WrapObject(aCx, &promiseObj)) {
|
||||
+ aRv.NoteJSContextException(aCx);
|
||||
return nullptr;
|
||||
}
|
||||
promises.infallibleAppend(promiseObj);
|
||||
}
|
||||
|
||||
- JS::Rooted<JSObject*> result(cx, JS::GetWaitForAllPromise(cx, promises));
|
||||
+ JS::Rooted<JSObject*> result(aCx, JS::GetWaitForAllPromise(aCx, promises));
|
||||
if (!result) {
|
||||
- aRv.NoteJSContextException(cx);
|
||||
+ aRv.NoteJSContextException(aCx);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
diff --git dom/promise/Promise.h dom/promise/Promise.h
|
||||
index 447a2a195152..2c13d0146c40 100644
|
||||
--- dom/promise/Promise.h
|
||||
+++ dom/promise/Promise.h
|
||||
@@ -111,23 +111,26 @@ public:
|
||||
return mGlobal;
|
||||
}
|
||||
|
||||
- // Do the equivalent of Promise.resolve in the current compartment of aCx.
|
||||
- // Errorrs are reported on the ErrorResult; if aRv comes back !Failed(), this
|
||||
- // function MUST return a non-null value.
|
||||
+ // Do the equivalent of Promise.resolve in the compartment of aGlobal. The
|
||||
+ // compartment of aCx is ignored. Errors are reported on the ErrorResult; if
|
||||
+ // aRv comes back !Failed(), this function MUST return a non-null value.
|
||||
static already_AddRefed<Promise>
|
||||
Resolve(nsIGlobalObject* aGlobal, JSContext* aCx,
|
||||
JS::Handle<JS::Value> aValue, ErrorResult& aRv);
|
||||
|
||||
- // Do the equivalent of Promise.reject in the current compartment of aCx.
|
||||
- // Errorrs are reported on the ErrorResult; if aRv comes back !Failed(), this
|
||||
- // function MUST return a non-null value.
|
||||
+ // Do the equivalent of Promise.reject in the compartment of aGlobal. The
|
||||
+ // compartment of aCx is ignored. Errors are reported on the ErrorResult; if
|
||||
+ // aRv comes back !Failed(), this function MUST return a non-null value.
|
||||
static already_AddRefed<Promise>
|
||||
Reject(nsIGlobalObject* aGlobal, JSContext* aCx,
|
||||
JS::Handle<JS::Value> aValue, ErrorResult& aRv);
|
||||
|
||||
+ // Do the equivalent of Promise.all in the current compartment of aCx. Errors
|
||||
+ // are reported on the ErrorResult; if aRv comes back !Failed(), this function
|
||||
+ // MUST return a non-null value.
|
||||
static already_AddRefed<Promise>
|
||||
- All(const GlobalObject& aGlobal,
|
||||
- const nsTArray<RefPtr<Promise>>& aPromiseList, ErrorResult& aRv);
|
||||
+ All(JSContext* aCx, const nsTArray<RefPtr<Promise>>& aPromiseList,
|
||||
+ ErrorResult& aRv);
|
||||
|
||||
void
|
||||
Then(JSContext* aCx,
|
||||
diff --git layout/style/FontFaceSet.cpp layout/style/FontFaceSet.cpp
|
||||
index 280bf30d96aa..f9038c8c4b14 100644
|
||||
--- layout/style/FontFaceSet.cpp
|
||||
+++ layout/style/FontFaceSet.cpp
|
||||
@@ -401,17 +401,7 @@ FontFaceSet::Load(JSContext* aCx,
|
||||
}
|
||||
}
|
||||
|
||||
- nsIGlobalObject* globalObject = GetParentObject();
|
||||
- if (!globalObject) {
|
||||
- aRv.Throw(NS_ERROR_FAILURE);
|
||||
- return nullptr;
|
||||
- }
|
||||
-
|
||||
- JS::Rooted<JSObject*> jsGlobal(aCx, globalObject->GetGlobalJSObject());
|
||||
- GlobalObject global(aCx, jsGlobal);
|
||||
-
|
||||
- RefPtr<Promise> result = Promise::All(global, promises, aRv);
|
||||
- return result.forget();
|
||||
+ return Promise::All(aCx, promises, aRv);
|
||||
}
|
||||
|
||||
bool
|
34
www/waterfox/files/patch-bug1453555
Normal file
34
www/waterfox/files/patch-bug1453555
Normal file
@ -0,0 +1,34 @@
|
||||
commit 5b6c49ed5c8d
|
||||
Author: James Teh <jteh@mozilla.com>
|
||||
Date: Thu Apr 12 16:32:19 2018 +1000
|
||||
|
||||
Bug 1453555: Fix accessibility group info for <select size="1"> options. r=surkov a=jcristau
|
||||
|
||||
In the e10s implementation, Accessible::NativeState for the options doesn't include the invisible state. (It does with e10s disabled.)
|
||||
In HTMLSelectOptionAccessible::NativeState, rather than just flipping (xor) the invisible state, absolutely ensure it gets removed. We don't want to *add* the invisible state if it isn't there.
|
||||
This allows group position info to be calculated correctly.
|
||||
|
||||
MozReview-Commit-ID: LPEVhOOm2NT
|
||||
|
||||
--HG--
|
||||
extra : source : f52a56dc215cfd8ea7310c168632d33531fc8c90
|
||||
---
|
||||
accessible/html/HTMLSelectAccessible.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git accessible/html/HTMLSelectAccessible.cpp accessible/html/HTMLSelectAccessible.cpp
|
||||
index 0cbe7ac89dce..efa05c1adfc1 100644
|
||||
--- accessible/html/HTMLSelectAccessible.cpp
|
||||
+++ accessible/html/HTMLSelectAccessible.cpp
|
||||
@@ -198,7 +198,10 @@ HTMLSelectOptionAccessible::NativeState()
|
||||
// visible option
|
||||
if (!selected) {
|
||||
state |= states::OFFSCREEN;
|
||||
- state ^= states::INVISIBLE;
|
||||
+ // Ensure the invisible state is removed. Otherwise, group info will skip
|
||||
+ // this option. Furthermore, this gets cached and this doesn't get
|
||||
+ // invalidated even once the select is expanded.
|
||||
+ state &= ~states::INVISIBLE;
|
||||
} else {
|
||||
// Clear offscreen and invisible for currently showing option
|
||||
state &= ~(states::OFFSCREEN | states::INVISIBLE);
|
35
www/waterfox/files/patch-bug1453740
Normal file
35
www/waterfox/files/patch-bug1453740
Normal file
@ -0,0 +1,35 @@
|
||||
commit 926d7ea39507
|
||||
Author: Dan Minor <dminor@mozilla.com>
|
||||
Date: Thu Apr 12 11:31:59 2018 -0700
|
||||
|
||||
Bug 1453740 - Allow 1x1 windows in VP8EncoderImpl::InitEncode; r=pehrsons a=jcristau
|
||||
|
||||
A minimized window has a resolution of 1x1. Although we removed minimized windows from the list
|
||||
of available windows to share, nothing prevents the user from minimizing it during a call. With
|
||||
the current code, this will cause InitEncode to fail, resulting in a fatal release assert.
|
||||
|
||||
I tested this patch with window sharing on meet.google.com and I was able to minimize and restore
|
||||
the window several times without problem. While minimized, the window appears as a black screen
|
||||
to the other meeting participants. It renders normally when restored.
|
||||
|
||||
MozReview-Commit-ID: LE2NBiEy8nw
|
||||
|
||||
--HG--
|
||||
extra : source : 1cece7d5df170946f822705ac7b28e2e57c0fd00
|
||||
---
|
||||
media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
||||
index 36f8552ad8d1..0fe2c6953868 100644
|
||||
--- media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
||||
+++ media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
|
||||
@@ -300,7 +300,7 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
|
||||
if (inst->maxBitrate > 0 && inst->startBitrate > inst->maxBitrate) {
|
||||
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
|
||||
}
|
||||
- if (inst->width <= 1 || inst->height <= 1) {
|
||||
+ if (inst->width < 1 || inst->height < 1) {
|
||||
return WEBRTC_VIDEO_CODEC_ERR_PARAMETER;
|
||||
}
|
||||
if (number_of_cores < 1) {
|
Loading…
Reference in New Issue
Block a user