On 10/17/13 3:40 PM, "Carl Wallace" <[email protected]> wrote:
> >On 10/17/13 3:35 PM, "Jim Chen" <[email protected]> wrote: > >>Oh I see. I think that article is talking about Gecko using libraries >>that throw exceptions to Gecko. So if your library throws an exception >>to Gecko code, it'll abort, which makes sense. But if you prevent the >>exception from propagating to Gecko, I think you'll be fine. BTW, are >>you using the Android build system to build your library? > >No. I have two projects that are built externally with the resulting >libraries/utilities copied to the device via the XPI. One project builds >a service, the other a pair of libraries that are registered with the NSS >store used by the browser. The registration act is performed using >utilities that are built by the Android build system but are not installed >by Firefox and are included in the XPI. Scratch that - I misread your note as meaning the Mozilla build system (not Android build system). The external projects are built using the same NDK as Mozilla. > >> >>Jim >> >> >>On 10/17/13 2:51 PM, Carl Wallace wrote: >>> I have reviewed that document and tried a few different runtimes >>> previously. Will give another look/try. The language about exceptions >>> being treated as abort in the link I posted below is mainly what I was >>> looking to confirm as a deal breaker. Thanks. I'd much rather get the >>> build sorted and leave the exceptions in place than try to remove >>> exception usage. >>> >>> On 10/17/13 2:46 PM, "Jim Chen" <[email protected]> wrote: >>> >>>> Hi Carl, >>>> >>>> Exceptions should be fine as long as you confine them to within the >>>> library. Note that you do have to specifically enable exception >>>> support when compiling (-fexceptions) and link to a C++ runtime that >>>> supports exception. You have to choose to link to the static library >>>> or shared library and that can get a bit tricky. See >>>> docs/CPLUSPLUS-SUPPORT.html inside the NDK for details. >>>> >>>> Cheers, >>>> Jim >>>> >>>> >>>> On 10/17/13 1:09 PM, Carl Wallace wrote: >>>>> Hi again, >>>>> >>>>> I've refactored the pcscd/libcoolkey code I had integrated into the >>>>> browser into a browser extension and it's mostly happy. I've >>>>>returned >>>>> to >>>>> an issue I'd temporarily worked around before: use of exceptions in >>>>>the >>>>> libcoolkey library. This page indicates exceptions will be treated >>>>>as >>>>> an >>>>> abort: >>>>> https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code. >>>>> I have a couple of questions: >>>>> >>>>> 1) Does this apply to exceptions thrown and caught within a shared >>>>> library? >>>>> 2) Is there any recourse other than to remove exception usage? >>>>> >>>>> Thanks. >>>>> >>>>> >>>>> _______________________________________________ >>>>> mobile-firefox-dev mailing list >>>>> [email protected] >>>>> https://mail.mozilla.org/listinfo/mobile-firefox-dev >>>>> >>> >>> > > _______________________________________________ mobile-firefox-dev mailing list [email protected] https://mail.mozilla.org/listinfo/mobile-firefox-dev

