MFH: r466918
www/waterfox: apply some FF60 fixes Approved by: ports-secteam blanket
This commit is contained in:
parent
0bfd06a6b2
commit
3468386e32
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=466932
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= waterfox
|
||||
DISTVERSION= 56.1.0
|
||||
PORTREVISION= 7
|
||||
PORTREVISION= 8
|
||||
CATEGORIES= www ipv6
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
68
www/waterfox/files/patch-bug1203273
Normal file
68
www/waterfox/files/patch-bug1203273
Normal file
@ -0,0 +1,68 @@
|
||||
commit 18bd60050c9c
|
||||
Author: Jon Coppeard <jcoppeard@mozilla.com>
|
||||
Date: Tue Mar 20 10:19:37 2018 +0000
|
||||
|
||||
Bug 1203273 - Add a canary to check gray buffers are valid. r=sfink, a=RyanVM
|
||||
|
||||
--HG--
|
||||
extra : source : b1dacff4b3744f303f04ad9f53c670608af8b17a
|
||||
---
|
||||
js/src/gc/RootMarking.cpp | 23 ++++++++++++++++++++++-
|
||||
1 file changed, 22 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git js/src/gc/RootMarking.cpp js/src/gc/RootMarking.cpp
|
||||
index 384edb9fdd2a..a5c408b687b9 100644
|
||||
--- js/src/gc/RootMarking.cpp
|
||||
+++ js/src/gc/RootMarking.cpp
|
||||
@@ -460,6 +460,7 @@ class BufferGrayRootsTracer final : public JS::CallbackTracer
|
||||
{}
|
||||
|
||||
bool failed() const { return bufferingGrayRootsFailed; }
|
||||
+ void setFailed() { bufferingGrayRootsFailed = true; }
|
||||
|
||||
#ifdef DEBUG
|
||||
TracerKind getTracerKind() const override { return TracerKind::GrayBuffering; }
|
||||
@@ -477,6 +478,9 @@ js::IsBufferGrayRootsTracer(JSTracer* trc)
|
||||
}
|
||||
#endif
|
||||
|
||||
+// A canary value used to check the gray buffer contents are valid.
|
||||
+static Cell* const GrayBufferCanary = reinterpret_cast<Cell*>(0x47726179); // "Gray"
|
||||
+
|
||||
void
|
||||
js::gc::GCRuntime::bufferGrayRoots()
|
||||
{
|
||||
@@ -490,6 +494,12 @@ js::gc::GCRuntime::bufferGrayRoots()
|
||||
if (JSTraceDataOp op = grayRootTracer.op)
|
||||
(*op)(&grayBufferer, grayRootTracer.data);
|
||||
|
||||
+ // Push a canary value onto the end of the list.
|
||||
+ for (GCZonesIter zone(rt); !zone.done(); zone.next()) {
|
||||
+ if (!zone->gcGrayRoots().empty() && !zone->gcGrayRoots().append(GrayBufferCanary))
|
||||
+ grayBufferer.setFailed();
|
||||
+ }
|
||||
+
|
||||
// Propagate the failure flag from the marker to the runtime.
|
||||
if (grayBufferer.failed()) {
|
||||
grayBufferState = GrayBufferState::Failed;
|
||||
@@ -531,8 +541,19 @@ GCRuntime::markBufferedGrayRoots(JS::Zone* zone)
|
||||
MOZ_ASSERT(grayBufferState == GrayBufferState::Okay);
|
||||
MOZ_ASSERT(zone->isGCMarkingGray() || zone->isGCCompacting());
|
||||
|
||||
- for (auto cell : zone->gcGrayRoots())
|
||||
+ auto& roots = zone->gcGrayRoots();
|
||||
+ if (roots.empty())
|
||||
+ return;
|
||||
+
|
||||
+ // Check for and remove canary value.
|
||||
+ MOZ_RELEASE_ASSERT(roots.length() > 1);
|
||||
+ MOZ_RELEASE_ASSERT(roots.back() == GrayBufferCanary);
|
||||
+ roots.popBack();
|
||||
+
|
||||
+ for (auto cell : zone->gcGrayRoots()) {
|
||||
+ MOZ_ASSERT(IsCellPointerValid(cell));
|
||||
TraceManuallyBarrieredGenericPointerEdge(&marker, &cell, "buffered gray root");
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
40
www/waterfox/files/patch-bug1427480
Normal file
40
www/waterfox/files/patch-bug1427480
Normal file
@ -0,0 +1,40 @@
|
||||
commit ce0b5382185d
|
||||
Author: Jonathan Kew <jkew@mozilla.com>
|
||||
Date: Tue Mar 20 18:02:18 2018 +0000
|
||||
|
||||
Bug 1427480 - Increase the MAX_FONT_SIZE limit applied in cairo_ft_font to match the gfxFont size limit. r=lsalzman, a=RyanVM
|
||||
|
||||
--HG--
|
||||
extra : source : 74ffac5bc156c537ff4b1cc3d98dbb2c61b3127d
|
||||
extra : histedit_source : ee241f50804b89b4d545aedc5503cf0cb7c767f7
|
||||
---
|
||||
gfx/cairo/cairo/src/cairo-ft-font.c | 2 +-
|
||||
gfx/cairo/max-font-size.patch | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git gfx/cairo/cairo/src/cairo-ft-font.c gfx/cairo/cairo/src/cairo-ft-font.c
|
||||
index 9d0e4951a28e..56430740a20c 100644
|
||||
--- gfx/cairo/cairo/src/cairo-ft-font.c
|
||||
+++ gfx/cairo/cairo/src/cairo-ft-font.c
|
||||
@@ -103,7 +103,7 @@ static setLcdFilterFunc setLcdFilter;
|
||||
#define MAX_OPEN_FACES 10
|
||||
/* This is the maximum font size we allow to be passed to FT_Set_Char_Size
|
||||
*/
|
||||
-#define MAX_FONT_SIZE 1000
|
||||
+#define MAX_FONT_SIZE 2000
|
||||
|
||||
extern FT_Face mozilla_NewFTFace(FT_Library aFTLibrary, const char* aFileName, int aFaceIndex);
|
||||
extern FT_Face mozilla_NewFTFaceFromData(FT_Library aFTLibrary, const uint8_t* aData, size_t aDataSize, int aFaceIndex);
|
||||
diff --git gfx/cairo/max-font-size.patch gfx/cairo/max-font-size.patch
|
||||
index 99be23906ab4..efa54cef646a 100644
|
||||
--- gfx/cairo/max-font-size.patch
|
||||
+++ gfx/cairo/max-font-size.patch
|
||||
@@ -8,7 +8,7 @@ diff --git a/gfx/cairo/cairo/src/cairo-ft-font.c b/gfx/cairo/cairo/src/cairo-ft-
|
||||
+
|
||||
+/* This is the maximum font size we allow to be passed to FT_Set_Char_Size
|
||||
+ */
|
||||
-+#define MAX_FONT_SIZE 1000
|
||||
++#define MAX_FONT_SIZE 2000
|
||||
|
||||
/*
|
||||
* The simple 2x2 matrix is converted into separate scale and shape
|
218
www/waterfox/files/patch-bug1432793
Normal file
218
www/waterfox/files/patch-bug1432793
Normal file
@ -0,0 +1,218 @@
|
||||
commit b1ccdd29d2a5
|
||||
Author: Dan Minor <dminor@mozilla.com>
|
||||
Date: Wed Mar 28 11:07:54 2018 -0400
|
||||
|
||||
Bug 1432793 - Force screensharing simulcast to one layer and stop generating layers once an odd width and height are found. r=bwc, a=RyanVM
|
||||
|
||||
This limits screensharing simulcast to a single layer. When window sharing, our
|
||||
source video can have arbitrary dimensions. If one of those dimensions ends up
|
||||
being odd, the aspect ratio of the smaller layer will not match the aspect ratio
|
||||
of the odd sized layer, causing a runtime assertion failure and crash.
|
||||
|
||||
It is not sufficient to prevent the creation of odd sized layers in
|
||||
CreateEncoderStreams because the user can resize the window while it is being
|
||||
shared, which will cause a fatal assertion prior to the streams being recreated.
|
||||
|
||||
When switching back from window sharing to camera, a call to
|
||||
CreateEncoderStreams will occur with resolutions matching the dimensions of
|
||||
the window that was just shared. To prevent a crash, this also adds a check
|
||||
which prevents the creation of layers with odd resolutions.
|
||||
|
||||
Looking at cricket::GetSimulcastConfig for the version of webrtc.org in tree,
|
||||
the number of simulcast layers is limited to one, or two if a field experiment
|
||||
is enabled. That code also limits resolutions at which screensharing is allowed
|
||||
as well as the number of layers that can be created for each resolution, and
|
||||
ensures that each layer is exactly half the size of the layer above.
|
||||
|
||||
Adding these new constraints to CreateEncoderStreams makes us more consistent
|
||||
with what the webrtc.org code would do when creating streams, which should
|
||||
help to avoid more assertion failures in the future. Long term, I believe we
|
||||
should just switch to using cricket::GetSimulcastConfig.
|
||||
|
||||
MozReview-Commit-ID: 8gjdY5GPPjl
|
||||
|
||||
--HG--
|
||||
extra : source : 5c5a16ba81b7a2599d2764164d959a549a131d0a
|
||||
---
|
||||
media/webrtc/signaling/src/media-conduit/VideoConduit.cpp | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git media/webrtc/signaling/src/media-conduit/VideoConduit.cpp media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
|
||||
index b67e1d475e50..aafcbd3d4ddc 100644
|
||||
--- media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
|
||||
+++ media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
|
||||
@@ -579,7 +579,20 @@ std::vector<webrtc::VideoStream>
|
||||
WebrtcVideoConduit::VideoStreamFactory::CreateEncoderStreams(int width, int height,
|
||||
const webrtc::VideoEncoderConfig& config)
|
||||
{
|
||||
- auto streamCount = config.number_of_streams;
|
||||
+ size_t streamCount = config.number_of_streams;
|
||||
+
|
||||
+ // Disallow odd width and height, they will cause aspect ratio checks to
|
||||
+ // fail in the webrtc.org code. We can hit transient states after window
|
||||
+ // sharing ends where odd resolutions are requested for the camera.
|
||||
+ streamCount = std::min(streamCount, static_cast<size_t>(
|
||||
+ 1 + std::min(CountTrailingZeroes32(width),
|
||||
+ CountTrailingZeroes32(height))));
|
||||
+
|
||||
+ // We only allow one layer when screensharing
|
||||
+ if (mConduit->mCodecMode == webrtc::VideoCodecMode::kScreensharing) {
|
||||
+ streamCount = 1;
|
||||
+ }
|
||||
+
|
||||
std::vector<webrtc::VideoStream> streams;
|
||||
streams.reserve(streamCount);
|
||||
MOZ_ASSERT(mConduit);
|
||||
|
||||
commit 18e2cf9aac7a
|
||||
Author: Dan Minor <dminor@mozilla.com>
|
||||
Date: Wed Apr 4 09:24:28 2018 -0400
|
||||
|
||||
Bug 1432793 - Add mochitest for odd simulcast resolutions. r=bwc, a=RyanVM
|
||||
|
||||
This creates a simulcast stream with an odd resolution. This previously would
|
||||
have caused a runtime assertion failure and crash.
|
||||
|
||||
MozReview-Commit-ID: IsywVOu6UeV
|
||||
|
||||
--HG--
|
||||
extra : source : f1929e2b77a96af699e244f96bc4ecc17d34ece5
|
||||
---
|
||||
dom/media/tests/mochitest/head.js | 11 ++-
|
||||
dom/media/tests/mochitest/mochitest.ini | 2 +
|
||||
...test_peerConnection_simulcastOddResolution.html | 91 ++++++++++++++++++++++
|
||||
3 files changed, 100 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git dom/media/tests/mochitest/head.js dom/media/tests/mochitest/head.js
|
||||
index b125ecdeecf6..9bdfcdbfaf69 100644
|
||||
--- dom/media/tests/mochitest/head.js
|
||||
+++ dom/media/tests/mochitest/head.js
|
||||
@@ -994,11 +994,14 @@ AudioStreamHelper.prototype = {
|
||||
}
|
||||
|
||||
class VideoFrameEmitter {
|
||||
- constructor(color1, color2, size) {
|
||||
- if (!size) {
|
||||
- size = 50;
|
||||
+ constructor(color1, color2, width, height) {
|
||||
+ if (!width) {
|
||||
+ width = 50;
|
||||
}
|
||||
- this._helper = new CaptureStreamTestHelper2D(size, size);
|
||||
+ if (!height) {
|
||||
+ height = width;
|
||||
+ }
|
||||
+ this._helper = new CaptureStreamTestHelper2D(width, height);
|
||||
this._canvas = this._helper.createAndAppendElement('canvas', 'source_canvas');
|
||||
this._color1 = color1 ? color1 : this._helper.green;
|
||||
this._color2 = color2 ? color2 : this._helper.red;
|
||||
diff --git dom/media/tests/mochitest/mochitest.ini dom/media/tests/mochitest/mochitest.ini
|
||||
index 43e8492b9295..07c0876318a0 100644
|
||||
--- dom/media/tests/mochitest/mochitest.ini
|
||||
+++ dom/media/tests/mochitest/mochitest.ini
|
||||
@@ -194,6 +194,8 @@ skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emula
|
||||
skip-if = android_version # no simulcast support on android
|
||||
[test_peerConnection_simulcastAnswer.html]
|
||||
skip-if = android_version # no simulcast support on android
|
||||
+[test_peerConnection_simulcastOddResolution.html]
|
||||
+skip-if = android_version # no simulcast support on android
|
||||
#[test_peerConnection_relayOnly.html]
|
||||
[test_peerConnection_callbacks.html]
|
||||
skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator)
|
||||
diff --git dom/media/tests/mochitest/test_peerConnection_simulcastOddResolution.html dom/media/tests/mochitest/test_peerConnection_simulcastOddResolution.html
|
||||
new file mode 100644
|
||||
index 000000000000..351582b69fab
|
||||
--- /dev/null
|
||||
+++ dom/media/tests/mochitest/test_peerConnection_simulcastOddResolution.html
|
||||
@@ -0,0 +1,91 @@
|
||||
+<!DOCTYPE HTML>
|
||||
+<html>
|
||||
+<head>
|
||||
+ <script type="application/javascript" src="pc.js"></script>
|
||||
+ <script type="application/javascript" src="/tests/dom/canvas/test/captureStream_common.js"></script>
|
||||
+</head>
|
||||
+<body>
|
||||
+<pre id="test">
|
||||
+<script type="application/javascript">
|
||||
+ createHTML({
|
||||
+ bug: "1432793",
|
||||
+ title: "Simulcast with odd resolution",
|
||||
+ visible: true
|
||||
+ });
|
||||
+
|
||||
+ function addRIDExtension(pc, extensionId) {
|
||||
+ const receivers = pc._pc.getReceivers();
|
||||
+ is(receivers.length, 1, "We have exactly one RTP receiver");
|
||||
+ const receiver = receivers[0];
|
||||
+
|
||||
+ SpecialPowers.wrap(pc._pc).mozAddRIDExtension(receiver, extensionId);
|
||||
+ }
|
||||
+
|
||||
+ function selectRecvRID(pc, rid) {
|
||||
+ const receivers = pc._pc.getReceivers();
|
||||
+ is(receivers.length, 1, "We have exactly one RTP receiver");
|
||||
+ const receiver = receivers[0];
|
||||
+
|
||||
+ SpecialPowers.wrap(pc._pc).mozAddRIDFilter(receiver, rid);
|
||||
+ }
|
||||
+
|
||||
+ runNetworkTest(() =>
|
||||
+ pushPrefs(['media.peerconnection.simulcast', true],
|
||||
+ // 180Kbps was determined empirically, set well-higher than
|
||||
+ // the 80Kbps+overhead needed for the two simulcast streams.
|
||||
+ // 100Kbps was apparently too low.
|
||||
+ ['media.peerconnection.video.min_bitrate_estimate', 180*1000]).then(() => {
|
||||
+ let emitter, helper;
|
||||
+
|
||||
+ test = new PeerConnectionTest({bundle: false});
|
||||
+ test.setMediaConstraints([{video: true}], [{video: true}]);
|
||||
+
|
||||
+ test.chain.replace("PC_REMOTE_GUM", [
|
||||
+ function PC_REMOTE_CANVAS_CAPTURESTREAM(test) {
|
||||
+ helper = new VideoStreamHelper();
|
||||
+ emitter = new VideoFrameEmitter(helper.green, helper.red, 49, 37);
|
||||
+ test.pcRemote.attachLocalStream(emitter.stream());
|
||||
+ emitter.start();
|
||||
+ }
|
||||
+ ]);
|
||||
+
|
||||
+ test.chain.insertAfter('PC_REMOTE_GET_OFFER', [
|
||||
+ function PC_REMOTE_SET_RIDS(test) {
|
||||
+ const senders = test.pcRemote._pc.getSenders();
|
||||
+ is(senders.length, 1, "We have exactly one RTP sender");
|
||||
+ const sender = senders[0];
|
||||
+ ok(sender.track, "Sender has a track");
|
||||
+
|
||||
+ return sender.setParameters({
|
||||
+ encodings: [{ rid: "foo", maxBitrate: 40000 },
|
||||
+ { rid: "bar", maxBitrate: 40000, scaleResolutionDownBy: 2 }]
|
||||
+ });
|
||||
+ },
|
||||
+ function PC_LOCAL_ADD_RIDS_TO_OFFER(test) {
|
||||
+ // Create a dummy offer, and use it to set simulcast stuff on the
|
||||
+ // offer we will actually be using.
|
||||
+ return test.createOffer(test.pcRemote).then(offer => {
|
||||
+ test._local_offer.sdp = sdputils.transferSimulcastProperties(
|
||||
+ offer.sdp, test._local_offer.sdp);
|
||||
+ info("Offer with RIDs: " + JSON.stringify(test._local_offer));
|
||||
+ ok(test._local_offer.sdp.match(/a=simulcast:/), "Modified offer has simulcast");
|
||||
+ ok(test._local_offer.sdp.match(/a=rid:foo/), "Modified offer has rid foo");
|
||||
+ ok(test._local_offer.sdp.match(/a=rid:bar/), "Modified offer has rid bar");
|
||||
+ ok(test._local_offer.sdp.match(/urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id/), "Modified offer has RID");
|
||||
+ });
|
||||
+ }
|
||||
+ ]);
|
||||
+
|
||||
+ test.chain.insertAfter('PC_LOCAL_GET_ANSWER',[
|
||||
+ function PC_LOCAL_REMOVE_SIMULCAST_ATTRS_FROM_ANSWER(test) {
|
||||
+ test._remote_answer.sdp =
|
||||
+ sdputils.removeSimulcastProperties(test._remote_answer.sdp);
|
||||
+ }
|
||||
+ ]);
|
||||
+ return test.run();
|
||||
+ })
|
||||
+ .catch(e => ok(false, "unexpected failure: " + e)));
|
||||
+</script>
|
||||
+</pre>
|
||||
+</body>
|
||||
+</html>
|
Loading…
Reference in New Issue
Block a user