1From fdc9866e48797f22762da457688b6ca93b6a337e Mon Sep 17 00:00:00 2001 2From: Takuro Ashie <ashie@homa.ne.jp> 3Date: Wed, 8 May 2019 14:42:24 +0900 4Subject: [PATCH] Disable eglQueryString(nullptr, EGL_EXTENSIONS) 5 6Because it causes crash on certain environments such as PowerVR drivers, 7and such extensions aren't used on Linux in fact. 8 9Upstream-Status: Inappropriate [OE-specific: https://bugzilla.mozilla.org/show_bug.cgi?id=1571603] 10 11Signed-off-by: Hiroshi Hatake <hatake@clear-code.com> 12Signed-off-by: Takuro Ashie <ashie@clear-code.com> 13 14--- 15 gfx/gl/GLContextProviderEGL.cpp | 6 ++++++ 16 gfx/gl/GLLibraryEGL.cpp | 2 ++ 17 2 files changed, 8 insertions(+) 18 19diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp 20index 0ee98f3fce..ac6f29a2eb 100644 21--- a/gfx/gl/GLContextProviderEGL.cpp 22+++ b/gfx/gl/GLContextProviderEGL.cpp 23@@ -525,10 +525,16 @@ void GLContextEGL::GetWSIInfo(nsCString* const out) const { 24 out->Append( 25 (const char*)mEgl->fQueryString(EGL_DISPLAY(), LOCAL_EGL_EXTENSIONS)); 26 27+#if 0 28 #ifndef ANDROID // This query will crash some old android. 29+ // Bug 1209612: Crashes on a number of android drivers. 30+ // Ideally we would only blocklist this there, but for now we don't need the 31+ // client extension list on ANDROID or embedded linux (we mostly need it on 32+ // ANGLE), and we'd rather not crash. 33 out->AppendLiteral("\nEGL_EXTENSIONS(nullptr): "); 34 out->Append((const char*)mEgl->fQueryString(nullptr, LOCAL_EGL_EXTENSIONS)); 35 #endif 36+#endif 37 } 38 39 // hold a reference to the given surface 40diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp 41index 812a66c79e..679b5426e9 100644 42--- a/gfx/gl/GLLibraryEGL.cpp 43+++ b/gfx/gl/GLLibraryEGL.cpp 44@@ -834,12 +834,14 @@ void GLLibraryEGL::InitClientExtensions() { 45 46 const char* rawExtString = nullptr; 47 48+#if 0 49 #ifndef ANDROID 50 // Bug 1209612: Crashes on a number of android drivers. 51 // Ideally we would only blocklist this there, but for now we don't need the 52 // client extension list on ANDROID (we mostly need it on ANGLE), and we'd 53 // rather not crash. 54 rawExtString = (const char*)fQueryString(nullptr, LOCAL_EGL_EXTENSIONS); 55+#endif 56 #endif 57 58 if (!rawExtString) { 59