From owner-svn-ports-all@freebsd.org Tue Apr 10 00:12:23 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EBF7F8A744; Tue, 10 Apr 2018 00:12:23 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 010DF701DD; Tue, 10 Apr 2018 00:12:23 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F001325E07; Tue, 10 Apr 2018 00:12:22 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3A0CMnH062513; Tue, 10 Apr 2018 00:12:22 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3A0CMu1062509; Tue, 10 Apr 2018 00:12:22 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201804100012.w3A0CMu1062509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Tue, 10 Apr 2018 00:12:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r466918 - in head/www/waterfox: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/www/waterfox: . files X-SVN-Commit-Revision: 466918 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2018 00:12:23 -0000 Author: jbeich Date: Tue Apr 10 00:12:22 2018 New Revision: 466918 URL: https://svnweb.freebsd.org/changeset/ports/466918 Log: www/waterfox: apply some FF60 fixes Added: head/www/waterfox/files/patch-bug1203273 (contents, props changed) head/www/waterfox/files/patch-bug1427480 (contents, props changed) head/www/waterfox/files/patch-bug1432793 (contents, props changed) Modified: head/www/waterfox/Makefile (contents, props changed) Modified: head/www/waterfox/Makefile ============================================================================== --- head/www/waterfox/Makefile Tue Apr 10 00:12:01 2018 (r466917) +++ head/www/waterfox/Makefile Tue Apr 10 00:12:22 2018 (r466918) @@ -2,7 +2,7 @@ PORTNAME= waterfox DISTVERSION= 56.1.0 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= www ipv6 MAINTAINER= jbeich@FreeBSD.org Added: head/www/waterfox/files/patch-bug1203273 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1203273 Tue Apr 10 00:12:22 2018 (r466918) @@ -0,0 +1,68 @@ +commit 18bd60050c9c +Author: Jon Coppeard +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(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 Added: head/www/waterfox/files/patch-bug1427480 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1427480 Tue Apr 10 00:12:22 2018 (r466918) @@ -0,0 +1,40 @@ +commit ce0b5382185d +Author: Jonathan Kew +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 Added: head/www/waterfox/files/patch-bug1432793 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/waterfox/files/patch-bug1432793 Tue Apr 10 00:12:22 2018 (r466918) @@ -0,0 +1,218 @@ +commit b1ccdd29d2a5 +Author: Dan Minor +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 + 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( ++ 1 + std::min(CountTrailingZeroes32(width), ++ CountTrailingZeroes32(height)))); ++ ++ // We only allow one layer when screensharing ++ if (mConduit->mCodecMode == webrtc::VideoCodecMode::kScreensharing) { ++ streamCount = 1; ++ } ++ + std::vector streams; + streams.reserve(streamCount); + MOZ_ASSERT(mConduit); + +commit 18e2cf9aac7a +Author: Dan Minor +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 @@ ++ ++ ++ ++ ++ ++ ++ ++
++
++
++ ++