Re: [firebreath-dev] Win32 exception handling

32 views
Skip to first unread message

Georg Fritzsche

unread,
Jul 2, 2012, 2:58:31 PM7/2/12
to firebre...@googlegroups.com
All major browsers run plugins out-of-process now - so your plugin
would only crash the process that host the plugin, not the main browser
process.

Georg

On 02.07.2012 20:37, Dan Tiedy wrote:
> Is there anything special that needs to be done to handle exceptions in
> the win32 firebreath browser plugin. What I would like is a graceful
> way to handle the plugin crashing without crashing the browser. By
> default I see /EHa compile option is not enabled thus
> _set_se_translatore() can not be set up to translate C exceptions into
> c++ exceptions. I also am not having a lot of luck using
> SetUnhandledExceptionFilter.
>
> Anyone handling exception in their plugins?


Dan Tiedy

unread,
Jul 2, 2012, 3:15:01 PM7/2/12
to firebre...@googlegroups.com
You are correct, I should have been more specific by my statement "Crashing the browser".  Wouldn't it still be desired to handle the exceptions rather than the browser displaying a nasty "Plugin X as crashed?".  I did a few tests and was unable to get my C unhanded exception filter to be called.  Also If I wanted to go down the route of using C++ exceptions I would need to enable the /EHa compile option and from what I can see this means I would have to modify FireBreaths buildconfig.cmake, which brought me to this forum as I'd guess that others have already done this and maybe I was not approaching the problem correctly.

georg.f...@googlemail.com

unread,
Jul 2, 2012, 4:14:01 PM7/2/12
to firebre...@googlegroups.com
Unless you need the crash-info i see no reason to cover it up. 
I mean, the plugin did crash, so there is nothing sensible/graceful to be done anyway besides crash-analysis and killing the host process.

Georg

Sent from my iPad
Reply all
Reply to author
Forward
0 new messages