mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
bug 1331320 install X11 error handler through Xlib in plugin process as GTK2 does not use g_error r=glandium
MozReview-Commit-ID: 9Io2fABc2hI --HG-- extra : rebase_source : 7da1b83d5003d49d0eaddd94509f50a40c043825
This commit is contained in:
parent
95e2f855f2
commit
671fdc9bae
@ -24,6 +24,7 @@
|
||||
#include "nsXULAppAPI.h"
|
||||
|
||||
#ifdef MOZ_X11
|
||||
# include "nsX11ErrorHandler.h"
|
||||
# include "mozilla/X11Util.h"
|
||||
#endif
|
||||
#include "mozilla/ipc/ProcessChild.h"
|
||||
@ -593,7 +594,7 @@ PluginModuleChild::InitGraphics()
|
||||
#endif
|
||||
#ifdef MOZ_X11
|
||||
// Do this after initializing GDK, or GDK will install its own handler.
|
||||
XRE_InstallX11ErrorHandler();
|
||||
InstallX11ErrorHandler();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_X11']:
|
||||
EXPORTS += ['nsX11ErrorHandler.h']
|
||||
UNIFIED_SOURCES += [
|
||||
'nsX11ErrorHandler.cpp',
|
||||
]
|
||||
|
@ -149,7 +149,6 @@ X11Error(Display *display, XErrorEvent *event) {
|
||||
}
|
||||
}
|
||||
|
||||
#if (MOZ_WIDGET_GTK != 3)
|
||||
void
|
||||
InstallX11ErrorHandler()
|
||||
{
|
||||
@ -161,4 +160,3 @@ InstallX11ErrorHandler()
|
||||
XSynchronize(display, True);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -5,8 +5,13 @@
|
||||
|
||||
#ifdef MOZ_X11
|
||||
#include <X11/Xlib.h>
|
||||
#if (MOZ_WIDGET_GTK != 3)
|
||||
|
||||
/**
|
||||
* InstallX11ErrorHandler is not suitable for processes running with GTK3 as
|
||||
* GDK3 will replace the handler. This is still used for the plugin process,
|
||||
* which runs with GTK2.
|
||||
**/
|
||||
void InstallX11ErrorHandler();
|
||||
#endif
|
||||
|
||||
extern "C" int X11Error(Display *display, XErrorEvent *event);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user