aboutsummaryrefslogtreecommitdiff
path: root/www/firefox/files/patch-bug1618914
diff options
context:
space:
mode:
Diffstat (limited to 'www/firefox/files/patch-bug1618914')
-rw-r--r--www/firefox/files/patch-bug161891426
1 files changed, 14 insertions, 12 deletions
diff --git a/www/firefox/files/patch-bug1618914 b/www/firefox/files/patch-bug1618914
index 817d00032222..94b7aa8d38e1 100644
--- a/www/firefox/files/patch-bug1618914
+++ b/www/firefox/files/patch-bug1618914
@@ -4,8 +4,7 @@ diff --git widget/gtk/WindowSurfaceWayland.cpp widget/gtk/WindowSurfaceWayland.c
index 9a73326399bd5..9e42a7f1c5d18 100644
--- widget/gtk/WindowSurfaceWayland.cpp
+++ widget/gtk/WindowSurfaceWayland.cpp
-@@ -222,20 +222,21 @@ static int WaylandAllocateShmMemory(int aSize) {
- #ifdef HAVE_POSIX_FALLOCATE
+@@ -221,7 +221,9 @@ static int WaylandAllocateShmMemory(int aSize) {
do {
ret = posix_fallocate(fd, 0, aSize);
} while (ret == EINTR);
@@ -13,29 +12,32 @@ index 9a73326399bd5..9e42a7f1c5d18 100644
+ if (ret == 0) {
+ return fd;
+ } else if (ret != ENODEV && ret != EINVAL && ret != EOPNOTSUPP) {
+ NS_WARNING(
+ nsPrintfCString("posix_fallocate() fails to allocate shm memory: %s",
+ strerror(ret))
+@@ -229,7 +231,7 @@ static int WaylandAllocateShmMemory(int aSize) {
close(fd);
- MOZ_CRASH("posix_fallocate() fails to allocate shm memory");
+ return -1;
}
-#else
+#endif
do {
ret = ftruncate(fd, aSize);
} while (ret < 0 && errno == EINTR);
- if (ret < 0) {
+@@ -240,7 +242,6 @@ static int WaylandAllocateShmMemory(int aSize) {
close(fd);
- MOZ_CRASH("ftruncate() fails to allocate shm memory");
+ fd = -1;
}
-#endif
return fd;
}
-@@ -265,8 +266,8 @@ bool WaylandShmPool::Resize(int aSize) {
- #ifdef HAVE_POSIX_FALLOCATE
+@@ -253,7 +254,7 @@ static bool WaylandReAllocateShmMemory(int aFd, int aSize) {
do {
- errno = posix_fallocate(mShmPoolFd, 0, aSize);
+ errno = posix_fallocate(aFd, 0, aSize);
} while (errno == EINTR);
-- if (errno != 0) return false;
-+ if (errno != 0 && errno != ENODEV && errno != EINVAL && errno != EOPNOTSUPP) return false;
+- if (errno != 0) {
++ if (errno != 0 && errno != ENODEV && errno != EINVAL && errno != EOPNOTSUPP) {
+ return false;
+ }
#endif
-
- wl_shm_pool_resize(mShmPool, aSize);