MFH: r471332
www/waterfox: apply some FF61 fixes Approved by: ports-secteam
This commit is contained in:
parent
d4fade37b7
commit
d746d76163
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=471333
@ -3,6 +3,7 @@
|
||||
PORTNAME= waterfox
|
||||
DISTVERSION= 56.2.0-31
|
||||
DISTVERSIONSUFFIX= -gf435a827f82ac
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= www ipv6
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
133
www/waterfox/files/patch-bug1452375
Normal file
133
www/waterfox/files/patch-bug1452375
Normal file
@ -0,0 +1,133 @@
|
||||
commit 73284efb9ac4
|
||||
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
|
||||
Date: Thu May 31 21:19:18 2018 -0400
|
||||
|
||||
Bug 1452375 - ssse3-scaler: handle init failure. r=sotaro, a=abillings
|
||||
|
||||
--HG--
|
||||
extra : amend_source : b9070901c9a52e7790db4e81ba093b08511bab6a
|
||||
---
|
||||
gfx/2d/ssse3-scaler.c | 8 +++++++-
|
||||
gfx/2d/ssse3-scaler.h | 4 +++-
|
||||
gfx/layers/basic/BasicCompositor.cpp | 14 +++++++-------
|
||||
3 files changed, 17 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git gfx/2d/ssse3-scaler.c gfx/2d/ssse3-scaler.c
|
||||
index 345844b841dc5..0a571e064dc31 100644
|
||||
--- gfx/2d/ssse3-scaler.c
|
||||
+++ gfx/2d/ssse3-scaler.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <tmmintrin.h>
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
+#include "ssse3-scaler.h"
|
||||
|
||||
typedef int32_t pixman_fixed_16_16_t;
|
||||
typedef pixman_fixed_16_16_t pixman_fixed_t;
|
||||
@@ -505,7 +506,7 @@ fail:
|
||||
/* scale the src from src_width/height to dest_width/height drawn
|
||||
* into the rectangle x,y width,height
|
||||
* src_stride and dst_stride are 4 byte units */
|
||||
-void ssse3_scale_data(uint32_t *src, int src_width, int src_height, int src_stride,
|
||||
+bool ssse3_scale_data(uint32_t *src, int src_width, int src_height, int src_stride,
|
||||
uint32_t *dest, int dest_width, int dest_height,
|
||||
int dest_stride,
|
||||
int x, int y,
|
||||
@@ -551,6 +552,10 @@ void ssse3_scale_data(uint32_t *src, int src_width, int src_height, int src_stri
|
||||
iter.data = NULL;
|
||||
|
||||
ssse3_bilinear_cover_iter_init(&iter);
|
||||
+
|
||||
+ if (!iter.fini)
|
||||
+ return false;
|
||||
+
|
||||
if (iter.data) {
|
||||
for (int iy = 0; iy < height; iy++) {
|
||||
ssse3_fetch_bilinear_cover(&iter, NULL);
|
||||
@@ -558,4 +563,5 @@ void ssse3_scale_data(uint32_t *src, int src_width, int src_height, int src_stri
|
||||
}
|
||||
ssse3_bilinear_cover_iter_fini(&iter);
|
||||
}
|
||||
+ return true;
|
||||
}
|
||||
diff --git gfx/2d/ssse3-scaler.h gfx/2d/ssse3-scaler.h
|
||||
index b3b53ed643689..ea8d8a066303a 100644
|
||||
--- gfx/2d/ssse3-scaler.h
|
||||
+++ gfx/2d/ssse3-scaler.h
|
||||
@@ -6,10 +6,12 @@
|
||||
#ifndef MOZILLA_GFX_2D_SSSE3_SCALER_H_
|
||||
#define MOZILLA_GFX_2D_SSSE3_SCALER_H_
|
||||
|
||||
+#include <stdbool.h>
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
-void ssse3_scale_data(uint32_t *src, int src_width, int src_height,
|
||||
+bool ssse3_scale_data(uint32_t *src, int src_width, int src_height,
|
||||
int src_stride,
|
||||
uint32_t *dest, int dest_width, int dest_height,
|
||||
int dest_rowstride,
|
||||
diff --git gfx/layers/basic/BasicCompositor.cpp gfx/layers/basic/BasicCompositor.cpp
|
||||
index 1ff27f7957301..634d9e3407f7b 100644
|
||||
--- gfx/layers/basic/BasicCompositor.cpp
|
||||
+++ gfx/layers/basic/BasicCompositor.cpp
|
||||
@@ -470,15 +470,15 @@ AttemptVideoScale(TextureSourceBasic* aSource, const SourceSurface* aSourceMask,
|
||||
RefPtr<DataSourceSurface> srcSource = aSource->GetSurface(aDest)->GetDataSurface();
|
||||
DataSourceSurface::ScopedMap mapSrc(srcSource, DataSourceSurface::READ);
|
||||
|
||||
- ssse3_scale_data((uint32_t*)mapSrc.GetData(), srcSource->GetSize().width, srcSource->GetSize().height,
|
||||
- mapSrc.GetStride()/4,
|
||||
- ((uint32_t*)dstData) + fillRect.x + (dstStride / 4) * fillRect.y, dstRect.width, dstRect.height,
|
||||
- dstStride / 4,
|
||||
- offset.x, offset.y,
|
||||
- fillRect.width, fillRect.height);
|
||||
+ bool success = ssse3_scale_data((uint32_t*)mapSrc.GetData(), srcSource->GetSize().width, srcSource->GetSize().height,
|
||||
+ mapSrc.GetStride()/4,
|
||||
+ ((uint32_t*)dstData) + fillRect.x + (dstStride / 4) * fillRect.y, dstRect.width, dstRect.height,
|
||||
+ dstStride / 4,
|
||||
+ offset.x, offset.y,
|
||||
+ fillRect.width, fillRect.height);
|
||||
|
||||
aDest->ReleaseBits(dstData);
|
||||
- return true;
|
||||
+ return success;
|
||||
} else
|
||||
#endif // MOZILLA_SSE_HAVE_CPUID_DETECTION
|
||||
return false;
|
||||
|
||||
commit 083548141193 (origin/esr52)
|
||||
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
|
||||
Date: Thu May 31 21:20:05 2018 -0400
|
||||
|
||||
Bug 1452375 - ssse3-scaler: make sure iter->x/y is representable. r=sotaro, a=abillings
|
||||
---
|
||||
gfx/2d/ssse3-scaler.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git gfx/2d/ssse3-scaler.c gfx/2d/ssse3-scaler.c
|
||||
index 0a571e064dc31..745f58f6f8f43 100644
|
||||
--- gfx/2d/ssse3-scaler.c
|
||||
+++ gfx/2d/ssse3-scaler.c
|
||||
@@ -45,6 +45,8 @@ typedef pixman_fixed_16_16_t pixman_fixed_t;
|
||||
#define pixman_fixed_to_int(f) ((int) ((f) >> 16))
|
||||
#define pixman_int_to_fixed(i) ((pixman_fixed_t) ((i) << 16))
|
||||
#define pixman_double_to_fixed(d) ((pixman_fixed_t) ((d) * 65536.0))
|
||||
+#define PIXMAN_FIXED_INT_MAX 32767
|
||||
+#define PIXMAN_FIXED_INT_MIN -32768
|
||||
typedef struct pixman_vector pixman_vector_t;
|
||||
|
||||
typedef int pixman_bool_t;
|
||||
@@ -464,6 +466,12 @@ ssse3_bilinear_cover_iter_init (pixman_iter_t *iter)
|
||||
bilinear_info_t *info;
|
||||
pixman_vector_t v;
|
||||
|
||||
+ if (iter->x > PIXMAN_FIXED_INT_MAX ||
|
||||
+ iter->x < PIXMAN_FIXED_INT_MIN ||
|
||||
+ iter->y > PIXMAN_FIXED_INT_MAX ||
|
||||
+ iter->y < PIXMAN_FIXED_INT_MIN)
|
||||
+ goto fail;
|
||||
+
|
||||
/* Reference point is the center of the pixel */
|
||||
v.vector[0] = pixman_int_to_fixed (iter->x) + pixman_fixed_1 / 2;
|
||||
v.vector[1] = pixman_int_to_fixed (iter->y) + pixman_fixed_1 / 2;
|
56
www/waterfox/files/patch-bug1458264
Normal file
56
www/waterfox/files/patch-bug1458264
Normal file
@ -0,0 +1,56 @@
|
||||
commit 6b3071113783
|
||||
Author: jgilbert@mozilla.com <jdashg@gmail.com>
|
||||
Date: Thu May 24 15:45:25 2018 -0700
|
||||
|
||||
Bug 1458264 - Reset UNPACK_SKIP vars when uploading zeros. r=kvark, a=RyanVM
|
||||
|
||||
MozReview-Commit-ID: ILB6MqgnrXX
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : 645475fd6b978b00b0b61eef42df2a771563968c
|
||||
extra : source : c2f90b73e27aa5402636aee5f03891298502c416
|
||||
---
|
||||
dom/canvas/WebGLContextDraw.cpp | 21 +++++++++++++++------
|
||||
1 file changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git dom/canvas/WebGLContextDraw.cpp dom/canvas/WebGLContextDraw.cpp
|
||||
index a28d93325692b..3f179477b3bcd 100644
|
||||
--- dom/canvas/WebGLContextDraw.cpp
|
||||
+++ dom/canvas/WebGLContextDraw.cpp
|
||||
@@ -205,7 +205,21 @@ WebGLContext::BindFakeBlack(uint32_t texUnit, TexTarget target, FakeBlackType fa
|
||||
UniquePtr<FakeBlackTexture>& fakeBlackTex = *slot;
|
||||
|
||||
if (!fakeBlackTex) {
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, 1);
|
||||
+ if (IsWebGL2()) {
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_SKIP_PIXELS, 0);
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_SKIP_ROWS, 0);
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_SKIP_IMAGES, 0);
|
||||
+ }
|
||||
+
|
||||
fakeBlackTex = FakeBlackTexture::Create(gl, target, fakeBlack);
|
||||
+
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_ALIGNMENT, mPixelStore_UnpackAlignment);
|
||||
+ if (IsWebGL2()) {
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_SKIP_PIXELS, mPixelStore_UnpackSkipPixels);
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_SKIP_ROWS, mPixelStore_UnpackSkipRows);
|
||||
+ gl->fPixelStorei(LOCAL_GL_UNPACK_SKIP_IMAGES, mPixelStore_UnpackSkipImages);
|
||||
+ }
|
||||
if (!fakeBlackTex) {
|
||||
return false;
|
||||
}
|
||||
@@ -995,13 +1009,8 @@ WebGLContext::FakeBlackTexture::Create(gl::GLContext* gl, TexTarget target,
|
||||
gl->fTexParameteri(target.get(), LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_NEAREST);
|
||||
gl->fTexParameteri(target.get(), LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_NEAREST);
|
||||
|
||||
- // We allocate our zeros on the heap, and we overallocate (16 bytes instead of 4) to
|
||||
- // minimize the risk of running into a driver bug in texImage2D, as it is a bit
|
||||
- // unusual maybe to create 1x1 textures, and the stack may not have the alignment that
|
||||
- // TexImage2D expects.
|
||||
-
|
||||
const webgl::DriverUnpackInfo dui = {texFormat, texFormat, LOCAL_GL_UNSIGNED_BYTE};
|
||||
- UniqueBuffer zeros = moz_xcalloc(1, 16); // Infallible allocation.
|
||||
+ UniqueBuffer zeros = moz_xcalloc(1, 4); // Infallible allocation.
|
||||
|
||||
MOZ_ASSERT(gl->IsCurrent());
|
||||
|
55
www/waterfox/files/patch-bug1464829
Normal file
55
www/waterfox/files/patch-bug1464829
Normal file
@ -0,0 +1,55 @@
|
||||
commit 325496dfe42a
|
||||
Author: Nicolas B. Pierron <nicolas.b.pierron@gmail.com>
|
||||
Date: Thu May 31 14:22:14 2018 +0200
|
||||
|
||||
Bug 1464829 - Ensure the recover instruction vector has the expected size. r=jandem, a=jcristau
|
||||
|
||||
--HG--
|
||||
extra : source : 931f3ee17589096df1e87223362051c0aec26931
|
||||
extra : intermediate-source : eab56078999a914abc3cf9ac16ca2ca7c06548d8
|
||||
---
|
||||
js/src/jit/JitFrameIterator.h | 2 --
|
||||
js/src/jit/JitFrames.cpp | 4 +---
|
||||
2 files changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git js/src/jit/JitFrameIterator.h js/src/jit/JitFrameIterator.h
|
||||
index ba5efef6a5438..3620badbda07e 100644
|
||||
--- js/src/jit/JitFrameIterator.h
|
||||
+++ js/src/jit/JitFrameIterator.h
|
||||
@@ -322,9 +322,7 @@ class RInstructionResults
|
||||
|
||||
MOZ_MUST_USE bool init(JSContext* cx, uint32_t numResults);
|
||||
bool isInitialized() const;
|
||||
-#ifdef DEBUG
|
||||
size_t length() const;
|
||||
-#endif
|
||||
|
||||
JitFrameLayout* frame() const;
|
||||
|
||||
diff --git js/src/jit/JitFrames.cpp js/src/jit/JitFrames.cpp
|
||||
index 646442b4c0358..dbb080e3d08d7 100644
|
||||
--- js/src/jit/JitFrames.cpp
|
||||
+++ js/src/jit/JitFrames.cpp
|
||||
@@ -1621,13 +1621,11 @@ RInstructionResults::isInitialized() const
|
||||
return initialized_;
|
||||
}
|
||||
|
||||
-#ifdef DEBUG
|
||||
size_t
|
||||
RInstructionResults::length() const
|
||||
{
|
||||
return results_->length();
|
||||
}
|
||||
-#endif
|
||||
|
||||
JitFrameLayout*
|
||||
RInstructionResults::frame() const
|
||||
@@ -2083,7 +2081,7 @@ SnapshotIterator::initInstructionResults(MaybeReadFallback& fallback)
|
||||
}
|
||||
|
||||
MOZ_ASSERT(results->isInitialized());
|
||||
- MOZ_ASSERT(results->length() == recover_.numInstructions() - 1);
|
||||
+ MOZ_RELEASE_ASSERT(results->length() == recover_.numInstructions() - 1);
|
||||
instructionResults_ = results;
|
||||
return true;
|
||||
}
|
96
www/waterfox/files/patch-bug1464872
Normal file
96
www/waterfox/files/patch-bug1464872
Normal file
@ -0,0 +1,96 @@
|
||||
commit c5d9b6fb8b07
|
||||
Author: Jon Coppeard <jcoppeard@mozilla.com>
|
||||
Date: Thu May 31 09:27:29 2018 +0100
|
||||
|
||||
Bug 1464872 - Add forward zone edge for debugger object when calculating sweep groups. r=sfink, a=RyanVM
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : 4bef781c44aec09e4e8cd13b4131f26548a9f5dc
|
||||
extra : source : 2d1e3d80489de3ac0ab0fef04f20cee5b117cbac
|
||||
---
|
||||
js/src/jit-test/tests/gc/bug-1464872.js | 14 ++++++++++
|
||||
js/src/vm/Debugger.cpp | 47 +++++++++++++++++++++------------
|
||||
2 files changed, 44 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git js/src/jit-test/tests/gc/bug-1464872.js js/src/jit-test/tests/gc/bug-1464872.js
|
||||
new file mode 100644
|
||||
index 0000000000000..433e4a1314ce5
|
||||
--- /dev/null
|
||||
+++ js/src/jit-test/tests/gc/bug-1464872.js
|
||||
@@ -0,0 +1,14 @@
|
||||
+var g = newGlobal();
|
||||
+var dbg = Debugger(g);
|
||||
+dbg.onEnterFrame = function(frame) {};
|
||||
+
|
||||
+var g2 = newGlobal();
|
||||
+g2[g] = g;
|
||||
+g2.evaluate("grayRoot()")
|
||||
+g2 = undefined;
|
||||
+
|
||||
+g = undefined;
|
||||
+dbg = undefined;
|
||||
+
|
||||
+gc();
|
||||
+startgc(100000);
|
||||
diff --git js/src/vm/Debugger.cpp js/src/vm/Debugger.cpp
|
||||
index 09b82b9a60d48..26afc6e84f4b4 100644
|
||||
--- js/src/vm/Debugger.cpp
|
||||
+++ js/src/vm/Debugger.cpp
|
||||
@@ -3282,26 +3282,39 @@ Debugger::detachAllDebuggersFromGlobal(FreeOp* fop, GlobalObject* global)
|
||||
/* static */ void
|
||||
Debugger::findZoneEdges(Zone* zone, js::gc::ZoneComponentFinder& finder)
|
||||
{
|
||||
- /*
|
||||
- * For debugger cross compartment wrappers, add edges in the opposite
|
||||
- * direction to those already added by JSCompartment::findOutgoingEdges.
|
||||
- * This ensure that debuggers and their debuggees are finalized in the same
|
||||
- * group.
|
||||
- */
|
||||
for (ZoneGroupsIter group(zone->runtimeFromActiveCooperatingThread()); !group.done(); group.next()) {
|
||||
for (Debugger* dbg : group->debuggerList()) {
|
||||
- Zone* w = dbg->object->zone();
|
||||
- if (w == zone || !w->isGCMarking())
|
||||
- continue;
|
||||
- if (dbg->debuggeeZones.has(zone) ||
|
||||
- dbg->scripts.hasKeyInZone(zone) ||
|
||||
- dbg->sources.hasKeyInZone(zone) ||
|
||||
- dbg->objects.hasKeyInZone(zone) ||
|
||||
- dbg->environments.hasKeyInZone(zone) ||
|
||||
- dbg->wasmInstanceScripts.hasKeyInZone(zone) ||
|
||||
- dbg->wasmInstanceSources.hasKeyInZone(zone))
|
||||
- {
|
||||
- finder.addEdgeTo(w);
|
||||
+ Zone* debuggerZone = dbg->object->zone();
|
||||
+ if (!debuggerZone->isGCMarking())
|
||||
+ continue;
|
||||
+
|
||||
+ if (debuggerZone == zone) {
|
||||
+ /*
|
||||
+ * Add edges to debuggee zones. These are weak references that are
|
||||
+ * not in the cross compartment wrapper map.
|
||||
+ */
|
||||
+ for (auto e = dbg->debuggeeZones.all(); !e.empty(); e.popFront()) {
|
||||
+ Zone* debuggeeZone = e.front();
|
||||
+ if (debuggeeZone->isGCMarking())
|
||||
+ finder.addEdgeTo(debuggeeZone);
|
||||
+ }
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * For debugger cross compartment wrappers, add edges in the
|
||||
+ * opposite direction to those already added by
|
||||
+ * JSCompartment::findOutgoingEdges and above. This ensure that
|
||||
+ * debuggers and their debuggees are finalized in the same group.
|
||||
+ */
|
||||
+ if (dbg->debuggeeZones.has(zone) ||
|
||||
+ dbg->scripts.hasKeyInZone(zone) ||
|
||||
+ dbg->sources.hasKeyInZone(zone) ||
|
||||
+ dbg->objects.hasKeyInZone(zone) ||
|
||||
+ dbg->environments.hasKeyInZone(zone) ||
|
||||
+ dbg->wasmInstanceScripts.hasKeyInZone(zone) ||
|
||||
+ dbg->wasmInstanceSources.hasKeyInZone(zone))
|
||||
+ {
|
||||
+ finder.addEdgeTo(debuggerZone);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user