Bug 633820 - nsCrashOnException.cpp compilation fails to compile on mingw r=ehsan a=benjamin

This commit is contained in:
Jacek Caban 2011-02-15 12:30:58 +00:00
Родитель 3541e1165c
Коммит e1f843a9e4
5 изменённых файлов: 3 добавлений и 33 удалений

Просмотреть файл

@ -50,6 +50,7 @@
#endif
#ifdef XP_WIN
#include "mozilla/gfx/SharedDIBSurface.h"
#include "nsCrashOnException.h"
using mozilla::gfx::SharedDIBSurface;
#endif
@ -78,10 +79,6 @@ using namespace mozilla::plugins;
#include "nsWindowsDllInterceptor.h"
#ifdef _MSC_VER
#include "nsCrashOnException.h"
#endif
typedef BOOL (WINAPI *User32TrackPopupMenu)(HMENU hMenu,
UINT uFlags,
int x,
@ -1145,11 +1142,7 @@ PluginInstanceChild::PluginWindowProc(HWND hWnd,
WPARAM wParam,
LPARAM lParam)
{
#ifdef _MSC_VER
return mozilla::CallWindowProcCrashProtected(PluginWindowProcInternal, hWnd, message, wParam, lParam);
#else
return PluginWindowProcInternal(hWnd, message, wParam, lParam);
#endif
}
// static

Просмотреть файл

@ -58,10 +58,7 @@
#include "nsThreadUtils.h"
#include "nsAutoPtr.h"
#include "nsTWeakRef.h"
#ifdef _MSC_VER
#include "nsCrashOnException.h"
#endif
#define NP_POPUP_API_VERSION 16
@ -388,11 +385,7 @@ static LRESULT CALLBACK PluginWndProcInternal(HWND hWnd, UINT msg, WPARAM wParam
static LRESULT CALLBACK PluginWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
#ifdef _MSC_VER
return mozilla::CallWindowProcCrashProtected(PluginWndProcInternal, hWnd, msg, wParam, lParam);
#else
return PluginWndProcInternal(hWnd, msg, wParam, lParam);
#endif
}
/*

Просмотреть файл

@ -228,11 +228,7 @@
#endif
#include "mozilla/FunctionTimer.h"
#ifdef _MSC_VER
#include "nsCrashOnException.h"
#endif
#include "nsIXULRuntime.h"
using namespace mozilla::widget;
@ -4520,11 +4516,7 @@ DisplaySystemMenu(HWND hWnd, nsSizeMode sizeMode, PRBool isRtl, PRInt32 x, PRInt
// and http://msdn.microsoft.com/en-us/library/ms633573%28VS.85%29.aspx
LRESULT CALLBACK nsWindow::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
#ifdef _MSC_VER
return mozilla::CallWindowProcCrashProtected(WindowProcInternal, hWnd, msg, wParam, lParam);
#else
return WindowProcInternal(hWnd, msg, wParam, lParam);
#endif
}
LRESULT CALLBACK nsWindow::WindowProcInternal(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)

Просмотреть файл

@ -36,10 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef _MSC_VER
#error This file only makes sense on Windows.
#endif
#include "nsCrashOnException.h"
#include "nsCOMPtr.h"
#include "nsServiceManagerUtils.h"
@ -65,10 +61,10 @@ XPCOM_API(LRESULT)
CallWindowProcCrashProtected(WNDPROC wndProc, HWND hWnd, UINT msg,
WPARAM wParam, LPARAM lParam)
{
__try {
MOZ_SEH_TRY {
return wndProc(hWnd, msg, wParam, lParam);
}
__except(ReportException(GetExceptionInformation())) {
MOZ_SEH_EXCEPT(ReportException(GetExceptionInformation())) {
::TerminateProcess(::GetCurrentProcess(), 253);
}
return 0; // not reached

Просмотреть файл

@ -39,10 +39,6 @@
#ifndef nsCrashOnException_h
#define nsCrashOnException_h
#ifndef _MSC_VER
#error This file only makes sense on Windows with Visual C++.
#endif
#include <nscore.h>
#include <windows.h>