diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-06-01 23:22:43 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-06-01 23:22:43 +0000 |
commit | 4fa9da3898e83db02567aa10423b2f731d64f807 (patch) | |
tree | 5865e37975ad5189427ea9f386e2e25e222db9c0 | |
parent | 27794a92295119066d25cd09c3c2b7091f3a3056 (diff) | |
download | ports-4fa9da3898e83db02567aa10423b2f731d64f807.tar.gz ports-4fa9da3898e83db02567aa10423b2f731d64f807.zip |
MFH: r536538 r536713 r537007
www/firefox: update to 77.0
Changes: https://www.mozilla.org/firefox/77.0/releasenotes/
Approved by: ports-secteam blanket
Notes
Notes:
svn path=/branches/2020Q2/; revision=537512
-rw-r--r-- | Mk/bsd.gecko.mk | 1 | ||||
-rw-r--r-- | www/firefox/Makefile | 5 | ||||
-rw-r--r-- | www/firefox/distinfo | 6 | ||||
-rw-r--r-- | www/firefox/files/patch-addon-search | 6 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1288587 | 43 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1624128 | 70 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1625431 | 34 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1628690 | 82 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1632456 | 40 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1636072 | 33 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1638010 | 25 |
11 files changed, 111 insertions, 234 deletions
diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk index 7ccae4f38771..62f149a6b13b 100644 --- a/Mk/bsd.gecko.mk +++ b/Mk/bsd.gecko.mk @@ -72,6 +72,7 @@ USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt HAS_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes LDFLAGS+= -Wl,--as-needed +BINARY_ALIAS+= python3=python${PYTHON3_DEFAULT} BUNDLE_LIBS= yes diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 4a054d93432f..0483d37afe45 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -2,12 +2,11 @@ # $FreeBSD$ PORTNAME= firefox -DISTVERSION= 76.0.1 -PORTREVISION= 4 +DISTVERSION= 77.0 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \ - MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source + MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build3/source DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX} MAINTAINER= gecko@FreeBSD.org diff --git a/www/firefox/distinfo b/www/firefox/distinfo index c49725506466..63721fe9a3fd 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1588879058 -SHA256 (firefox-76.0.1.source.tar.xz) = f61761e32774a6bdfedd5937c4992fbe5e24c3df057c2b9a559fcd0d038777c3 -SIZE (firefox-76.0.1.source.tar.xz) = 323251680 +TIMESTAMP = 1590732186 +SHA256 (firefox-77.0.source.tar.xz) = b534794c493d8698dfb6c852af52b49540afdf88dc50451f42d6591de93291e8 +SIZE (firefox-77.0.source.tar.xz) = 329713656 diff --git a/www/firefox/files/patch-addon-search b/www/firefox/files/patch-addon-search index 2e17484bf123..11efb6c5e8fa 100644 --- a/www/firefox/files/patch-addon-search +++ b/www/firefox/files/patch-addon-search @@ -5,18 +5,16 @@ diff --git browser/app/profile/firefox.js browser/app/profile/firefox.js index 75c2c5e435e35..4d8c09c02759b 100644 --- browser/app/profile/firefox.js +++ browser/app/profile/firefox.js -@@ -37,8 +37,8 @@ pref("extensions.webextOptionalPermissionPrompts", tru +@@ -37,7 +37,7 @@ pref("extensions.webextOptionalPermissionPrompts", true); // Preferences for AMO integration pref("extensions.getAddons.cache.enabled", true); pref("extensions.getAddons.get.url", "https://services.addons.mozilla.org/api/v3/addons/search/?guid=%IDS%&lang=%LOCALE%"); -pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=%OS%&appver=%VERSION%"); --pref("extensions.webservice.discoverURL", "https://discovery.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/%OS%/%COMPATIBILITY_MODE%"); +pref("extensions.getAddons.search.browseURL", "https://addons.mozilla.org/%LOCALE%/firefox/search?q=%TERMS%&platform=Linux&appver=%VERSION%"); -+pref("extensions.webservice.discoverURL", "https://discovery.addons.mozilla.org/%LOCALE%/firefox/discovery/pane/%VERSION%/Linux/%COMPATIBILITY_MODE%"); pref("extensions.getAddons.link.url", "https://addons.mozilla.org/%LOCALE%/firefox/"); pref("extensions.getAddons.langpacks.url", "https://services.addons.mozilla.org/api/v3/addons/language-tools/?app=firefox&type=language&appversion=%VERSION%"); pref("extensions.getAddons.discovery.api_url", "https://services.addons.mozilla.org/api/v4/discovery/?lang=%LOCALE%&edition=%DISTRIBUTION%"); -@@ -169,8 +169,8 @@ pref("app.update.url", "https://aus5.mozilla.org/updat +@@ -168,8 +168,8 @@ pref("app.update.staging.enabled", true); // .. etc .. // pref("extensions.update.enabled", true); diff --git a/www/firefox/files/patch-bug1288587 b/www/firefox/files/patch-bug1288587 index 7e9963a551fa..0de2d48fa735 100644 --- a/www/firefox/files/patch-bug1288587 +++ b/www/firefox/files/patch-bug1288587 @@ -2,48 +2,15 @@ diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.confi index 855214a..1e91d51 100644 --- build/moz.configure/init.configure +++ build/moz.configure/init.configure -@@ -252,6 +252,7 @@ option(env='PYTHON', nargs=1, help='Python 2.7 interpr - @imports(_from='mozbuild.pythonutil', _import='find_python2_executable') - @imports(_from='mozbuild.pythonutil', _import='python_executable_version') - @imports(_from='six', _import='ensure_text') -+@imports(_from='__builtin__', _import='KeyError') - def virtualenv_python2(env_python, build_env, mozillabuild, mozconfig, help): - if help: - return -@@ -283,6 +284,12 @@ def virtualenv_python2(env_python, build_env, mozillab - python = mozconfig['vars']['added']['PYTHON'] - elif 'PYTHON' in mozconfig['vars']['modified']: - python = mozconfig['vars']['modified']['PYTHON'][1] -+ for i in ('env', 'vars'): -+ for j in ('added', 'modified'): -+ try: -+ del mozconfig[i][j]['PYTHON'] -+ except KeyError: -+ pass - - log.debug("python2: executable from configuration: %r" % python) - -@@ -365,7 +372,10 @@ def virtualenv_python2(env_python, build_env, mozillab - sys.executable, manager.python_path)) - log.info('Reexecuting in the virtualenv') - if env_python: -- del os.environ['PYTHON'] -+ try: -+ del os.environ['PYTHON'] -+ except KeyError: -+ pass - # One would prefer to use os.execl, but that's completely borked on - # Windows. - sys.exit(subprocess.call([python] + sys.argv)) -@@ -468,6 +478,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpre +@@ -252,6 +252,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpre @imports(_from='mozbuild.pythonutil', _import='find_python3_executable') @imports(_from='mozbuild.pythonutil', _import='python_executable_version') @imports(_from='six', _import='ensure_text') +@imports(_from='__builtin__', _import='KeyError') - def virtualenv_python3(env_python, build_env, mozillabuild, mozconfig, help): + def virtualenv_python3(env_python, build_env, mozconfig, help): + # Avoid re-executing python when running configure --help. if help: - return -@@ -503,6 +514,12 @@ def virtualenv_python3(env_python, build_env, mozillab +@@ -284,6 +285,12 @@ def virtualenv_python3(env_python, build_env, mozconfi python = mozconfig['vars']['added']['PYTHON3'] elif 'PYTHON3' in mozconfig['vars']['modified']: python = mozconfig['vars']['modified']['PYTHON3'][1] @@ -56,7 +23,7 @@ index 855214a..1e91d51 100644 log.debug("python3: executable from configuration: %r" % python) -@@ -583,7 +600,10 @@ def virtualenv_python3(env_python, build_env, mozillab +@@ -373,7 +380,10 @@ def virtualenv_python3(env_python, build_env, mozconfi sys.executable, manager.python_path)) log.info('Re-executing in the virtualenv') if env_python: diff --git a/www/firefox/files/patch-bug1624128 b/www/firefox/files/patch-bug1624128 deleted file mode 100644 index 9eba0de2defb..000000000000 --- a/www/firefox/files/patch-bug1624128 +++ /dev/null @@ -1,70 +0,0 @@ -commit 2a981b96abf3 -Author: Kevin Jacobs <kjacobs@mozilla.com> -Date: Tue Apr 14 18:32:19 2020 +0000 - - Bug 1624128 - Update CK_GCM_PARAMS uses for PKCS11 v3.0 definition r=keeler - - This patch initializes the ulIvBits member of CK_GCM_PARAMS, which is new in PKCS11 v3. - - For libprio, we instead define NSS_PKCS11_2_0_COMPAT, which yields the old struct definition. - - Differential Revision: https://phabricator.services.mozilla.com/D67740 - - --HG-- - extra : moz-landing-system : lando ---- - dom/crypto/WebCryptoTask.cpp | 1 + - netwerk/srtp/src/crypto/cipher/aes_gcm_nss.c | 1 + - security/manager/ssl/OSKeyStore.cpp | 1 + - third_party/prio/moz.build | 5 +++++ - 4 files changed, 8 insertions(+) - -diff --git dom/crypto/WebCryptoTask.cpp dom/crypto/WebCryptoTask.cpp -index ad0d1432738f0..60a265972d212 100644 ---- dom/crypto/WebCryptoTask.cpp -+++ dom/crypto/WebCryptoTask.cpp -@@ -600,6 +600,7 @@ class AesTask : public ReturnArrayBufferViewTask, public DeferredData { - case CKM_AES_GCM: - gcmParams.pIv = mIv.Elements(); - gcmParams.ulIvLen = mIv.Length(); -+ gcmParams.ulIvBits = gcmParams.ulIvLen * 8; - gcmParams.pAAD = mAad.Elements(); - gcmParams.ulAADLen = mAad.Length(); - gcmParams.ulTagBits = mTagLength; -diff --git netwerk/srtp/src/crypto/cipher/aes_gcm_nss.c netwerk/srtp/src/crypto/cipher/aes_gcm_nss.c -index e1fdbe36fbf85..2be2ce932ddf1 100644 ---- netwerk/srtp/src/crypto/cipher/aes_gcm_nss.c -+++ netwerk/srtp/src/crypto/cipher/aes_gcm_nss.c -@@ -271,6 +271,7 @@ static srtp_err_status_t srtp_aes_gcm_nss_do_crypto(void *cv, - - c->params.pIv = c->iv; - c->params.ulIvLen = GCM_IV_LEN; -+ c->params.ulIvBits = GCM_IV_LEN * 8; - c->params.pAAD = c->aad; - c->params.ulAADLen = c->aad_size; - -diff --git security/manager/ssl/OSKeyStore.cpp security/manager/ssl/OSKeyStore.cpp -index 00bc918c5fdd7..c83a559d9c1ea 100644 ---- security/manager/ssl/OSKeyStore.cpp -+++ security/manager/ssl/OSKeyStore.cpp -@@ -663,6 +663,7 @@ nsresult AbstractOSKeyStore::DoCipher(const UniquePK11SymKey& aSymKey, - CK_GCM_PARAMS gcm_params; - gcm_params.pIv = const_cast<unsigned char*>(ivp); - gcm_params.ulIvLen = mIVLength; -+ gcm_params.ulIvBits = gcm_params.ulIvLen * 8; - gcm_params.ulTagBits = 128; - gcm_params.pAAD = nullptr; - gcm_params.ulAADLen = 0; -diff --git third_party/prio/moz.build third_party/prio/moz.build -index 3e10fe71ce8ed..0a6e3c74a2696 100644 ---- third_party/prio/moz.build -+++ third_party/prio/moz.build -@@ -42,3 +42,8 @@ SOURCES += [ - ] - - FINAL_LIBRARY = 'xul' -+ -+# Use PKCS11 v2 struct definitions for now, otherwise NSS requires -+# CK_GCM_PARAMS.ulIvBits to be set. This workaround is only required -+# until NSS 3.52 RTM and upstream correctly initializes the field. -+DEFINES['NSS_PKCS11_2_0_COMPAT'] = True diff --git a/www/firefox/files/patch-bug1625431 b/www/firefox/files/patch-bug1625431 deleted file mode 100644 index a71a3807ced0..000000000000 --- a/www/firefox/files/patch-bug1625431 +++ /dev/null @@ -1,34 +0,0 @@ -commit 9896149e475c -Author: Martin Stransky <stransky@redhat.com> -Date: Tue Apr 7 18:35:01 2020 +0000 - - Bug 1625431 [Wayland] Enable VAAPI decoding only when hw compositing is enabled, r=jya - - Differential Revision: https://phabricator.services.mozilla.com/D68753 - - --HG-- - extra : moz-landing-system : lando ---- - dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -index 4c5b0108599bc..1e5694ead0854 100644 ---- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -+++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -@@ -172,6 +172,15 @@ bool FFmpegVideoDecoder<LIBAV_VER>::CreateVAAPIDeviceContext() { - MediaResult FFmpegVideoDecoder<LIBAV_VER>::InitVAAPIDecoder() { - FFMPEG_LOG("Initialising VA-API FFmpeg decoder"); - -+ auto layersBackend = mImageAllocator -+ ? mImageAllocator->GetCompositorBackendType() -+ : layers::LayersBackend::LAYERS_BASIC; -+ if (layersBackend != layers::LayersBackend::LAYERS_OPENGL && -+ layersBackend != layers::LayersBackend::LAYERS_WR) { -+ FFMPEG_LOG("VA-API works with HW accelerated backend only!"); -+ return NS_ERROR_NOT_AVAILABLE; -+ } -+ - if (!mLib->IsVAAPIAvailable()) { - FFMPEG_LOG("libva library or symbols are missing."); - return NS_ERROR_NOT_AVAILABLE; diff --git a/www/firefox/files/patch-bug1628690 b/www/firefox/files/patch-bug1628690 deleted file mode 100644 index 96fda925a886..000000000000 --- a/www/firefox/files/patch-bug1628690 +++ /dev/null @@ -1,82 +0,0 @@ -commit 3a6824ecbffe -Author: Martin Stransky <stransky@redhat.com> -Date: Thu Apr 16 13:49:37 2020 +0000 - - Bug 1628690 [Wayland][VA-API] Respect disabled HW decoding to allow fallback to SW decoding, r=jya - - Differential Revision: https://phabricator.services.mozilla.com/D71158 ---- - dom/media/platforms/ffmpeg/FFmpegDecoderModule.h | 4 +++- - dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 11 +++++++---- - dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h | 4 +++- - 3 files changed, 13 insertions(+), 6 deletions(-) - -diff --git dom/media/platforms/ffmpeg/FFmpegDecoderModule.h dom/media/platforms/ffmpeg/FFmpegDecoderModule.h -index 5a1d2c7a963af..563ee5267a08d 100644 ---- dom/media/platforms/ffmpeg/FFmpegDecoderModule.h -+++ dom/media/platforms/ffmpeg/FFmpegDecoderModule.h -@@ -49,7 +49,9 @@ class FFmpegDecoderModule : public PlatformDecoderModule { - RefPtr<MediaDataDecoder> decoder = new FFmpegVideoDecoder<V>( - mLib, aParams.mTaskQueue, aParams.VideoConfig(), - aParams.mKnowsCompositor, aParams.mImageContainer, -- aParams.mOptions.contains(CreateDecoderParams::Option::LowLatency)); -+ aParams.mOptions.contains(CreateDecoderParams::Option::LowLatency), -+ aParams.mOptions.contains( -+ CreateDecoderParams::Option::HardwareDecoderNotAllowed)); - return decoder.forget(); - } - -diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -index 1e5694ead0854..294097356c5b3 100644 ---- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -+++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -@@ -270,10 +270,11 @@ void FFmpegVideoDecoder<LIBAV_VER>::PtsCorrectionContext::Reset() { - FFmpegVideoDecoder<LIBAV_VER>::FFmpegVideoDecoder( - FFmpegLibWrapper* aLib, TaskQueue* aTaskQueue, const VideoInfo& aConfig, - KnowsCompositor* aAllocator, ImageContainer* aImageContainer, -- bool aLowLatency) -+ bool aLowLatency, bool aDisableHardwareDecoding) - : FFmpegDataDecoder(aLib, aTaskQueue, GetCodecId(aConfig.mMimeType)), - #ifdef MOZ_WAYLAND_USE_VAAPI - mVAAPIDeviceContext(nullptr), -+ mDisableHardwareDecoding(aDisableHardwareDecoding), - #endif - mImageAllocator(aAllocator), - mImageContainer(aImageContainer), -@@ -289,9 +290,11 @@ RefPtr<MediaDataDecoder::InitPromise> FFmpegVideoDecoder<LIBAV_VER>::Init() { - MediaResult rv; - - #ifdef MOZ_WAYLAND_USE_VAAPI -- rv = InitVAAPIDecoder(); -- if (NS_SUCCEEDED(rv)) { -- return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__); -+ if (!mDisableHardwareDecoding) { -+ rv = InitVAAPIDecoder(); -+ if (NS_SUCCEEDED(rv)) { -+ return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__); -+ } - } - #endif - -diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -index 670cb6203dde0..7f14dfc8dbc11 100644 ---- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -+++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -@@ -48,7 +48,8 @@ class FFmpegVideoDecoder<LIBAV_VER> - public: - FFmpegVideoDecoder(FFmpegLibWrapper* aLib, TaskQueue* aTaskQueue, - const VideoInfo& aConfig, KnowsCompositor* aAllocator, -- ImageContainer* aImageContainer, bool aLowLatency); -+ ImageContainer* aImageContainer, bool aLowLatency, -+ bool aDisableHardwareDecoding); - - RefPtr<InitPromise> Init() override; - void InitCodecContext() override; -@@ -109,6 +110,7 @@ class FFmpegVideoDecoder<LIBAV_VER> - - #ifdef MOZ_WAYLAND_USE_VAAPI - AVBufferRef* mVAAPIDeviceContext; -+ const bool mDisableHardwareDecoding; - #endif - RefPtr<KnowsCompositor> mImageAllocator; - RefPtr<ImageContainer> mImageContainer; diff --git a/www/firefox/files/patch-bug1632456 b/www/firefox/files/patch-bug1632456 new file mode 100644 index 000000000000..7822ff438a67 --- /dev/null +++ b/www/firefox/files/patch-bug1632456 @@ -0,0 +1,40 @@ +commit 0aaf67da2681 +Author: Martin Stransky <stransky@redhat.com> +Date: Wed May 27 08:37:58 2020 +0000 + + Bug 1632456 [Wayland] Release mVAAPIDeviceContext when FFmpegVideoDecoder::CreateVAAPIDeviceContext() fails, r=jya + + Differential Revision: https://phabricator.services.mozilla.com/D76745 +--- + dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +index 889d1d1ed5b97..1bd144d7375f4 100644 +--- dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ++++ dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp +@@ -175,6 +175,10 @@ bool FFmpegVideoDecoder<LIBAV_VER>::CreateVAAPIDeviceContext() { + if (!mVAAPIDeviceContext) { + return false; + } ++ ++ auto releaseVAAPIcontext = ++ MakeScopeExit([&] { mLib->av_buffer_unref(&mVAAPIDeviceContext); }); ++ + AVHWDeviceContext* hwctx = (AVHWDeviceContext*)mVAAPIDeviceContext->data; + AVVAAPIDeviceContext* vactx = (AVVAAPIDeviceContext*)hwctx->hwctx; + +@@ -195,12 +199,12 @@ bool FFmpegVideoDecoder<LIBAV_VER>::CreateVAAPIDeviceContext() { + } + + vactx->display = mDisplay; +- + if (mLib->av_hwdevice_ctx_init(mVAAPIDeviceContext) < 0) { + return false; + } + + mCodecContext->hw_device_ctx = mLib->av_buffer_ref(mVAAPIDeviceContext); ++ releaseVAAPIcontext.release(); + return true; + } + diff --git a/www/firefox/files/patch-bug1636072 b/www/firefox/files/patch-bug1636072 new file mode 100644 index 000000000000..777df034b253 --- /dev/null +++ b/www/firefox/files/patch-bug1636072 @@ -0,0 +1,33 @@ +commit edbe69232a5b +Author: Martin Stransky <stransky@redhat.com> +Date: Tue May 12 09:20:25 2020 +0000 + + Bug 1636072 [Wayland] Don't crash when GetWlBuffer() fails, r=jhorak + + Differential Revision: https://phabricator.services.mozilla.com/D74663 +--- + widget/gtk/WindowSurfaceWayland.cpp | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git widget/gtk/WindowSurfaceWayland.cpp widget/gtk/WindowSurfaceWayland.cpp +index 372158c9f0f33..56f5d3d530853 100644 +--- widget/gtk/WindowSurfaceWayland.cpp ++++ widget/gtk/WindowSurfaceWayland.cpp +@@ -390,10 +390,13 @@ void WindowBackBuffer::Attach(wl_surface* aSurface) { + (void*)GetWlBuffer(), + GetWlBuffer() ? wl_proxy_get_id((struct wl_proxy*)GetWlBuffer()) : -1)); + +- wl_surface_attach(aSurface, GetWlBuffer(), 0, 0); +- wl_surface_commit(aSurface); +- wl_display_flush(WaylandDisplayGetWLDisplay()); +- SetAttached(); ++ wl_buffer* buffer = GetWlBuffer(); ++ if (buffer) { ++ wl_surface_attach(aSurface, buffer, 0, 0); ++ wl_surface_commit(aSurface); ++ wl_display_flush(WaylandDisplayGetWLDisplay()); ++ SetAttached(); ++ } + } + + void WindowBackBufferShm::Detach(wl_buffer* aBuffer) { diff --git a/www/firefox/files/patch-bug1638010 b/www/firefox/files/patch-bug1638010 new file mode 100644 index 000000000000..9408c73d5cbb --- /dev/null +++ b/www/firefox/files/patch-bug1638010 @@ -0,0 +1,25 @@ +commit 9a89dccd2a85 +Author: Martin Stransky <stransky@redhat.com> +Date: Fri May 15 07:52:39 2020 +0000 + + Bug 1638010 [Wayland] Make WaylandDMABUFTextureData::BorrowDrawTarget() fail when underlying dmabuf surface is not locked, r=sotaro + + Differential Revision: https://phabricator.services.mozilla.com/D75329 +--- + gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp +index bb556d9fcfaf5..da9c9cb6f4d19 100644 +--- gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp ++++ gfx/layers/opengl/WaylandDMABUFTextureClientOGL.cpp +@@ -86,6 +86,9 @@ already_AddRefed<DrawTarget> WaylandDMABUFTextureData::BorrowDrawTarget() { + return nullptr; + } + auto surf = mSurface->GetAsWaylandDMABufSurfaceRGBA(); ++ if (!surf->GetMappedRegion()) { ++ return nullptr; ++ } + return Factory::CreateDrawTargetForData( + mBackend, (unsigned char*)surf->GetMappedRegion(), + IntSize(surf->GetWidth(), surf->GetHeight()), |