Backed out 2 changesets (bug 1777849) for causing webgl crashes. CLOSED TREE

Backed out changeset af3c076c00d6 (bug 1777849)
Backed out changeset 536f32f1cf47 (bug 1777849)
This commit is contained in:
Csoregi Natalia 2023-02-25 15:29:32 +02:00
parent ca96bfcbb2
commit 43261efa2b
3 changed files with 1 additions and 23 deletions

View File

@ -51,11 +51,9 @@ static void QueryXExtensions(Display* aDisplay) {
extern "C" {
int X11Error(Display* display, XErrorEvent* event) {
#ifdef DEBUG
// Get an indication of how long ago the request that caused the error was
// made.
unsigned long age = NextRequest(display) - event->serial;
#endif
// Get a string to represent the request that caused the error.
nsAutoCString message;
@ -98,7 +96,6 @@ int X11Error(Display* display, XErrorEvent* event) {
XGetErrorText(display, event->error_code, buffer, sizeof(buffer));
notes.Append(buffer);
#ifdef DEBUG
// For requests where Xlib gets the reply synchronously, |age| will be 1
// and the stack will include the function making the request. For
// asynchronous requests, the current stack will often be unrelated to the
@ -121,6 +118,7 @@ int X11Error(Display* display, XErrorEvent* event) {
}
}
#ifdef DEBUG
// The resource id is unlikely to be useful in a crash report without
// context of other ids, but add it to the debug console output.
notes.AppendLiteral("; id=0x");

View File

@ -15,7 +15,6 @@
#include <sys/types.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <dlfcn.h>
#include "mozilla/gfx/Logging.h"
#include "mozilla/SSE.h"
@ -66,7 +65,6 @@ nsresult GfxInfo::Init() {
mHasMultipleGPUs = false;
mGlxTestError = false;
mIsVAAPISupported = false;
mIsX11ThreadSafe = false;
return GfxInfoBase::Init();
}
@ -526,14 +524,6 @@ void GfxInfo::GetData() {
mIsWayland = GdkIsWaylandDisplay();
mIsXWayland = IsXWaylandProtocol();
// Bug 1777849 - LibX11 versions prior to 1.7 have a race condition if it is
// used in more than one thread. The symbol "XSetIOErrorExitHandler" was added
// to the API in version 1.7, so we check for this symbol here to verify that
// libX11 is safe to use in multiple threads.
if (!mIsWayland) {
mIsX11ThreadSafe = dlsym(RTLD_DEFAULT, "XSetIOErrorExitHandler") != nullptr;
}
if (!ddxDriver.IsEmpty()) {
PRInt32 start = 0;
PRInt32 loc = ddxDriver.Find(";", start);
@ -968,15 +958,6 @@ nsresult GfxInfo::GetFeatureStatusImpl(
return NS_OK;
}
if (aFeature == nsIGfxInfo::FEATURE_THREADSAFE_GL && !mIsWayland &&
!mIsX11ThreadSafe) {
// Bug 1777849 - LibX11 versions before 1.7 are not thread-safe, so using
// GLX on multiple threads is not thread-safe either.
*aStatus = nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION;
aFailureId = "FEATURE_FAILURE_THREADSAFE_GL";
return NS_OK;
}
return GfxInfoBase::GetFeatureStatusImpl(
aFeature, aStatus, aSuggestedDriverVersion, aDriverInfo, aFailureId, &os);
}

View File

@ -113,7 +113,6 @@ class GfxInfo final : public GfxInfoBase {
bool mHasMultipleGPUs;
bool mGlxTestError;
bool mIsVAAPISupported;
bool mIsX11ThreadSafe;
void AddCrashReportAnnotations();
};