Decide what to do wrt exceptions in libjsoncpp
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox104 fixed)
| Tracking | Status | |
|---|---|---|
| firefox104 | --- | fixed |
People
(Reporter: glandium, Assigned: mozbugz)
References
Details
Attachments
(1 file)
| Assignee | ||
Comment 1•3 years ago
|
||
I've just hit this when I started using it to construct JSON structures, Coverity complained that I used functions that throw! (Coverity CID 1507054 "Uncaught exception".)
I think we should just compile it without exceptions everywhere, for easier integration in Firefox. After a quick search, I didn't find any code that used JsonCpp and exceptions.
I'll push a patch for review soon.
| Assignee | ||
Comment 2•3 years ago
|
||
JsonCpp is used in different places around Firefox, which is normally built
without exception handling, so we don't want JsonCpp to throw.
Because we don't want to modify the JsonCpp files themselves (to ease future
update from the source), and some of its headers are directly included around
Firefox, we need to define JSON_USE_EXCEPTION to be 0 everywhere, which can
be done through moz.configure.
JsonCpp replaces its exception-triggering code with C asserts and aborts.
Comment 4•3 years ago
|
||
| bugherder | ||
Description
•