From 91c7c61633337c5c079dd0ced37d4276709539ff Mon Sep 17 00:00:00 2001 From: macpgmr Date: Fri, 3 Dec 2010 21:49:16 +0000 Subject: [PATCH] Workaround: Disabled floating point exceptions in sample apps to prevent xulrunner crash with FPC/Windows. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1396 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/geckoport/SampleApps/ChromeWin.dpr | 10 ++++++++++ components/geckoport/SampleApps/GBrowser.dpr | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/components/geckoport/SampleApps/ChromeWin.dpr b/components/geckoport/SampleApps/ChromeWin.dpr index 51f231bba..0f3b05bf2 100755 --- a/components/geckoport/SampleApps/ChromeWin.dpr +++ b/components/geckoport/SampleApps/ChromeWin.dpr @@ -3,6 +3,9 @@ program ChromeWin; uses {$IFDEF LCL} Interfaces, + {$IFDEF MSWINDOWS} + Math, + {$ENDIF} {$ENDIF} Forms, nsXRE, @@ -16,6 +19,13 @@ uses var navigation: nsIWebNavigation; begin +{$IFDEF FPC} + {$IFDEF MSWINDOWS} + //For now - disable all floating point exceptions or XULRUNNER will crash. + SetExceptionMask([exInvalidOp,exDenormalized,exZeroDivide,exOverflow,exUnderflow,exPrecision]); + {$ENDIF} +{$ENDIF} + Application.Initialize; XRE_Startup('1.9', True, '2.0', False); diff --git a/components/geckoport/SampleApps/GBrowser.dpr b/components/geckoport/SampleApps/GBrowser.dpr index c15057890..923e9ff24 100644 --- a/components/geckoport/SampleApps/GBrowser.dpr +++ b/components/geckoport/SampleApps/GBrowser.dpr @@ -3,6 +3,9 @@ program GBrowser; uses {$IFDEF LCL} Interfaces, + {$IFDEF MSWINDOWS} + Math, + {$ENDIF} {$ENDIF} Forms, gec10 in 'gec10.pas' {Form1}; @@ -12,6 +15,13 @@ uses {$ENDIF} begin +{$IFDEF FPC} + {$IFDEF MSWINDOWS} + //For now - disable all floating point exceptions or XULRUNNER will crash. + SetExceptionMask([exInvalidOp,exDenormalized,exZeroDivide,exOverflow,exUnderflow,exPrecision]); + {$ENDIF} +{$ENDIF} + Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run;